UNPKG

ng2-qgrid

Version:
3 lines 497 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/platform-browser"),require("@angular/common"),require("@angular/forms"),require("@angular/common/http")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/platform-browser","@angular/common","@angular/forms","@angular/common/http"],t):t(e.ng2Qgrid={},e.ng.core,null,e.ng.common,null,e.ng.common.http)}(this,function(e,u,t,n,r,i){"use strict";var o,f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g=(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,function(){function s(e){this.value=e}function e(i){var o,a;function l(e,t){try{var n=i[e](t),r=n.value;r instanceof s?Promise.resolve(r.value).then(function(e){l("next",e)},function(e){l("throw",e)}):u(n.done?"return":"normal",n.value)}catch(e){u("throw",e)}}function u(e,t){switch(e){case"return":o.resolve({value:t,done:!0});break;case"throw":o.reject(t);break;default:o.resolve({value:t,done:!1})}(o=o.next)?l(o.key,o.arg):a=null}this._invoke=function(r,i){return new Promise(function(e,t){var n={key:r,arg:i,resolve:e,reject:t,next:null};a?a=a.next=n:(o=a=n,l(r,i))})},"function"!=typeof i.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(e){return this._invoke("next",e)},e.prototype.throw=function(e){return this._invoke("throw",e)},e.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),h=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),R=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},s=(Object.assign,function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}),c=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},m=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},j=("undefined"==typeof global?self:global,function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}),b=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},d=function(){function t(e){g(this,t),this.pipes=e}return h(t,[{key:"run",value:function(i){var a,e,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=this.pipes.map(function(r){return function(n){return new Promise(function(e,t){return r(n,i,e,t)})}});return a=n,e=t,a=Array.from(a),new Promise(function(i,o){!function e(t){if(a.length){var n=a.shift(),r=n(t);r.then(e).catch(function(e){throw o(e),e})}else i(t)}(e)})}}]),t}();function I(e){var t=void 0===e?"undefined":f(e);return null!=e&&("object"==t||"function"==t)}var a="object"==("undefined"==typeof global?"undefined":f(global))&&global&&global.Object===Object&&global,l="object"==("undefined"==typeof self?"undefined":f(self))&&self&&self.Object===Object&&self,p=a||l||Function("return this")(),v=p.Symbol,y=Object.prototype,x=y.hasOwnProperty,w=y.toString,k=v?v.toStringTag:void 0;var C=Object.prototype.toString;var q="[object Null]",O="[object Undefined]",_=v?v.toStringTag:void 0;function E(e){return null==e?void 0===e?O:q:_&&_ in Object(e)?function(e){var t=x.call(e,k),n=e[k];try{var r=!(e[k]=void 0)}catch(e){}var i=w.call(e);return r&&(t?e[k]=n:delete e[k]),i}(e):(t=e,C.call(t));var t}var z="[object AsyncFunction]",S="[object Function]",P="[object GeneratorFunction]",A="[object Proxy]";function L(e){if(!I(e))return!1;var t=E(e);return t==S||t==P||t==z||t==A}var M=Array.isArray;function T(e,t){return e===t||e!=e&&t!=t}function D(e,t){for(var n=e.length;n--;)if(T(e[n][0],t))return n;return-1}var N=Array.prototype.splice;function F(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}F.prototype.clear=function(){this.__data__=[],this.size=0},F.prototype.delete=function(e){var t=this.__data__,n=D(t,e);return!(n<0||(n==t.length-1?t.pop():N.call(t,n,1),--this.size,0))},F.prototype.get=function(e){var t=this.__data__,n=D(t,e);return n<0?void 0:t[n][1]},F.prototype.has=function(e){return-1<D(this.__data__,e)},F.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var V,$=p["__core-js_shared__"],B=(V=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"";var U=Function.prototype.toString;function H(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var W=/^\[object .+?Constructor\]$/,G=Function.prototype,K=Object.prototype,Y=G.toString,Z=K.hasOwnProperty,J=RegExp("^"+Y.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q(e){return!(!I(e)||(t=e,B&&B in t))&&(L(e)?J:W).test(H(e));var t}function X(e,t){var n,r,i=(r=t,null==(n=e)?void 0:n[r]);return Q(i)?i:void 0}var ee=X(p,"Map"),te=X(Object,"create");var ne=Object.prototype.hasOwnProperty;var re=Object.prototype.hasOwnProperty;function ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oe(e,t){var n,r,i=e.__data__;return("string"==(r=void 0===(n=t)?"undefined":f(n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ie.prototype.clear=function(){this.__data__=te?te(null):{},this.size=0},ie.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ie.prototype.get=function(e){var t=this.__data__;if(te){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ne.call(t,e)?t[e]:void 0},ie.prototype.has=function(e){var t=this.__data__;return te?void 0!==t[e]:re.call(t,e)},ie.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=te&&void 0===t?"__lodash_hash_undefined__":t,this},ae.prototype.clear=function(){this.size=0,this.__data__={hash:new ie,map:new(ee||F),string:new ie}},ae.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},ae.prototype.get=function(e){return oe(this,e).get(e)},ae.prototype.has=function(e){return oe(this,e).has(e)},ae.prototype.set=function(e,t){var n=oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function le(e){var t=this.__data__=new F(e);this.size=t.size}le.prototype.clear=function(){this.__data__=new F,this.size=0},le.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},le.prototype.get=function(e){return this.__data__.get(e)},le.prototype.has=function(e){return this.__data__.has(e)},le.prototype.set=function(e,t){var n=this.__data__;if(n instanceof F){var r=n.__data__;if(!ee||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ae(r)}return n.set(e,t),this.size=n.size,this};function ue(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ae;++t<n;)this.add(e[t])}function se(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ce(e,t){return e.has(t)}ue.prototype.add=ue.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ue.prototype.has=function(e){return this.__data__.has(e)};var he=1,fe=2;function de(e,t,n,r,i,o){var a=n&he,l=e.length,u=t.length;if(l!=u&&!(a&&l<u))return!1;var s=o.get(e);if(s&&o.get(t))return s==t;var c=-1,h=!0,f=n&fe?new ue:void 0;for(o.set(e,t),o.set(t,e);++c<l;){var d=e[c],g=t[c];if(r)var m=a?r(g,d,c,t,e,o):r(d,g,c,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!se(t,function(e,t){if(!ce(f,t)&&(d===e||i(d,e,n,r,o)))return f.push(t)})){h=!1;break}}else if(d!==g&&!i(d,g,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}var ge=p.Uint8Array;function me(e){var n=-1,r=Array(e.size);return e.forEach(function(e,t){r[++n]=[t,e]}),r}function pe(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ve=1,ye=2,xe="[object Boolean]",we="[object Date]",be="[object Error]",ke="[object Map]",Ce="[object Number]",qe="[object RegExp]",Oe="[object Set]",_e="[object String]",Ie="[object Symbol]",Ee="[object ArrayBuffer]",ze="[object DataView]",Re=v?v.prototype:void 0,je=Re?Re.valueOf:void 0;function Se(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Pe(e,t,n){var r=t(e);return M(e)?r:Se(r,n(e))}function Ae(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Le(){return[]}var Me=Object.prototype.propertyIsEnumerable,Te=Object.getOwnPropertySymbols,De=Te?function(t){return null==t?[]:(t=Object(t),Ae(Te(t),function(e){return Me.call(t,e)}))}:Le;function Ne(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Fe(e){return null!=e&&"object"==(void 0===e?"undefined":f(e))}function Ve(e){return Fe(e)&&"[object Arguments]"==E(e)}var $e=Object.prototype,Be=$e.hasOwnProperty,Ue=$e.propertyIsEnumerable,He=Ve(function(){return arguments}())?Ve:function(e){return Fe(e)&&Be.call(e,"callee")&&!Ue.call(e,"callee")};var We="object"==(void 0===e?"undefined":f(e))&&e&&!e.nodeType&&e,Ge=We&&"object"==("undefined"==typeof module?"undefined":f(module))&&module&&!module.nodeType&&module,Ke=Ge&&Ge.exports===We?p.Buffer:void 0,Ye=(Ke?Ke.isBuffer:void 0)||function(){return!1},Ze=9007199254740991,Je=/^(?:0|[1-9]\d*)$/;function Qe(e,t){var n=void 0===e?"undefined":f(e);return!!(t=null==t?Ze:t)&&("number"==n||"symbol"!=n&&Je.test(e))&&-1<e&&e%1==0&&e<t}var Xe=9007199254740991;function et(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=Xe}var tt={};function nt(t){return function(e){return t(e)}}tt["[object Float32Array]"]=tt["[object Float64Array]"]=tt["[object Int8Array]"]=tt["[object Int16Array]"]=tt["[object Int32Array]"]=tt["[object Uint8Array]"]=tt["[object Uint8ClampedArray]"]=tt["[object Uint16Array]"]=tt["[object Uint32Array]"]=!0,tt["[object Arguments]"]=tt["[object Array]"]=tt["[object ArrayBuffer]"]=tt["[object Boolean]"]=tt["[object DataView]"]=tt["[object Date]"]=tt["[object Error]"]=tt["[object Function]"]=tt["[object Map]"]=tt["[object Number]"]=tt["[object Object]"]=tt["[object RegExp]"]=tt["[object Set]"]=tt["[object String]"]=tt["[object WeakMap]"]=!1;var rt="object"==(void 0===e?"undefined":f(e))&&e&&!e.nodeType&&e,it=rt&&"object"==("undefined"==typeof module?"undefined":f(module))&&module&&!module.nodeType&&module,ot=it&&it.exports===rt&&a.process,at=function(){try{var e=it&&it.require&&it.require("util").types;return e||ot&&ot.binding&&ot.binding("util")}catch(e){}}(),lt=at&&at.isTypedArray,ut=lt?nt(lt):function(e){return Fe(e)&&et(e.length)&&!!tt[E(e)]},st=Object.prototype.hasOwnProperty;function ct(e,t){var n=M(e),r=!n&&He(e),i=!n&&!r&&Ye(e),o=!n&&!r&&!i&&ut(e),a=n||r||i||o,l=a?Ne(e.length,String):[],u=l.length;for(var s in e)!t&&!st.call(e,s)||a&&("length"==s||i&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Qe(s,u))||l.push(s);return l}var ht=Object.prototype;function ft(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ht)}function dt(t,n){return function(e){return t(n(e))}}var gt=dt(Object.keys,Object),mt=Object.prototype.hasOwnProperty;function pt(e){return null!=e&&et(e.length)&&!L(e)}function vt(e){return pt(e)?ct(e):function(e){if(!ft(e))return gt(e);var t=[];for(var n in Object(e))mt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}function yt(e){return Pe(e,vt,De)}var xt=1,wt=Object.prototype.hasOwnProperty;var bt=X(p,"DataView"),kt=X(p,"Promise"),Ct=X(p,"Set"),qt=X(p,"WeakMap"),Ot="[object Map]",_t="[object Promise]",It="[object Set]",Et="[object WeakMap]",zt="[object DataView]",Rt=H(bt),jt=H(ee),St=H(kt),Pt=H(Ct),At=H(qt),Lt=E;(bt&&Lt(new bt(new ArrayBuffer(1)))!=zt||ee&&Lt(new ee)!=Ot||kt&&Lt(kt.resolve())!=_t||Ct&&Lt(new Ct)!=It||qt&&Lt(new qt)!=Et)&&(Lt=function(e){var t=E(e),n="[object Object]"==t?e.constructor:void 0,r=n?H(n):"";if(r)switch(r){case Rt:return zt;case jt:return Ot;case St:return _t;case Pt:return It;case At:return Et}return t});var Mt=Lt,Tt=1,Dt="[object Arguments]",Nt="[object Array]",Ft="[object Object]",Vt=Object.prototype.hasOwnProperty;function $t(e,t,n,r,i,o){var a=M(e),l=M(t),u=a?Nt:Mt(e),s=l?Nt:Mt(t),c=(u=u==Dt?Ft:u)==Ft,h=(s=s==Dt?Ft:s)==Ft,f=u==s;if(f&&Ye(e)){if(!Ye(t))return!1;c=!(a=!0)}if(f&&!c)return o||(o=new le),a||ut(e)?de(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case ze:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ee:return!(e.byteLength!=t.byteLength||!o(new ge(e),new ge(t)));case xe:case we:case Ce:return T(+e,+t);case be:return e.name==t.name&&e.message==t.message;case qe:case _e:return e==t+"";case ke:var l=me;case Oe:var u=r&ve;if(l||(l=pe),e.size!=t.size&&!u)return!1;var s=a.get(e);if(s)return s==t;r|=ye,a.set(e,t);var c=de(l(e),l(t),r,i,o,a);return a.delete(e),c;case Ie:if(je)return je.call(e)==je.call(t)}return!1}(e,t,u,n,r,i,o);if(!(n&Tt)){var d=c&&Vt.call(e,"__wrapped__"),g=h&&Vt.call(t,"__wrapped__");if(d||g){var m=d?e.value():e,p=g?t.value():t;return o||(o=new le),i(m,p,n,r,o)}}return!!f&&(o||(o=new le),function(e,t,n,r,i,o){var a=n&xt,l=yt(e),u=l.length;if(u!=yt(t).length&&!a)return!1;for(var s=u;s--;){var c=l[s];if(!(a?c in t:wt.call(t,c)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var f=!0;o.set(e,t),o.set(t,e);for(var d=a;++s<u;){var g=e[c=l[s]],m=t[c];if(r)var p=a?r(m,g,c,t,e,o):r(g,m,c,e,t,o);if(!(void 0===p?g===m||i(g,m,n,r,o):p)){f=!1;break}d||(d="constructor"==c)}if(f&&!d){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,i,o))}function Bt(e,t,n,r,i){return e===t||(null==e||null==t||!Fe(e)&&!Fe(t)?e!=e&&t!=t:$t(e,t,n,r,Bt,i))}var Ut="[object String]";function Ht(e){return"string"==typeof e||!M(e)&&Fe(e)&&E(e)==Ut}var Wt="[object Boolean]";function Gt(e){return!0===e||!1===e||Fe(e)&&E(e)==Wt}var Kt="[object Number]";function Yt(e){return"number"==typeof e||Fe(e)&&E(e)==Kt}var Zt=at&&at.isDate,Jt=Zt?nt(Zt):function(e){return Fe(e)&&"[object Date]"==E(e)};var Qt=function(){try{var e=X(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function Xt(e,t,n){"__proto__"==t&&Qt?Qt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var en=Object.prototype.hasOwnProperty;function tn(e,t,n){var r=e[t];en.call(e,t)&&T(r,n)&&(void 0!==n||t in e)||Xt(e,t,n)}function nn(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var l=t[o],u=r?r(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),i?Xt(n,l,u):tn(n,l,u)}return n}var rn=Object.prototype.hasOwnProperty;function on(e){if(!I(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ft(e),n=[];for(var r in e)("constructor"!=r||!t&&rn.call(e,r))&&n.push(r);return n}function an(e){return pt(e)?ct(e,!0):on(e)}var ln="object"==(void 0===e?"undefined":f(e))&&e&&!e.nodeType&&e,un=ln&&"object"==("undefined"==typeof module?"undefined":f(module))&&module&&!module.nodeType&&module,sn=un&&un.exports===ln?p.Buffer:void 0,cn=sn?sn.allocUnsafe:void 0;function hn(e,t){if(t)return e.slice();var n=e.length,r=cn?cn(n):new e.constructor(n);return e.copy(r),r}function fn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var dn=dt(Object.getPrototypeOf,Object),gn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Se(t,De(e)),e=dn(e);return t}:Le;function mn(e){return Pe(e,an,gn)}var pn=Object.prototype.hasOwnProperty;function vn(e){var t=new e.constructor(e.byteLength);return new ge(t).set(new ge(e)),t}var yn=/\w*$/;var xn=v?v.prototype:void 0,wn=xn?xn.valueOf:void 0;function bn(e,t){var n=t?vn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var kn="[object Boolean]",Cn="[object Date]",qn="[object Map]",On="[object Number]",_n="[object RegExp]",In="[object Set]",En="[object String]",zn="[object Symbol]",Rn="[object ArrayBuffer]",jn="[object DataView]",Sn="[object Float32Array]",Pn="[object Float64Array]",An="[object Int8Array]",Ln="[object Int16Array]",Mn="[object Int32Array]",Tn="[object Uint8Array]",Dn="[object Uint8ClampedArray]",Nn="[object Uint16Array]",Fn="[object Uint32Array]";function Vn(e,t,n){var r,i,o,a,l,u=e.constructor;switch(t){case Rn:return vn(e);case kn:case Cn:return new u(+e);case jn:return a=e,l=n?vn(a.buffer):a.buffer,new a.constructor(l,a.byteOffset,a.byteLength);case Sn:case Pn:case An:case Ln:case Mn:case Tn:case Dn:case Nn:case Fn:return bn(e,n);case qn:return new u;case On:case En:return new u(e);case _n:return(o=new(i=e).constructor(i.source,yn.exec(i))).lastIndex=i.lastIndex,o;case In:return new u;case zn:return r=e,wn?Object(wn.call(r)):{}}}var $n=Object.create,Bn=function(){function n(){}return function(e){if(!I(e))return{};if($n)return $n(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();function Un(e){return"function"!=typeof e.constructor||ft(e)?{}:Bn(dn(e))}var Hn=at&&at.isMap,Wn=Hn?nt(Hn):function(e){return Fe(e)&&"[object Map]"==Mt(e)};var Gn=at&&at.isSet,Kn=Gn?nt(Gn):function(e){return Fe(e)&&"[object Set]"==Mt(e)},Yn=1,Zn=2,Jn=4,Qn="[object Arguments]",Xn="[object Function]",er="[object GeneratorFunction]",tr="[object Object]",nr={};function rr(n,r,i,e,t,o){var a,l=r&Yn,u=r&Zn,s=r&Jn;if(i&&(a=t?i(n,e,t,o):i(n)),void 0!==a)return a;if(!I(n))return n;var c,h,f,d,g,m,p,v,y,x,w,b=M(n);if(b){if(x=(y=n).length,w=new y.constructor(x),x&&"string"==typeof y[0]&&pn.call(y,"index")&&(w.index=y.index,w.input=y.input),a=w,!l)return fn(n,a)}else{var k=Mt(n),C=k==Xn||k==er;if(Ye(n))return hn(n,l);if(k==tr||k==Qn||C&&!t){if(a=u||C?{}:Un(n),!l)return u?(v=g=n,m=(p=a)&&nn(v,an(v),p),nn(g,gn(g),m)):(d=c=n,h=(f=a)&&nn(d,vt(d),f),nn(c,De(c),h))}else{if(!nr[k])return t?n:{};a=Vn(n,k,l)}}o||(o=new le);var q=o.get(n);if(q)return q;if(o.set(n,a),Kn(n))return n.forEach(function(e){a.add(rr(e,r,i,e,n,o))}),a;if(Wn(n))return n.forEach(function(e,t){a.set(t,rr(e,r,i,t,n,o))}),a;var O=s?u?mn:yt:u?keysIn:vt,_=b?void 0:O(n);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(_||n,function(e,t){_&&(e=n[t=e]),tn(a,t,rr(e,r,i,t,n,o))}),a}nr[Qn]=nr["[object Array]"]=nr["[object ArrayBuffer]"]=nr["[object DataView]"]=nr["[object Boolean]"]=nr["[object Date]"]=nr["[object Float32Array]"]=nr["[object Float64Array]"]=nr["[object Int8Array]"]=nr["[object Int16Array]"]=nr["[object Int32Array]"]=nr["[object Map]"]=nr["[object Number]"]=nr[tr]=nr["[object RegExp]"]=nr["[object Set]"]=nr["[object String]"]=nr["[object Symbol]"]=nr["[object Uint8Array]"]=nr["[object Uint8ClampedArray]"]=nr["[object Uint16Array]"]=nr["[object Uint32Array]"]=!0,nr["[object Error]"]=nr[Xn]=nr["[object WeakMap]"]=!1;var ir=4;function or(e){return rr(e,ir)}var ar=1,lr=4;function ur(e,t){return rr(e,ar|lr,t="function"==typeof t?t:void 0)}function sr(e){return void 0===e}var cr="[object Symbol]";function hr(e){return"symbol"==(void 0===e?"undefined":f(e))||Fe(e)&&E(e)==cr}parseInt;Math.max,Math.min;function fr(e,t,n){(void 0===n||T(e[t],n))&&(void 0!==n||t in e)||Xt(e,t,n)}var dr,gr=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var l=o[dr?a:++r];if(!1===t(i[l],l,i))break}return e};function mr(e){return Fe(e)&&pt(e)}var pr="[object Object]",vr=Function.prototype,yr=Object.prototype,xr=vr.toString,wr=yr.hasOwnProperty,br=xr.call(Object);function kr(e,t){return"__proto__"==t?void 0:e[t]}function Cr(e,t,n,r,i,o,a){var l=kr(e,n),u=kr(t,n),s=a.get(u);if(s)fr(e,n,s);else{var c,h=o?o(l,u,n+"",e,t,a):void 0,f=void 0===h;if(f){var d=M(u),g=!d&&Ye(u),m=!d&&!g&&ut(u);h=u,d||g||m?h=M(l)?l:mr(l)?fn(l):g?hn(u,!(f=!1)):m?bn(u,!(f=!1)):[]:function(e){if(!Fe(e)||E(e)!=pr)return!1;var t=dn(e);if(null===t)return!0;var n=wr.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&xr.call(n)==br}(u)||He(u)?He(h=l)?h=nn(c=l,an(c)):(!I(l)||r&&L(l))&&(h=Un(u)):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),fr(e,n,h)}}function qr(r,i,o,a,l){r!==i&&gr(i,function(e,t){if(I(e))l||(l=new le),Cr(r,i,t,o,qr,a,l);else{var n=a?a(kr(r,t),e,t+"",r,i,l):void 0;void 0===n&&(n=e),fr(r,t,n)}},an)}function Or(e){return e}var _r=Math.max;var Ir=Qt?function(e,t){return Qt(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Or,Er=Date.now;var zr,Rr,jr,Sr=(zr=Ir,jr=Rr=0,function(){var e=Er(),t=16-(e-jr);if(jr=e,0<t){if(800<=++Rr)return arguments[0]}else Rr=0;return zr.apply(void 0,arguments)});function Pr(e,t){return Sr((o=e,l=Or,a=_r(void 0===(a=t)?o.length-1:a,0),function(){for(var e=arguments,t=-1,n=_r(e.length-a,0),r=Array(n);++t<n;)r[t]=e[a+t];t=-1;for(var i=Array(a+1);++t<a;)i[t]=e[t];return i[a]=l(r),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(o,this,i)}),e+"");var o,a,l}function Ar(l){return Pr(function(e,t){var n=-1,r=t.length,i=1<r?t[r-1]:void 0,o=2<r?t[2]:void 0;for(i=3<l.length&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!I(n))return!1;var r=void 0===t?"undefined":f(t);return!!("number"==r?pt(n)&&Qe(t,n.length):"string"==r&&t in n)&&T(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var a=t[n];a&&l(e,a,n,i)}return e})}Ar(function(e,t,n){qr(e,t,n)});var Lr=v?v.isConcatSpreadable:void 0;function Mr(e){return M(e)||He(e)||!!(Lr&&e&&e[Lr])}function Tr(e){return(null==e?0:e.length)?function e(t,n,r,i,o){var a=-1,l=t.length;for(r||(r=Mr),o||(o=[]);++a<l;){var u=t[a];0<n&&r(u)?1<n?e(u,n-1,r,i,o):Se(o,u):i||(o[o.length]=u)}return o}(e,1):[]}var Dr,Nr=(Dr={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==Dr?void 0:Dr[e]});function Fr(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Vr=1/0,$r=v?v.prototype:void 0,Br=$r?$r.toString:void 0;function Ur(e){if("string"==typeof e)return e;if(M(e))return Fr(e,Ur)+"";if(hr(e))return Br?Br.call(e):"";var t=e+"";return"0"==t&&1/e==-Vr?"-0":t}function Hr(e){return null==e?"":Ur(e)}var Wr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Gr=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Kr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Yr=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Zr="\\ud800-\\udfff",Jr="\\u2700-\\u27bf",Qr="a-z\\xdf-\\xf6\\xf8-\\xff",Xr="A-Z\\xc0-\\xd6\\xd8-\\xde",ei="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ti="["+ei+"]",ni="\\d+",ri="["+Jr+"]",ii="["+Qr+"]",oi="[^"+Zr+ei+ni+Jr+Qr+Xr+"]",ai="(?:\\ud83c[\\udde6-\\uddff]){2}",li="[\\ud800-\\udbff][\\udc00-\\udfff]",ui="["+Xr+"]",si="(?:"+ii+"|"+oi+")",ci="(?:"+ui+"|"+oi+")",hi="(?:['’](?:d|ll|m|re|s|t|ve))?",fi="(?:['’](?:D|LL|M|RE|S|T|VE))?",di="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",gi="[\\ufe0e\\ufe0f]?",mi=gi+di+("(?:\\u200d(?:"+["[^"+Zr+"]",ai,li].join("|")+")"+gi+di+")*"),pi="(?:"+[ri,ai,li].join("|")+")"+mi,vi=RegExp([ui+"?"+ii+"+"+hi+"(?="+[ti,ui,"$"].join("|")+")",ci+"+"+fi+"(?="+[ti,ui+si,"$"].join("|")+")",ui+"?"+si+"+"+hi,ui+"+"+fi,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ni,pi].join("|"),"g");function yi(e,t,n){return e=Hr(e),void 0===(t=n?void 0:t)?(r=e,Yr.test(r)?e.match(vi)||[]:e.match(Kr)||[]):e.match(t)||[];var r}var xi=RegExp("['’]","g");function wi(e,t,n){var r=-1,i=e.length;t<0&&(t=i<-t?0:i+t),(n=i<n?i:n)<0&&(n+=i),i=n<t?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}var bi=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function ki(e){return bi.test(e)}var Ci="\\ud800-\\udfff",qi="["+Ci+"]",Oi="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",_i="\\ud83c[\\udffb-\\udfff]",Ii="[^"+Ci+"]",Ei="(?:\\ud83c[\\udde6-\\uddff]){2}",zi="[\\ud800-\\udbff][\\udc00-\\udfff]",Ri="(?:"+Oi+"|"+_i+")"+"?",ji="[\\ufe0e\\ufe0f]?",Si=ji+Ri+("(?:\\u200d(?:"+[Ii,Ei,zi].join("|")+")"+ji+Ri+")*"),Pi="(?:"+[Ii+Oi+"?",Oi,Ei,zi,qi].join("|")+")",Ai=RegExp(_i+"(?="+_i+")|"+Pi+Si,"g");function Li(e){return ki(e)?e.match(Ai)||[]:e.split("")}var Mi,Ti,Di=(Mi="toUpperCase",function(e){var t,n,r,i,o=ki(e=Hr(e))?Li(e):void 0,a=o?o[0]:e.charAt(0),l=o?(t=o,n=1,i=t.length,r=void 0===r?i:r,!n&&i<=r?t:wi(t,n,r)).join(""):e.slice(1);return a[Mi]()+l}),Ni=(Ti=function(e,t,n){return e+(n?" ":"")+Di(t)},function(e){return function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}(yi((t=e,(t=Hr(t))&&t.replace(Wr,Nr).replace(Gr,"")).replace(xi,"")),Ti,"");var t}),Fi=Ar(function(e,t,n,r){nn(t,vt(t),e,r)});function Vi(e){return e!=e}function $i(e,t){var n,r,i;return!!(null==e?0:e.length)&&(n=e,i=0,-1<((r=t)==r?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(n,r,i):function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(n,Vi,i)))}function Bi(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Ui=Ct&&1/pe(new Ct([,-0]))[1]==1/0?function(e){return new Ct(e)}:function(){},Hi=200;function Wi(e){return e&&e.length?function(e,t,n){var r=-1,i=$i,o=e.length,a=!0,l=[],u=l;if(n)a=!1,i=Bi;else if(Hi<=o){var s=t?null:Ui(e);if(s)return pe(s);a=!1,i=ce,u=new ue}else u=t?[]:l;e:for(;++r<o;){var c=e[r],h=t?t(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue e;t&&u.push(h),l.push(c)}else i(u,h,n)||(u!==l&&u.push(h),l.push(c))}return l}(e):[]}var Gi=1,Ki=2;function Yi(e){return e==e&&!I(e)}function Zi(t,n){return function(e){return null!=e&&(e[t]===n&&(void 0!==n||t in Object(e)))}}function Ji(t){var n=function(e){for(var t=vt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Yi(i)]}return t}(t);return 1==n.length&&n[0][2]?Zi(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){var u=(l=n[i])[0],s=e[u],c=l[1];if(a&&l[2]){if(void 0===s&&!(u in e))return!1}else{var h=new le;if(r)var f=r(s,c,u,e,t,h);if(!(void 0===f?Bt(c,s,Gi|Ki,r,h):f))return!1}}return!0}(e,t,n)}}var Qi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xi=/^\w*$/;function eo(e,t){if(M(e))return!1;var n=void 0===e?"undefined":f(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!hr(e))||(Xi.test(e)||!Qi.test(e)||null!=t&&e in Object(t))}var to="Expected a function";function no(o,a){if("function"!=typeof o||null!=a&&"function"!=typeof a)throw new TypeError(to);var e=function e(){var t=arguments,n=a?a.apply(this,t):t[0],r=e.cache;if(r.has(n))return r.get(n);var i=o.apply(this,t);return e.cache=r.set(n,i)||r,i};return e.cache=new(no.Cache||ae),e}no.Cache=ae;var ro,io,oo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ao=/\\(\\)?/g,lo=(io=(ro=no(function(e){var i=[];return 46===e.charCodeAt(0)&&i.push(""),e.replace(oo,function(e,t,n,r){i.push(n?r.replace(ao,"$1"):t||e)}),i},function(e){return 500===io.size&&io.clear(),e})).cache,ro);function uo(e,t){return M(e)?e:eo(e,t)?[e]:lo(Hr(e))}var so=1/0;function co(e){if("string"==typeof e||hr(e))return e;var t=e+"";return"0"==t&&1/e==-so?"-0":t}function ho(e,t){for(var n=0,r=(t=uo(t,e)).length;null!=e&&n<r;)e=e[co(t[n++])];return n&&n==r?e:void 0}function fo(e,t){return null!=e&&t in Object(e)}function go(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=uo(t,e)).length,o=!1;++r<i;){var a=co(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&et(i)&&Qe(a,i)&&(M(e)||He(e))}(e,t,fo)}var mo=1,po=2;function vo(a,l){return eo(a)&&Yi(l)?Zi(co(a),l):function(e){var t,n,r,i,o=(n=a,void 0===(i=null==(t=e)?void 0:ho(t,n))?r:i);return void 0===o&&o===l?go(e,a):Bt(l,o,mo|po)}}function yo(t){return function(e){return null==e?void 0:e[t]}}function xo(e){return eo(e)?yo(co(e)):(t=e,function(e){return ho(e,t)});var t}function wo(e){return"function"==typeof e?e:null==e?Or:"object"==(void 0===e?"undefined":f(e))?M(e)?vo(e[0],e[1]):Ji(e):xo(e)}function bo(e,t){return e&&e.length?function(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}(e,wo(t)):0}function ko(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(void 0===l?a==a&&!hr(a):n(a,l)))var l=a,u=o}return u}function Co(e,t){return t<e}function qo(e,t){return e&&e.length?ko(e,wo(t),Co):void 0}function Oo(e,t){return e<t}function _o(e,t){return e&&e.length?ko(e,wo(t),Oo):void 0}var Io=Math.max;var Eo=Pr(function(t){if(!t||!t.length)return[];var n=0;return t=Ae(t,function(e){if(mr(e))return n=Io(e.length,n),!0}),Ne(n,function(e){return Fr(t,yo(e))})});function zo(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?wi(e,r?0:o,r?o+1:i):wi(e,r?o+1:0,r?i:o)}function Ro(e,t){return e&&e.length?zo(e,wo(t),!0):[]}function jo(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}var So,Po,Ao=(So=function(e,t){return e&&gr(e,t,vt)},function(e,t){if(null==e)return e;if(!pt(e))return So(e,t);for(var n=e.length,r=Po?n:-1,i=Object(e);(Po?r--:++r<n)&&!1!==t(i[r],r,i););return e});function Lo(e,r,i,o){return Ao(e,function(e,t,n){r(o,e,i(e),n)}),o}var Mo,To,Do=Object.prototype.hasOwnProperty,No=(Mo=function(e,t,n){Do.call(e,n)?e[n].push(t):Xt(e,n,[t])},function(){}),Fo=function(){return!0},Vo=function(){return!1},$o=function(e){return e},Bo=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.length,i=t.map(function(e){return""+e});return 0<r?i[0]+i.slice(1).map(function(e){return e[0].toUpperCase()+e.substring(1,e.length)}).join(""):""},Uo=function(e){if(e){return/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(e)}return!1};function Ho(e,t){return e===t?0:t<e?1:-1}function Wo(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Go(e){return e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e}function Ko(e,t){for(var n=0,r=e.length;n<r;){var i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function Yo(e){var t=e.split("."),n=t.length-1,r=Qo(t,n),i=t[n];return r?function(e,t){return 2===arguments.length&&(r(e)[i]=t),r(e)[i]}:function(e,t){return 2===arguments.length&&(e[i]=t),e[i]}}function Zo(e){var t=e.split("."),n=t.length-1,r=Qo(t,n),i=t[n];return r?function(e){return r(e)[i]}:function(e){return e[i]}}function Jo(e){var t=e.split("."),n=t.length-1,r=Qo(t,n),i=t[n];return r?function(e,t){r(e)[i]=t}:function(e,t){e[i]=t}}function Qo(e,n){return e.filter(function(e,t){return t!==n}).reduce(function(t,n){return t?function(e){return t(e)[n]}:function(e){return e[n]}},null)}var Xo=function(e){function r(e,t){g(this,r);var n=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t));return n.name=n.constructor.name,n.message="qgrid."+e+": "+t,L(Error.captureStackTrace)?Error.captureStackTrace(n,n.constructor):n.stack=new Error(t).stack,n}return c(r,e),r}(Error);function ea(e,t){return t.$value?t.$value({$row:e,$column:t}):t.value?t.value(e):t.path?Zo(t.path)(e):e[t.key]}function ta(t){return t.$value?function(e){return t.$value({$row:e,$column:t})}:t.value?function(e){return t.value(e)}:t.path?Zo(t.path):function(e){return e[t.key]}}function na(e,t,n){if(L(t.$value))return t.$value({$row:e,$value:n,$column:t});if(L(t.value))return t.value(e,n);if(t.path)return Jo(t.path)(e,n);if(e.hasOwnProperty(t.key))return e[t.key]=n;throw new Xo("value","Row can't be edit on \""+t.key+'" column')}function ra(e,t){return t.$label?L(t.$label)?t.$label({$row:e}):t.$label:t.label?L(t.label)?t.label(e):t.label:t.labelPath?Zo(t.labelPath)(e):ea(e,t)}function ia(t){return t.$label?L(t.$label)?function(e){return t.$label({$row:e})}:function(e){return t.label}:t.label?L(t.label)?function(e){return t.label(e)}:function(e){return t.label}:t.labelPath?Zo(t.labelPath):function(e){return ea(e,t)}}function oa(e,t,n){return L(t.$label)?t.$label({$row:e,$label:n}):L(t.label)?t.label(e,n):t.labelPath?Jo(t.labelPath)(e,n):void 0}var aa=function(){function e(){g(this,e)}return h(e,null,[{key:"info",value:function(){}},{key:"warn",value:function(){}},{key:"error",value:function(e,t){console.error("qgrid."+e+": "+t)}}]),e}();function la(){function e(e){var t=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+t.substr(0,4)+"-"+t.substr(4,4):t}return e()+e(!0)+e(!0)+e()}var ua=function(){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(){return null};g(this,t),this.handlers=[],this.isDirty=!1,this.e=e}return h(t,[{key:"on",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"app",n=this.handlers,r={f:e},i=function(){var e=n.indexOf(r);0<=e&&n.splice(e,1)};return r.off=i,r.lifecycle=t,n.push(r),i}},{key:"watch",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"app",n=this.on(e,t);return this.isDirty&&e(this.e(),n),n}},{key:"emit",value:function(e){this.isDirty=!0;for(var t=Array.from(this.handlers),n=0,r=t.length;n<r;n++){var i=t[n];i.f(e,i.off)}}},{key:"dispose",value:function(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=Array.from(this.handlers),n=0,r=t.length;n<r;n++){var i=t[n];e&&i.lifecycle!==e||i.off()}}}]),t}(),sa=Object.prototype.hasOwnProperty,ca=function(){function n(){g(this,n)}return h(n,null,[{key:"notUndefined",value:function(e,t){if(sr(e))throw new Xo("guard.notUndefined",t)}},{key:"notNull",value:function(e,t){if(null===e||sr(e))throw new Xo("guard.notNull",t)}},{key:"notNullOrEmpty",value:function(e,t){if(null===e||sr(e)||""===e)throw new Xo("guard.notNullOrEmpty",t)}},{key:"invokable",value:function(e,t){if(!L(e))throw new Xo("guard.invokable",t)}},{key:"hasProperty",value:function(e,t){if(n.notNull(e,"instance"),!sa.call(e,t))throw new Xo("guard.hasProperty",t)}}]),n}(),ha={},fa=!1,da=function(){function l(){var e=this;g(this,l);var t=fa=!0,n=!1,r=void 0;try{for(var i,o=function(){var h=i.value,f=new ha[h],d=new Set,g=new ua(function(){var e=Array.from(d.values()).reduce(function(e,t){var n=f[t];return e[t]={newValue:n,oldValue:n},e},{});return{state:f,hasChanges:e.hasOwnProperty.bind(e),changes:e,tag:{},source:"watch"}}),m=l.equals;e[h+"Changed"]=g,e[h]=function(e,t){var n=arguments.length;if(n){if(!I(e))throw new Xo("model."+h,'"'+e+'" is not a valid type, should be an object');for(var r=!1,i={},o=Object.keys(e),a=0,l=o.length;a<l;a++){var u=o[a];if(!f.hasOwnProperty(u))throw new Xo("model."+h,'"'+u+'" is not a valid key, only ['+Object.keys(f).join(", ")+"] keys are supported");var s=e[u],c=f[u];m(s,c)||(ca.notUndefined(s,"model."+h+"."+u),f[u]=s,r=!0,i[u]={newValue:s,oldValue:c},d.add(u))}return r&&g.emit({state:f,hasChanges:i.hasOwnProperty.bind(i),changes:i,tag:1<n?t:{},source:"emit"}),this}return f}},a=Object.keys(ha)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0)o()}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}}return h(l,null,[{key:"equals",value:function(e,t){return e===t||(!(!M(e)||0!==e.length||0!==t.length)||(e instanceof Map&&0===e.size&&0===t.size||e instanceof Set&&0===e.size&&0===t.size))}},{key:"register",value:function(e,t){if(ha.hasOwnProperty(e))throw new Xo("model",'"'+e+'" is already registered');if(!L(t))throw new Xo("model."+e,'"'+t+'" is not a valid type, should be an constructor function');if(fa)throw new Xo("model."+e,"can't register, registration was closed");return ha[e]=t,l}}]),l}(),ga=function(){function t(e){g(this,t),this.model=e}return h(t,[{key:"save",value:function(e){var t=this.model;e=e||t.persistence().settings;var n={};for(var r in e){var i=t[r](),o={};n[r]=o;var a=!0,l=!1,u=void 0;try{for(var s,c=e[r][Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var h=s.value,f=i[h];o[h]=or(f)}}catch(e){l=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(l)throw u}}}return n}},{key:"load",value:function(e,t){var n=this.model;for(var r in t=t||n.persistence().settings){var i=e[r];if(i)(0,n[r])(i,{source:"persistence.service"})}return e}},{key:"reset",value:function(e){var t=new da,n=this.model;e=e||n.persistence().settings;var r={};for(var i in e){r[i]={};var o=t[i],a=n[i],l=!0,u=!1,s=void 0;try{for(var c,h=e[i][Symbol.iterator]();!(l=(c=h.next()).done);l=!0){var f=c.value;r[i][f]=o()[f]}}catch(e){u=!0,s=e}finally{try{!l&&h.return&&h.return()}finally{if(u)throw s}}a(r[i],{source:"behavior.core"})}return r}}]),t}(),ma=function(){function e(){g(this,e),this.tasks=[]}return h(e,[{key:"next",value:function(){this.tasks.shift();var e=this.tasks[0];return!!e&&(e(),!0)}},{key:"add",value:function(e){return this.tasks.push(e),1===this.tasks.length&&e(),this.tasks.length}}]),e}(),pa=function(){function e(){g(this,e),this.promise=new va}return h(e,[{key:"reject",value:function(){this.promise.reject()}},{key:"resolve",value:function(){this.promise.resolve()}}]),e}(),va=function(){function e(){g(this,e),this.catchEvent=new ua,this.thenEvent=new ua}return h(e,[{key:"reject",value:function(){this.catchEvent.emit()}},{key:"resolve",value:function(){this.thenEvent.emit()}},{key:"catch",value:function(e){this.catchEvent.on(e)}},{key:"then",value:function(e){this.thenEvent.on(e)}}]),e}(),ya=function(){function t(){g(this,t),this.disposes=[]}return h(t,[{key:"using",value:function(e){return e instanceof t?this.disposes.push(function(){return e.dispose()}):(ca.invokable(e,"instance"),this.disposes.push(e)),e}},{key:"dispose",value:function(){var e=this.disposes,t=!0,n=!(this.disposes=[]),r=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;a()}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}}]),t}(),xa=function(){function t(e){g(this,t),this.model=e}return h(t,[{key:"activate",value:function(e,t){var n=this.model,r=n.focus,i=n.scene,o=n.sceneChanged,a=or(r());sr(e)||(a.rowIndex=e),sr(t)||(a.columnIndex=t);var l=function(){var e=a.rowIndex,t=a.columnIndex;if(0<=e&&0<=t)r({isActive:!0,rowIndex:e,columnIndex:t},{source:"focus.service"});else{var n=i().column.line.findIndex(function(e){return e.model.canFocus});r({isActive:!0,rowIndex:0,columnIndex:n},{source:"focus.service"})}};"stop"===i().status?l():o.on(function(e,t){e.hasChanges("status")&&"stop"===e.state.status&&(l(),t())})}}]),t}(),wa=function(e){function r(e,n){g(this,r);var t=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return t.using(e.sceneChanged.on(function(e,t){"stop"===e.state.status&&(n.view.focus(),t())})),t}return c(r,ya),r}(),ba="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ka(e,t){return e(t={exports:{}},t.exports),t.exports}var Ca=ka(function(u){!function(e){var i=function(){},t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function n(){this.reads=[],this.writes=[],this.raf=t.bind(e),i("initialized",this)}function o(e){e.scheduled||(e.scheduled=!0,e.raf(function(e){i("flush");var t,n=e.writes,r=e.reads;try{i("flushing reads",r.length),a(r),i("flushing writes",n.length),a(n)}catch(e){t=e}e.scheduled=!1,(r.length||n.length)&&o(e);if(t){if(i("task errored",t.message),!e.catch)throw t;e.catch(t)}}.bind(null,e)),i("flush scheduled"))}function a(e){var t;for(i("run tasks");t=e.shift();)t()}function r(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}n.prototype={constructor:n,measure:function(e,t){i("measure");var n=t?e.bind(t):e;return this.reads.push(n),o(this),n},mutate:function(e,t){i("mutate");var n=t?e.bind(t):e;return this.writes.push(n),o(this),n},clear:function(e){return i("clear",e),r(this.reads,e)||r(this.writes,e)},extend:function(e){if(i("extend",e),"object"!=(void 0===e?"undefined":f(e)))throw new Error("expected object");var t=Object.create(this);return function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};var l=e.fastdom=e.fastdom||new n;u.exports=l}("undefined"!=typeof window?window:ba)}),qa=function(){function t(){g(this,t)}return h(t,null,[{key:"mutate",value:function(e){return t.invoke(function(){return Ca.mutate(e)})}},{key:"measure",value:function(e){return t.invoke(function(){return Ca.measure(e)})}},{key:"clear",value:function(e){return t.invoke(function(){return Ca.clear(e)})}},{key:"invoke",value:function(e){return e()}}]),t}();var Oa=function(){function t(e){g(this,t),this.model=e,this.scheduler=new ma,this.state=new ga(e)}return h(t,[{key:"invalidate",value:function(){var a,e=function(){return arguments.length?Ht(arguments.length<=0?void 0:arguments[0])?{source:arguments.length<=0?void 0:arguments[0],changes:(arguments.length<=1?void 0:arguments[1])||{},pipe:arguments.length<=2?void 0:arguments[2],why:"refresh"}:Object.assign({source:"invalidate",changes:{},pipe:null,why:"refresh"},arguments.length<=0?void 0:arguments[0]):{source:"invalidate",changes:{},pipe:null,why:"refresh"}}.apply(void 0,arguments),t=e.source,n=e.changes,r=e.pipe,i=e.why,o=this.scheduler,l=this.model,u=l.scene,s=(a=l,function(e,t,n){var r=new d(n),i={model:a,source:e,changes:t,valueFactory:ta,labelFactory:ia},o=a.data().rows;return r.run(i,o)}),c="refresh"===i?this.busy():No,h=function(){c(),o.next()||u({status:"pull"},{source:t,behavior:"core"})},f=new pa;return aa.info("grid","add task "+t),o.add(function(){return aa.info("grid","start task "+t),u({status:"start"},{source:t,behavior:"core"}),l.head().cache.clear(),l.body().cache.clear(),l.foot().cache.clear(),qa.invoke(function(){return s(t,n,r||l.data().pipe)}).then(function(){aa.info("grid","finish task "+t),h(),f.resolve()}).catch(function(e){aa.error("grid",e),h(),f.reject()})}),f.promise}},{key:"busy",value:function(){var n=la(),r=this.model.progress,e=r().queue.concat([n]);return r({queue:e}),function(){var e=Array.from(r().queue),t=e.indexOf(n);0<=t&&(e.splice(t,1),r({queue:e}))}}},{key:"focus",value:function(e,t){var n=new xa(this.model);n.activate(e,t)}}]),t}(),_a="q-grid",Ia=function e(){g(this,e),this.id=_a+"-"+la(),this.status="unbound",this.caption="",this.interactionMode=0,this.title=""},Ea=function(){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,n),this.execute=Fo,this.canExecute=Fo,this.shortcut="",this.priority=0,this.source="",this.sink=null,Object.assign(this,e)}return h(n,[{key:"clone",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=new n(this);return Object.assign(t,e),t}}]),n}(),za={},Ra=function(){function n(){g(this,n)}return h(n,null,[{key:"register",value:function(e,t){if(za.hasOwnProperty(e))throw new Xo("template.path",'"'+e+'" is already registered');return za[e]=t,n}},{key:"get",value:function(e){var t=this.find(e);if(!t)throw new Xo("template.path","Template path can't be found");return t}},{key:"find",value:function(e){var t=this.name,n=!0,r=!1,i=void 0;try{for(var o,a=Object.keys(za)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value,u=e[t(l)];if(!sr(u)&&null!==u){var s=za[l](e,u);if(s)return s}}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return null}},{key:"name",value:function(e){return"_"+e}},{key:"require",get:function(){var n=this.name;return Object.keys(za).reduce(function(e,t){return e[n(t)]="^^?"+t,e},{})}}]),n}();Ra.register("custom-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("custom-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var ja=function(){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"text";g(this,t),this.key=null,this.path=null,this.labelPath=null,this.type=e,this.title=null,this.description=null,this.pin=null,this.origin="specific",this.source="user",this.class="data",this.editor=null,this.editorOptions={modelFactory:function(){return new Model},trigger:"click",cruise:"control",label:null,value:$o,actions:[]},this.width=null,this.minWidth=20,this.maxWidth=null,this.viewWidth=null,this.widthMode="relative",this.canEdit=!0,this.canResize=!0,this.canSort=!0,this.canMove=!0,this.canFilter=!0,this.canHighlight=!0,this.canFocus=!0,this.isVisible=!0,this.index=-1,this.value=null,this.label=null,this.compare=Ho,this.children=[],this.$label=null,this.$value=null}return h(t,[{key:"toString",value:function(){return this.type+": "+this.title}}]),t}(),Sa=function(){function t(e){g(this,t),this.model=e,this.colspan=1,this.rowspan=1,this.rowIndex=-1,this.columnIndex=-1}return h(t,null,[{key:"model",value:function(e){return e?t.assign(e):e=new ja,e.origin="custom",e}},{key:"assign",value:function(e){var t=this.model(),n=!0,r=!1,i=void 0;try{for(var o,a=Object.keys(t)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;if(e.hasOwnProperty(l)){var u=e[l];M(u)?e[l]=Array.from(u):I(u)&&!L(u)&&(e[l]=Object.assign({},t[l],u))}else{var s=t[l];L(s)&&(s=s.bind(e)),e[l]=s}}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return e}}]),t}(),Pa=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.isDefault=!0,e.aggregation=null,e.aggregationOptions={distinct:!1,separator:"; "},e}return c(t,ja),t}(),Aa=function(){function e(){g(this,e)}return h(e,null,[{key:"number",value:function(e,t){return e}},{key:"date",value:function(e,t){return e}},{key:"currency",value:function(e,t){return e}}]),e}();Ra.register("array-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("array-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var La=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"array"));return e.itemType="text",e.itemLabel=$o,e.itemFormat="",e.label=function(e){var t=ea(e,this);if(M(t)){var n=void 0;switch(this.itemType){case"number":n=Aa.number;break;case"date":n=Aa.date;break;default:n=this.itemLabel.bind(this)}var r=this.itemFormat;return t.map(function(e){return n(e,r)}).join(", ")}return t},e}return c(t,Pa),t}(),Ma=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new La}}]),t}();Ra.register("bool-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("bool-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var Ta=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"bool"));return e.trueValue=!0,e.falseValue=!1,e.editorOptions.cruise="transparent",e.isIndeterminate=function(e){return!(e===this.trueValue||e===this.falseValue)},e.isChecked=function(e){return e===this.trueValue},e}return c(t,Pa),t}(),Da=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new Ta}}]),t}();Ra.register("cohort-cell",function(e){return{model:e.for,resource:e.for+"."+e.type}});var Na=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"cohort"));return e.key="$cohort",e.canEdit=!1,e.canSort=!1,e.canResize=!1,e.canFocus=!1,e.canFilter=!1,e.class="cohort",e}return c(t,ja),t}(),Fa=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new Na}}]),t}();Ra.register("currency-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("currency-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var Va=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"currency"));return e.maxLength=20,e.symbol="$",e.code="USD",e}return c(t,Pa),t}(),$a=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new Va}}]),t}();Ra.register("date-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("date-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var Ba=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"date"));return e.format="MM/dd/yyyy",e}return c(t,Pa),t}(),Ua=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new Ba}}]),t}();Ra.register("email-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("email-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var Ha=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"email"));return e.editorOptions.trigger="custom",e}return c(t,Pa),t}(),Wa=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new Ha}}]),t}();function Ga(e){return!!e&&-1<e.toLowerCase().search(/png|jpg|jpeg|svg/)}Ra.register("file-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("file-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var Ka=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"file"));return e.canUpload=Fo,e.editorOptions.trigger="custom",e.hasPreview=function(e){return Ga(e)},e.canSort=!1,e.canFilter=!1,e}return c(t,Pa),t}(),Ya=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new Ka}}]),t}();Ra.register("group-cell",function(e,t){return{model:e.for,resource:t.type}}),Ra.register("group-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var Za=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"group"));return e.key="$group",e.path="key",e.labelPath="key",e.title="Group",e.offset=24,e.canEdit=!1,e.canSort=!1,e.canFilter=!1,e.class="control",e.by=null,e.label=function(e){if("row"===e.type)return"";var t=this.by,n=this.labelPath;return t&&t!==e.source?"":e[n]},e}return c(t,ja),t}(),Ja=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new Za}}]),t}();Ra.register("group-summary-cell",function(e,t){return{model:e.for,resource:t.key}});var Qa=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"group-summary"));return e.key="$group.summary",e.class="control",e.canEdit=!1,e.canResize=!1,e.canHighlight=!1,e.canFilter=!1,e.canSort=!1,e.canMove=!1,e}return c(t,Pa),t}(),Xa=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new Qa}}]),t}();Ra.register("id-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("id-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var el=function(e){function t(){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"id"))}return c(t,Pa),t}(),tl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new el}}]),t}();Ra.register("image-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("image-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var nl=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"image"));return e.canSort=!1,e.canFilter=!1,e.canUpload=Fo,e.hasPreview=function(e){return Ga(e)},e}return c(t,Pa),t}(),rl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new nl}}]),t}();Ra.register("number-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("number-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var il=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"number"));return e.format="",e}return c(t,Pa),t}(),ol=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new il}}]),t}();Ra.register("pad-cell",function(e){return{model:e.for,resource:e.for+"."+e.type}});var al=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"pad"));return e.key="$pad",e.class="markup",e.title="",e.canEdit=!1,e.canSort=!1,e.canResize=!1,e.canHighlight=!1,e.canFocus=!1,e.canMove=!1,e.canFilter=!1,e.source="generation",e}return c(t,ja),t}(),ll=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new al}}]),t}();Ra.register("password-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("password-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var ul=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"password"));return e.canSort=!1,e.canFilter=!1,e}return c(t,Pa),t}(),sl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new ul}}]),t}();Ra.register("pivot-cell",function(e){return{model:"pivot",resource:e.for}});var cl=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"pivot"));return e.key="$pivot",e.title="Pivot",e.source="generation",e.class="pivot",e.canEdit=!1,e.canSort=!1,e.canResize=!1,e.canFilter=!1,e.canMove=!1,e}return c(t,ja),t}(),hl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new cl}}]),t}();Ra.register("reference-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("reference-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var fl=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"reference"));return e.editorOptions.trigger="custom",e}return c(t,Pa),t}(),dl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new fl}}]),t}();Ra.register("row-details-cell",function(e,t){return{model:e.for,resource:t.key}});var gl=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"row-details"));return e.key="$row.details",e.class="control",e.canEdit=!1,e.canResize=!1,e.canHighlight=!1,e.canFilter=!1,e.canSort=!1,e.canMove=!1,e}return c(t,ja),t}(),ml=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new gl}}]),t}();Ra.register("row-expand-cell",function(e,t){return{model:e.for,resource:t.key}});var pl=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"row-expand"));return e.key="$row.expand",e.class="control",e.canEdit=!1,e.canResize=!1,e.canFilter=!1,e.canSort=!1,e.canHighlight=!1,e.canMove=!1,e}return c(t,ja),t}(),vl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new pl}}]),t}();Ra.register("row-indicator-cell",function(e,t){return{model:e.for,resource:t.key}});var yl=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"row-indicator"));return e.key="$row.indicator",e.class="control",e.canEdit=!1,e.canSort=!1,e.canResize=!1,e.canMove=!1,e.canFocus=!1,e.canHighlight=!1,e.canFilter=!1,e.pin="left",e}return c(t,ja),t}(),xl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new yl}}]),t}();Ra.register("row-number-cell",function(e,t){return{model:e.for,resource:t.key}});var wl=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"row-number"));return e.pin="left",e.key="$row.number",e.title="No.",e.canEdit=!1,e.canResize=!0,e.canFocus=!1,e.canMove=!1,e.canHighlight=!1,e.canSort=!1,e.canFilter=!1,e.class="control",e}return c(t,ja),t}(),bl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new wl}}]),t}();Ra.register("row-options-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("row-options-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var kl=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"row-options"));return e.key="$row.options",e.class="control",e.canEdit=!0,e.canResize=!1,e.canMove=!1,e.canHighlight=!1,e.canFilter=!1,e.pin="right",e}return c(t,Pa),t}(),Cl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new kl}}]),t}();Ra.register("select-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("select-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var ql=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"select"));return e.key="$select",e.title="",e.class="control",e.canEdit=!1,e.editorOptions.cruise="transparent",e.value=No,e.canResize=!1,e}return c(t,ja),t}(),Ol=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new ql}}]),t}();Ra.register("text-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("text-cell-edit",function(e,t){return{model:"edit",resource:t.key}}),Ra.register("text-area-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var _l=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"text"));return e.maxLength=140,e}return c(t,Pa),t}(),Il=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new _l}}]),t}();Ra.register("time-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("time-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var El=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"time"));return e.format="h:mm a",e}return c(t,Pa),t}(),zl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new El}}]),t}();Ra.register("url-cell",function(e,t){return{model:e.for,resource:t.key}}),Ra.register("url-cell-edit",function(e,t){return{model:"edit",resource:t.key}});var Rl=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"url"));return e.editorOptions.trigger="custom",e}return c(t,Pa),t}(),jl=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Sa),h(t,null,[{key:"model",value:function(e){return e?t.assign(e):new Rl}}]),t}();function Sl(e,t){return e&&t?Fi(e,t,function(e,t){return sr(e)?t:e}):e||or(t)}function Pl(e){var o=e.columnList,a={array:Ma,bool:Da,cohort:Fa,currency:$a,custom:Sa,date:Ua,email:Wa,file:Ya,group:Ja,id:tl,image:rl,number:ol,pad:ll,password:sl,pivot:hl,reference:dl,"row-details":ml,"row-expand":vl,"row-indicator":xl,"row-number":bl,"row-options":Cl,select:Ol,"group-summary":Xa,text:Il,time:zl,url:jl},n=function(e,t,n){var r=a[e],i=o().reference;return n=Sl(n=Sl(n,i.$default),i[t]),new r(r.model(n))};return function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return e||(e="text"),a.hasOwnProperty(e)?n(e,e,t):n("custom",e,t)}}function Al(e,t){switch(e){case"id":e=t||"text"}switch(e){case"text":case"email":case"url":case"password":return Tl;case"number":case"currency":return Nl;case"time":case"date":return Dl;case"bool":return Ml;case"array":return Fl;default:return $o}}function Ll(e){if(M(e)){if(e.length)if(!function(e){switch(e){case"date":case"bool":case"text":case"number":case"email":case"url":return!0;default:return!1}}(Ll(e[0])))return"collection";return"array"}return null===Nl(e)||isNaN(e)?null!==Ml(e)?"bool":null!==Dl(e)?"date":Uo(e)?"email":null!=(""+e).match(/\.(jpeg|jpg|gif|png)$/)?"image":(t=e,(n=document.createElement("a")).href=t,n.host&&n.host!=window.location.host?"url":Ht(e)?"text":I(e)?"object":"text"):"number";var t,n}function Ml(e){return Gt(e)?e:"true"===e||"false"!==e&&null}function Tl(e){return null!==e?""+e:null}function Dl(e){if(null===e)return null;if(e instanceof Date)return e;var t=(e=""+e).match(/^(\d{4})(-(\d{2})(-(\d{2})([T ](\d{2}):(\d{2})(:(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/);if(t){var n=Date.UTC(t[1],t[3]?t[3]-1:0,t[5]||1,t[7]||0,t[8]||0,t[10]||0,t[12]?1e3*Number("0."+t[12]):0),r=new Date(n);return t[13]&&t[14]&&r.setUTCMinutes(r.getUTCMinutes()+("-"==t[15]?1:-1)*(60*Number(t[16])+(t[18]?Number(t[18]):0))),r}return null}function Nl(e){var t=parseFloat(e);return!isNaN(t)&&isFinite(t)?t:null}function Fl(e){return M(e)?e:null}function Vl(e,t){var p,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=void 0;return r=n?function(e,t){return sr(t)||null===t?e:t}:function(e,t){return sr(t)||null===t||null!==e?e:t},(p=Fi({equals:function(e,t){return e===t},update:function(e,t){return Fi(e,t),e},remove:function(e,t,n){return t.splice(n,1),e},insert:function(e,t){return t.push(e),e}},{equals:function(e,t){return e.key===t.key},update:function(e,t){return Fi(e,t,r)},insert:function(e,t){return t.push(e)},remove:No}),function(e,t,n){var r=e.slice(),i=t.slice(),o=0,a=0;n=n||e;for(var l=0,u=r.length;l<u;l++){for(var s=r[l],c=!1,h=0,f=i.length;h<f;h++){var d=i[h];if(p.equals(s,d,l,h)){p.update(s,d,n,n.indexOf(s)),o++,c=!0,i.splice(h,1);break}}c||(p.remove(s,n,n.indexOf(s)),a++)}for(var g=i.length,m=0;m<g;m++)p.insert(i[m],n);return p.sort&&e.sort(p.sort(e,t)),{updated:o,removed:a,inserted:g}})(e,t)}function $l(u){var s=u.data,c=Pl(u);return function(){var e=s().rows,t=u.columnList().columns,n=[],r=u.columnList().generation;if(r){var i={rows:e,columnFactory:c,deep:!1,cohort:!1};switch(r){case"shallow":break;case"deep":i.deep=!0;break;case"cohort":i.deep=!0,i.cohort=!0;break;default:throw new Xo("column.list.generate",'Invalid generation mode "'+r+'"')}n.push.apply(n,b(Bl(i)))}var o,a=Array.from(s().columns),l=[];return n.length&&l.push(Vl(a,n,!1)),t.length&&l.push(Vl(a,t,!0)),{columns:a,statistics:l,hasChanges:(o=l,o.some(function(e){return e.inserted||e.update}))}}}function Bl(e){var t=Fi({deep:!0,cohort:!1,rows:[],columnFactory:function(){return new _l},title:Ni},e);return t.rows.length?function c(h,f,d,g,m,p){var e=Object.getOwnPropertyNames(h);return e.reduce(function(e,t){var n=f?f+"."+t:t,r=h[t],i=Ll(r);switch(i){case"array":var o=d(i).model;if(o.key=n,o.title=p(n,h,o.length),o.path=n,o.value=Yo(n),o.source="generation",r.length)switch(o.itemType=Ll(r[0]),o.itemType){case"date":o.itemFormat=d("date").model.format}e.push(o);break;case"collection":break;case"object":if(g){var a=c(r,n,d,g,m,p);if(m){var l,u=d("cohort").model;u.key=n,u.title=p(n,h,u.length),u.path=n,u.value=Yo(n),u.source="generation",(l=u.children).push.apply(l,b(a)),e.push(u)}else e.push.apply(e,b(a))}break;default:var s=d(i).model;s.key=n,s.title=p(n,h,s.length),s.path=n,s.value=Yo(n),s.source="generation",e.push(s)}return e},[])}(t.rows[0],null,t.columnFactory,t.deep,t.cohort,t.title):[]}function Ul(e,t,n){var r,i,o,a,l,u,s=t.model;s.pipe({effect:Object.assign({},s.pipe().effect,{data:e})}),r=e,s.data({rows:r},{source:"data.pipe",behavior:"core"}),o=$l(i=s),a=Pl(i),l=o(),u=l.columns.map(function(e){return a(e.type,e).model}),l.hasChanges&&i.data({columns:u},{source:"data.pipe",behavior:"core"}),n(e),s.pipe({effect:Object.assign({},s.pipe().effect,{data:e})},{source:"data.pipe",behavior:"core"})}function Hl(e,t,n){ca.notNull(e,"rows");var r=t.model,i=[];if(e.length)for(var o=r.filter().match(t),a=0,l=e.length;a<l;a++){var u=e[a];o(u)&&i.push(u)}r.pipe({effect:Object.assign({},r.pipe().effect,{filter:i})},{source:"filter.pipe",behavior:"core"}),n(i)}function Wl(e,t,n){ca.notNull(e,"memo");var r=t.model;if(e.hasOwnProperty("nodes")&&e.nodes.length){var i=r.group().flattenFactory,o=Gl(r,e.nodes),a=i(r);return e.rows=a(o),void n(e)}if(e.hasOwnProperty("rows")){var l=Gl(r,e.rows);return e.rows=l,void n(e)}n(Gl(r,e))}function Gl(e,t){var n=e.pagination(),r=n.size,i=n.current,o=e.row(),a=o.pinTop,l=o.pinBottom,u=e.scroll().mode,s=i*r,c=new Set([].concat(b(a),b(l)));return c.size&&(t=t.filter(function(e){return!c.has(e)})),e.pagination({count:t.length},{source:"pagination.pipe",behavior:"core"}),"virtual"===u?t:t.slice(s,s+r)}var Kl=function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"group";g(this,e),this.key=t,this.level=n,this.rows=[],this.children=[],this.type=r,this.source=null,this.value=null,this.state={expand:!1}};function Yl(e,t){for(var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,i=0,o=e.length;i<o;i++){var a=e[i],l=t(a,n,r,i);Yl(a.children,t,l,a)}return n}function Zl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.children;e=Xl(e);for(var i=!1,o=0,a=r.length;o<a;o++){i=Zl(r[o],t,e)||i}return n?!(!i&&!t(e))&&(n.children.push(e),!0):e}function Jl(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=e.children;if(!n.length)return t.push(e),t;for(var r=0,i=n.length;r<i;r++){Jl(n[r],t)}return t}function Ql(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[];if(t(e))return{node:e,parent:n,index:r,path:i};(i=i.slice()).push(e);for(var o=e.children,a=0,l=o.length;a<l;a++){var u=Ql(o[a],t,e,a,i);if(u)return u}return null}function Xl(e){var t=new Kl(e.key,e.level,e.type);return t.value=e.value,t.source=e.source,t.state.expand=e.state.expand,t}var eu=ou,tu=function(e,t){return e.map(ou).findIndex(function(e){return e===t})},nu=au,ru=function(e){return e.reduce(function(e,t){var n=ou(t);return e[n]=au(t),e},{})};function iu(t){var i=t.sort;return function(e){if(0<=i().trigger.indexOf("reorder")){var n=0,r={};Yl(t.columnList().index.children,function(e){var t=e.key.model.key;r[t]=n++}),e.sort(function(e,t){return r[ou(e)]-r[ou(t)]})}return e}}function ou(e){var t=void 0;if(Ht(e)){var n=e.split(/[+-]/);t=n[1]||n[0]}else t=Object.keys(e)[0];if(!t)throw new Xo("sort.service",'Key is not defined in "'+e+'"');return t}function au(e){if(Ht(e)){return{"-":"desc","+":"asc"}[e[0]]||"asc"}return e[ou(e)]}function lu(e){var d,y=(d=new Map,function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=t.key.model;if(d.has(r.key))return d.get(r.key);var i=t.children,o=0==i.length?0:1,a=!0,l=!1,u=void 0;try{for(var s,c=i[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var h=s.value;o=Math.max(o,e(h,n+1))}}catch(e){l=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(l)throw u}}var f=1+o;return d.set(r.key,f),f});var t=[];return function e(t,n,r,i,o){var a=t.key,l=i-y(t);a.rowspan=l,a.rowIndex=n,a.columnIndex=r;var u=t.children;if(u.length){var s=0,c=[],h=!0,f=!1,d=void 0;try{for(var g,m=u[Symbol.iterator]();!(h=(g=m.next()).done);h=!0){var p=e(g.value,n+l,r,i-l,c);if(p){var v=p.colspan;s+=v,r+=v}}}catch(e){f=!0,d=e}finally{try{!h&&m.return&&m.return()}finally{if(f)throw d}}0<(a.colspan=s)&&(o.push(a),o.push.apply(o,c))}else"cohort"!==a.model.type&&o.push(a);return a}(e,0,0,y(e),t),t.splice(0,1),function(e){var t=[];e.sort(function(e,t){var n=e.rowIndex-t.rowIndex;return 0===n?e.columnIndex-t.columnIndex:n});var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;t[l.rowIndex]||(t[l.rowIndex]=[]),t[l.rowIndex].push(l)}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return t}(t)}function uu(e){return e.reduce(function(e,t){return e[t.key]=t,e},{})}function su(e,t){var n=cu(e,t);return n<0?null:e[n]}function cu(e,t){for(var n=e.length;n--;){if(e[n].key==t)return n}return-1}function hu(e){var t=e.length;return 1===t?Array.from(e[0]):1<t?function(e){var t=[],n=e.length;if(n)for(var r=new Set,i=e[n-1],o=i.length,a=0;a<o;a++){var l=i[a];r.has(l)||(t.push(l),r.add(l))}return t}(function(e){for(var t=[],n=[],r=0,i=e.length;r<i;r++)for(var o=e[r],a=n.length>r?n[r]:n[r]=[0],l=0,u=o.length;l<u;l++)for(var s=o[l],c=s.rowspan,h=s.colspan,f=a[0],d=f+h,g=0;g<c;g++){for(var m=r+g,p=t.length>m?t[m]:t[m]=[],v=0;v<h;v++)p[f+v]=s;var y=n.length>m?n[m]:n[m]=[0],x=Ko(y,f);if(p[d])y.splice(x,1);else{var w=y[x];y.splice(x,p[w]?1:0,d)}}return t}(e)):[]}function fu(a,l){var e=a.model.layout,t=a.data.columns(),n=uu(t);l=l||e().columns;var u=t.filter(function(e){return l.has(e.key)||(""+e.width).indexOf("%")<0}).reduce(function(e,t){var n=r(t);return null!==n&&(e+=n),e},0),s=void 0;function r(e){var t=e;l.has(e.key)&&(t=l.get(e.key));var n=t.width;if(n||0===n){if(0<=(""+n).indexOf("%")){var r=parseFloat(n),i=s||(s=a.view.rect("head")),o="relative"===e.widthMode?u+2:2;n=(i.width-o)*r/100}return Math.max(parseInt(n),parseInt(e.minWidth))}return null}return function(e){var t=n[e];if(!t)throw new Xo("column.service","Column "+e+" is not found");return r(t)}}function du(e,s,t){ca.notNull(e,"rows");var n=s.model,r=e;if(e.length){var c=n.sort().by;if(c.length){for(var h=n.columnList().line,f=[],d=[],i=function(e,t){var n=c[e],r=eu(n),i=nu(n),o=su(h,r);if(!o)throw new Xo("sort.pipe",'Column "'+r+'" is not found');var a=s.valueFactory(o),l=Al(o.type,o.editor),u=o.compare;f.push(function(e){var t=a(e),n=l(t);return null===n?t:n}),d.push("asc"===i?u:function(e,t){return-u(e,t)})},o=0,a=c.length;o<a;o++)i(o);r=function(e,t,i){for(var o=t.length,n=[],r=e.length,a=r;a--;){for(var l=e[a],u=[],s=0;s<o;s++){var c=t[s];u.push(c(l))}n.push({row:l,criteria:u,index:a})}for(n.sort(function(e,t){for(var n=0,r=0;r<o;r++)if(0!==(n=(0,i[r])(e.criteria[r],t.criteria[r],e.row,t.row)))return n;return e.index-t.index}),a=r;a--;)n[a]=n[a].row;return n}(e,f,d)}}n.pipe({effect:Object.assign({},n.pipe().effect,{sort:r})},{source:"sort.pipe",behavior:"core"}),t(r)}function gu(e,t,n){ca.notNull(e,"rows");var r=t.model;r.pipe({effect:Object.assign({},r.pipe().effect,{memo:e})},{source:"memo.pipe",behavior:"core"}),n({rows:e,pivot:{head:new Kl("$root",0),rows:[]},nodes:[]})}function mu(e,t,n){ca.notNull(e,"rows");var r=t.model;if(e.rows.length){var i=r.data().rows,o=r.group().by,a=function v(y,x,w){var b=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;if(0===x.length)return function(){return[]};var k=x[0];if(!y.hasOwnProperty(k))throw new Xo("node.build","can't find column \""+k+'"');var e=y[k],C=w(e);return function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(e){return e},a=[],n=[],l={},r=0,i=e.length;r<i;r++){var o=e[r],u=t(r),s=C(o);if(l.hasOwnProperty(s)){var c=l[s];c.node.rows.push(u),c.rows.push(o),a.push(s)}else{var h=new Kl(s,b);h.source=k,h.rows.push(u),a.push(s),n.push(h),l[s]={node:h,rows:[o]}}}var f=x.slice(1);if(f.length)for(var d=v(y,f,w,b+1),g=function(e,t){var n=a[e],r=l[n],i=r.node,o=i.rows;i.children=d(r.rows,function(e){return o[e]})},m=0,p=a.length;m<p;m++)g(m);return n}}(uu(r.columnList().line),o,t.valueFactory),l=e.rows;e.nodes=a(l,function(e){var t=l[e],n=i.indexOf(t);return n<0?e:n})}r.pipe({effect:Object.assign({},r.pipe().effect,{group:e.nodes})},{source:"group.pipe",behavior:"core"}),n(e)}var pu=function(){function t(e){g(this,t),this.isRoot=!arguments.length,this.current=this.schema=e||{}}return h(t,[{key:"branch",value:function(){return new t(this.current)}},{key:"cursor",value:function(e){var t=this.schema;this.current=t.hasOwnProperty(e)?t[e]:t[e]={}}},{key:"compile",value:function(e){return this.isRoot?{schema:this.schema,data:e}:e}}]),t}();function vu(i,t){t=t||new pu;var n,o=(n=t,function(e){return n.cursor(e),function(e){return vu(e,n.branch())}}),r=function(r){return i.selector(r).reduce(function(e,t){var n=i.name(t);return e[n]=i.value(t,r,o(n)),e},i.factory(r))};return function(e){return t.compile(t.isRoot?e.map(r):r(e))}}function yu(e,t){if(e.schema&&e.data){var i=function n(r,i){return Object.keys(r).sort(i).reduce(function(e,t){return e[t]=n(r[t],i),e},{})}(e.schema,t),n=e.data.map(function(e){return r=function n(r,i){var e=Object.keys(r).map(function(e){var t=r[e];return i&&i.hasOwnProperty(e)?n(t,i[e]):n(t)});return e.length?Tr(e):[i]}(t=i,n=e),Object.keys(n).filter(function(e){return!t.hasOwnProperty(e)}).reduce(function(e,t){return e[t]=n[t],e},r);var t,n,r});return{head:function n(r,i){return r&&Object.keys(r).forEach(function(e){var t=new Kl(e,i.level+1);return i.children.push(t),n(r[e],t),t}),i}(i,new Kl("$root",0)),rows:n}}return{head:new Kl("$root",0),rows:[]}}function xu(e,t,n){var l,u,r=null;if(t.length){var i=(l=e,u=n,function i(e,o){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,t=o[0],n=l[t];if(!n)throw new Xo("pivot.build",'Invalid key "'+t+'"');var r=u(n);return e({factory:function(){return{}},selector:function(e){return[r(e)]},name:$o,value:function(e,t,n){var r=o.slice(1);return!r.length||i(n,r,a+1)(t)}})});r=i(vu,t)}return function(e){return r?yu(r(e)):{head:new Kl("$root",0),rows:[]}}}function wu(e,t,n){ca.hasProperty(e,"rows");var r=t.model;if(e.rows.length){var i=t.valueFactory,o=r.columnList().line,a=r.pivot().by,l=xu(uu(o),a,i);e.pivot=l(e.rows)}r.pipe({effect:Object.assign({},r.pipe().effect,{pivot:e.pivot})},{source:"pivot.pipe",behavior:"core"}),n(e)}function bu(e,t,n){ca.notNull(e,"root");var r,i,f,d,o=t.model;n({columns:lu((r=o,i=e,f=new Set(r.group().by),d=new Set(r.pivot().by),function e(t,n){for(var r=t.children,i=0,o=r.length;i<o;i++){var a=r[i],l=a.key,u=l.model,s=u.isVisible,c=u.key;if(s&&!f.has(c)&&!d.has(c)){var h=new Kl(a.key,a.level);n.children.push(h),e(a,h)}}return n}(i,new Kl(i.key,i.level)))),index:e})}function ku(e){var m=e.columnList().columns.map(function(e){return e.key});return function(e,t){var n=e.length;t=Object.assign({list:function(e){return"data"===e.class||"cohort"===e.class?.1:.3},index:function(){return.2},view:function(e){return n+("data"!==e.class&&"cohort"!==e.class?.1:.3)},template:function(){return n+.4}},t);var o,r,a,l,u,i,s,c=e.map(function(e){return e.key}),h=(o=t,r=m,a=Cu(c),l=Cu(r),u={},i=function(e){var t=e.key;if(u.hasOwnProperty(t))return u[t];var n=[e.index+o.index(e),a(t)+o.view(e),l(t)+o.template(e)],r=n.filter(function(e){return 0<=e}),i=r.length?r[0]:-1;return u[t]=i},s=function(e,t){var n=i(e),r=i(t);return-1===r?-1:-1===n?1:n-r},function(e){var t=Array.from(e);return t.sort(s),t.map(function(e){return e.key})}),f=h(e.filter(function(e){return"left"===e.pin})),d=h(e.filter(function(e){return!e.pin})),g=h(e.filter(function(e){return"right"===e.pin}));return f.concat(d).concat(g)}}function Cu(e){var t=e.reduce(function(e,t,n){return e.set(t,n),e},new Map);return function(e){return t.has(e)?t.get(e):-1}}function qu(e,t,n){var r,o,a,i,l,u,s,c,h,f=(r=e,o=n,a={line:[],map:new Map},Yl([r],function(e){a.line.push(e),a.map.set(e.key.model.key,e.key);var t=e.children.map(function(e){return e.key.model}),n=o(t),r=0,i=n.reduce(function(e,t){return e[t]=r++,e},{});e.children.sort(function(e,t){return i[e.key.model.key]-i[t.key.model.key]})}),a),d=(i=t,l=f,u={line:[],set:new Set},Yl([i],function(e){var t=e.key.model.key,n=l.map.get(t);if(n){var r=Xl(e);r.key=n,u.line.push(r),u.set.add(t)}}),u),g=Ou(f,d),m=(c=Ou(f,s=d),h=s.line,function(e,t){var n=new Set(t.children.map(function(e){return e.key.model.key})),r=h.findIndex(function(e){return n.has(e.key.model.key)});if(r<0)c(e,t);else{var i=Xl(t),o=h[r].level;i.level=o,h.splice(r,0,i);for(var a=r+1,l=h.length;a<l;a++){var u=h[a];if(u.level!==o)break;n.has(u.key.model.key)&&(u.level=o+1)}}}),p=f.line[0];d.set.has(p.key.model.key)||(d.line.unshift(Xl(p)),d.line.forEach(function(e){return e.level++}));for(var v=1,y=f.line.length;v<y;v++){var x=f.line[v],w=x.key.model;if(!d.set.has(w.key)){var b=f.line[v-1];"cohort"===w.type?m(b,x):g(b,x,v)}}return function(e){if(0===e.length)throw new Xo("node.service","Line have no nodes");for(var t=Xl(e[0]),n=[t],r=1,i=e.length;r<i;r++){for(var o=e[r],a=n[n.length-1];o.level<=a.level;)n.pop(),a=n[n.length-1];var l=Xl(o);l.level=a.level+1,a.children.push(l),n.push(l)}return t}(d.line)}function Ou(o,a){var l=a.line;return function(t,e,n){var r=l.findIndex(function(e){return e.key.model.key===t.key.model.key}),i=Xl(e);i.level=e.level,!function(e,t,n){var r=e.line,i=void 0;for(;i=r[++n];)if(t.set.has(i.key.model.key))return!1;return!0}(o,a,n)?l.splice(r+1,0,i):l.push(i)}}function _u(r,e,i){ca.hasProperty(r,"pivot"),ca.hasProperty(r,"nodes");var c,o,t=e.model,n=r.pivot,a=r.nodes,l=n.head,u=Pl(t),s=new Kl(u("cohort",{key:"$root"}),0),h=function(e){var t=$l(e),h=Pl(e),n=t(),r=n.hasChanges,i=n.columns;r&&e.data({columns:i},{source:"column.pipe",behavior:"core"});return function(e){return function e(t,n){var r=!0;var i=!1;var o=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value,s=h(u.type,u),c=new Kl(s,t.level+1);t.children.push(c),e(c,s.model.children)}}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}}(e,i)}}(t),f=function(e){var t=e.columnList().line,n=e.selection(),r=t.find(function(e){return"select"===e.type});if(!t.find(function(e){return"row-indicator"===e.type})&&"mix"===n.unit){var i=Pl(e);return function(e){var t=i("row-indicator");if(t.model.source="generation",t.model.isVisible)return e.children.unshift(new Kl(t,e.level+1)),t}}if(!r&&"row"===n.unit&&"range"!==n.mode){var o=Pl(e);return function(e){var t=o("select");if(t.model.source="generation",t.model.isVisible)return e.children.unshift(new Kl(t,e.level+1)),t}}return No}(t),d=function(e,t){var n=e.columnList().line.find(function(e){return"group"===e.type}),r=e.group(),i=r.by,o=r.mode,a=Pl(e);if(!n&&(t.length||i.length))switch(o){case"nest":return function(e){var t=a("group");if(t.model.source="generation",t.model.isVisible)return e.children.unshift(new Kl(t,e.level+1)),t};case"rowspan":case"flat":return function(n){var e,t=i.map(function(e){var t=a("group");return t.model.source="generation",t.model.key="$group-"+e,t.model.title=e,t.model.by=e,new Kl(t,n.level+1)}).filter(function(e){return e.key.model.isVisible});(e=n.children).splice.apply(e,[0,0].concat(b(t)))}}return No}(t,a),g=function(e){var t=e.columnList().line.find(function(e){return"row-expand"===e.type});if("details"===e.row().unit&&!t){var n=Pl(e);return function(e){var t=n("row-expand");if(t.model.source="generation",t.model.isVisible)return e.children.unshift(new Kl(t,e.level+1)),t}}return No}(t),m=function(e){var t=e.columnList().line.find(function(e){return"row-indicator"===e.type}),n=e.row(),r=n.canMove,i=n.canResize;if((r||i)&&!t){var o=Pl(e);return function(e){var t=o("row-indicator");if(t.model.source="generation",t.model.isVisible)return e.children.unshift(new Kl(t,e.level+1)),t}}return No}(t),p=(c=Pl(t),function e(t,n){for(var r=n.children,i=0,o=r.length;i<o;i++){var a=r[i],l=c("pivot"),u=l.model;u.title=a.key,u.key="$pivot-"+a.key;var s=new Kl(l,t.level+1);t.children.push(s),e(s,a)}}),v=(o=Pl(t),function(e){var t=o("pad");t.model.key="$pad";var n=e.children.findIndex(function(e){return"right"===e.key.model.pin}),r=new Kl(t,e.level+1);return 0<=n?e.children.splice(n,0,r):e.children.push(r),t});h(s),g(s),d(s),f(s),m(s),p(s,l);var y=t.columnList,x=ku(t),w=qu(s,y().index,x);v(w),bu(w,e,function(e){var t=e.columns,n=e.index;r.columns=t,y({index:n},{behavior:"core",source:"column.pipe"}),i(r)})}var Iu=function(){function t(e){g(this,t),this.model=e}return h(t,[{key:"rows",value:function(e){var t=e.nodes,n=e.rows;if(t.length&&!(n.length&&n[0]instanceof Kl))return(0,this.model.group().flattenFactory)(this.model)(t);return n}},{key:"columnRows",value:function(e){return e}},{key:"columnLine",value:function(e){return hu(e)}},{key:"columnArea",value:function(e){for(var t=hu(e),n={left:[],right:[],null:[]},r=0,i=t.length;r<i;r++){var o=t[r],a=o.model.pin,l=n[a];if(!l)throw new Xo("scene","Unsupported pin "+a);l.push(o)}return n}}]),t}();function Eu(e){var o=e.rowList().index;if(!o.size)return $o;var a=e.data().id;return function(e){var r=0,i=new Map,t=e.filter(function(e,t){var n=a.row(t,e),r=o.get(n);return!r&&0!==r||(i.set(r,e),!1)}).reduce(function(e,t){for(var n=void 0;n=i.get(r);)i.delete(r),e.push(n),r++;return e.push(t),r++,e},[]);if(i.size){var n=Array.from(i.entries());return n.sort(function(e,t){return e[0]-t[0]}),t.concat(n.map(function(e){return e[1]}))}return t}}function zu(e,t,n){ca.hasProperty(e,"rows"),ca.hasProperty(e,"nodes"),ca.hasProperty(e,"pivot"),ca.hasProperty(e,"columns");var r={source:t.source||"view.pipe",behavior:"core"},i=t.model,o=new Iu(i),a=o.rows(e),l=e.columns,u=e.nodes,s=e.pivot,c=o.columnLine(l);i.sort().by.length||(a=Eu(i)(a));i.view({rows:a,columns:c.map(function(e){return e.model}),nodes:u,pivot:s},r),i.scene({rows:a,column:{rows:o.columnRows(e.columns),area:o.columnArea(e.columns),line:c}},r),n(e)}var Ru=function(){function e(){g(this,e)}return h(e,null,[{key:"data",get:function(){return Ul}},{key:"filter",get:function(){return Hl}},{key:"pagination",get:function(){return Wl}},{key:"sort",get:function(){return du}},{key:"memo",get:function(){return gu}},{key:"group",get:function(){return mu}},{key:"pivot",get:function(){return wu}},{key:"column",get:function(){return _u}},{key:"columnIndex",get:function(){return bu}},{key:"view",get:function(){return zu}}]),e}(),ju=[function(e,t,n){var r=(0,t.model.view)();n({rows:r.rows,pivot:r.pivot,nodes:r.nodes})},Ru.column,function(e,t,n){ca.hasProperty(e,"columns");var r=t.model,i=new Iu(r),o=i.columnLine(e.columns),a={source:t.source||"column.pipe.unit",behavior:"core"},l=o.map(function(e){return e.model});r.view({columns:l},a);var u={rows:i.columnRows(e.columns),area:i.columnArea(e.columns),line:o};t.model.scene({column:u},a),n(e)}];ju.why="redraw";var Su=[function(e,t,n){n(t.model.columnList().index)},Ru.columnIndex,function(e,t,n){ca.hasProperty(e,"columns");var r=t.model,i=new Iu(r),o=i.columnLine(e.columns),a={source:t.source||"column.pipe.unit",behavior:"core"},l=o.map(function(e){return e.model});r.view({columns:l},a);var u={rows:i.columnRows(e.columns),area:i.columnArea(e.columns),line:o};t.model.scene({column:u},a),n(e)}];Su.why="redraw";var Pu=[Ru.data,Ru.filter,Ru.sort,Ru.memo,Ru.group,Ru.pivot,Ru.column,Ru.pagination,Ru.view];Pu.why="refresh";var Au=[function(e,t,n){var r=t.model.view();n({nodes:r.nodes,rows:r.rows})},Ru.pagination,function(e,t,n){var r=t.model,i={source:t.source||"group.pipe.unit",behavior:"core"},o=e.rows;r.view({rows:o},i),r.scene({rows:o},i),n(e)}];Au.why="redraw";var Lu=function e(t,n){g(this,e),this.item=t,this.column=n},Mu=function e(t){g(this,e),this.expand=t};function Tu(r,t,e){switch(e){case"all":t=new Map(t.entries()),r.forEach(function(e){t.has(e)||t.set(e,new Mu(!0))});break;case"single":t=new Map(Array.from(t.entries()).filter(function(e){var t=e[0],n=e[1];return 0<=r.indexOf(t)||!(n instanceof Mu)}));break;case"multiple":t=new Map(t.entries());break;default:throw new Xo("row.details.service","Invalid mode "+e)}return t}var Du=[function(e,t,n){var r={source:t.source||"row.details.pipe.unit",behavior:"core"},i=t.model,o=function(e,t){for(var n=e.view().rows,r=e.row().status,i="all"===t,o=e.scene().column.line.find(function(e){return"row-expand"===e.model.type}),a=o?o.columnIndex:0,l=[],u=Pl(e),s=0,c=n.length;s<c;s++){var h=n[s];l.push(h);var f=n[s+1],d=f instanceof Lu?f:null,g=r.get(h)||i&&new Mu(!0);if(g instanceof Mu&&g.expand)if(d)l.push(d),s++;else{var m=u("row-details");m.columnIndex=a,l.push(new Lu(h,m))}else d&&s++}return l}(i,i.row().mode);i.view({rows:o},r),i.scene({rows:o},r),n(o)}];Du.why="redraw";var Nu=[Ru.data,Ru.memo,Ru.column,Ru.view];Nu.why="refresh";var Fu=[function(e,t,n){var r={source:t.source||"row.pipe.unit",behavior:"core"},i=t.model,o=Eu(i)(i.view().rows);i.view({rows:o},r),i.scene({rows:o},r),n(o)}];Fu.why="redraw";var Vu=function(){function e(){g(this,e)}return h(e,null,[{key:"default",get:function(){return Pu}},{key:"view",get:function(){return Nu}},{key:"column",get:function(){return ju}},{key:"columnIndex",get:function(){return Su}},{key:"rowDetails",get:function(){return Du}},{key:"group",get:function(){return Au}},{key:"row",get:function(){return Fu}}]),e}(),$u=function e(){g(this,e),this.reduce=function(e,t){var n=t.data().pipe,r=e.indexOf(Vu.default);0<=r&&(e[r]=n),e=Wi(e);var i=new Set(e),o=new Map([[Vu.default,n],[Vu.view,Vu.default],[Vu.column,Vu.view]]);return e.reduce(function(e,t){return function(e){for(var t=void 0;(t=o.get(e))&&t!==e;){if(i.has(t))return!1;e=t}return!0}(t)&&e.push(t),e},[])},this.triggers={data:{rows:Vu.default,columns:Vu.column},pagination:{current:Vu.default,size:Vu.default},fetch:{skip:Vu.default},sort:{by:Vu.default},filter:{by:Vu.default,match:Vu.default,unit:Vu.column},group:{by:Vu.default},pivot:{by:Vu.default},columnList:{index:Vu.columnIndex},row:{status:Vu.rowDetails,unit:Vu.rowDetails,canMove:Vu.column,canResize:Vu.column},rowList:{index:Vu.row}},this.effect={}},Bu=function e(){g(this,e),this.status="stop",this.rows=[],this.column={rows:[],line:[],area:{left:[],null:[],right:[]}}},Uu=function e(){g(this,e),this.rows=[],this.columns=[],this.nodes=[],this.pivot={head:new Kl("$root",0),rows:[]}},Hu=function e(){g(this,e),this.rows=[],this.columns=[],this.pipe=Vu.default,this.id={row:function(e,t){return t},column:function(e,t){return t.key}}},Wu=function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};g(this,e),this.data=t,this.scope=n},Gu=function(){function e(){g(this,e),this.items={}}return h(e,[{key:"set",value:function(e,t){this.items[e]=t}},{key:"get",value:function(e){var t=this.find(e);if(!t)throw new Xo("cache.get",'Entry with key was not found "'+e+'"');return t}},{key:"has",value:function(e){return this.items.hasOwnProperty(e)}},{key:"find",value:function(e){var t=this.items;return t.hasOwnProperty(e)?t[e]:null}},{key:"remove",value:function(e){if(!this.items.hasOwnProperty(e))throw new Xo("cache.remove",'Entry with key was not found "'+e+'"');delete this.items[e]}},{key:"clear",value:function(){this.items={}}}]),e}(),Ku=function e(){g(this,e),this.resource=new Wu,this.cache=new Gu},Yu=function e(){g(this,e),this.resource=new Wu,this.cache=new Gu},Zu=function e(){g(this,e),this.columns=new Map,this.rows=new Map},Ju=function(){function e(){g(this,e),this.cell=null,this.debounce=100,this.shortcut={up:"up",down:"down",left:"left",right:"right",next:"tab",previous:"shift+tab",home:"home",end:"end",pageUp:"pageUp",pageDown:"pageDown",upward:"shift+pageUp",downward:"shift+pageDown"},this.go=new Ea({source:"navigation.model"}),this.prevent=new Set(["space","shift+space","up","down","left","right","tab","shift+tab","home","end","pageUp","pageDown","shift+pageDown","shift+pageUp"])}return h(e,[{key:"rowIndex",get:function(){return this.cell?this.cell.rowIndex:-1}},{key:"columnIndex",get:function(){return this.cell?this.cell.columnIndex:-1}},{key:"row",get:function(){return this.cell?this.cell.row:null}},{key:"column",get:function(){return this.cell?this.cell.column:null}}]),e}(),Qu=function e(){g(this,e),this.rowIndex=-1,this.columnIndex=-1,this.isActive=!1},Xu=function e(){g(this,e),this.generation=null;var t=new Na;t.key="$root",this.index=new Kl(new Fa(t),0),this.columns=[],this.reference={},this.line=[]},es=function e(){g(this,e),this.resource=new Wu,this.mode="single",this.unit="data",this.height=function(e){return e&&e.offsetHeight||64},this.status=new Map,this.shortcut={toggle:"space|enter"},this.canMove=!1,this.canResize=!1,this.pinTop=[],this.pinBottom=[]},ts=function e(){g(this,e),this.resource=new Wu,this.unit="cell",this.mode="single",this.items=[],this.area="body",this.toggle=new Ea({source:"selection.model"}),this.key={row:$o,column:$o},this.shortcut={toggleRow:"shift+space",togglePreviousRow:"shift+up",toggleNextRow:"shift+down",toggleColumn:"ctrl+space",toggleNextColumn:"shift+right",togglePreviousColumn:"shift+left",selectAll:"ctrl+a"}},ns=function(e){function i(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;g(this,i);var r=m(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return r.count=n,r}return c(i,Wu),i}(),rs=function e(){g(this,e),this.resource=new ns,this.cache=new Gu},is=function e(){g(this,e),this.resource=new Wu,this.by=[],this.mode="multiple",this.trigger=["reorder"]};function os(e){var t=e.group(),n=t.mode,r=t.summary,v=function(e,t,n){return n.push(e)};switch(n){case"rowspan":v=function(e,t,n){(0===e.level||0<t)&&n.push(e)}}var y=No;switch(r){case"leaf":y=function(e,t,n,r,i){if(r&&r.children.length-1===i){var o=e.level,a=e.key,l=new Kl(a+"-group-summary",o,"summary");l.rows=Array.from(e.rows),n.push(l)}}}return function e(t){for(var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,o=0,a=t.length;o<a;o++){var l=t[o];if(v(l,o,n,r,i),l.state.expand){var u=l.children;if(u.length)e(u,n,l,o);else for(var s=l.rows,c=l.level,h=l.key,f=c+1,d=0,g=s.length;d<g;d++){var m=new Kl(h,f,"row"),p=s[d];m.rows=[p],u.push(m),v(m,d,n,r,i)}y(l,o,n,r,i)}}return n}}var as=function e(){g(this,e),this.resource=new Wu,this.mode="nest",this.summary=null,this.by=[],this.shortcut={toggle:"space"},this.toggle=new Ea({source:"group.model"}),this.toggleAll=new Ea({source:"group.model"}),this.flattenFactory=os},ls=function e(){g(this,e),this.resource=new Wu,this.by=[]},us=function e(){g(this,e),this.resource=new Wu,this.imports={}},ss=function e(){g(this,e),this.resource=new Wu,this.mode=null,this.state="view",this.method=null,this.enter=new Ea({source:"edit.model"}),this.commit=new Ea({source:"edit.model"}),this.cancel=new Ea({source:"edit.model"}),this.reset=new Ea({source:"edit.model"}),this.clear=new Ea({source:"edit.model"}),this.cancelShortcuts={$default:"escape"},this.enterShortcuts={$default:"*",row:"F2|Enter",form:"F2|Enter"},this.commitShortcuts={$default:"tab|shift+tab|enter|ctrl+s",reference:"ctrl+s",row:"ctrl+s",form:"ctrl+s",bool:"tab|shift+tab|left|right|up|down|home|end|pageUp|pageDown","text-area":"ctrl+s"}},cs=function e(){g(this,e),this.resource=new Wu},hs=function e(){g(this,e),this.resource=new Wu},fs=function e(){g(this,e),this.resource=new Wu,this.current=0,this.size=50,this.sizeList=[5,10,20,30,40,50],this.count=0,this.resetTriggers={data:["rows"],filter:["by"],pivot:["by"],group:["by"]}},ds=function e(){g(this,e),this.resource=new Wu,this.isBusy=!1,this.queue=[]},gs=function e(){g(this,e),this.columns=[],this.rows=[],this.cell=null},ms=function e(){g(this,e),this.resource=new Wu,this.head=!0,this.foot=!0,this.body=!0,this.toolbar={top:!0,bottom:!0,right:!1,left:!1},this.pin={left:!1,right:!1,top:!1,bottom:!1},this.plugin={}};function ps(e,n){var t={kind:"group",op:n,left:null,right:null},r=t;return e.forEach(function(e){if(r.left){var t={kind:"group",op:n,left:e,right:null};r.right=t,r=t}else r.left=e}),t.left?t:null}function vs(e){return{}.toString.call(e).slice("[object]".length,-1)}function ys(n){var r=vs(n),i=""+n,o=+n,a=!!n,l=new Date(n);return function(e){var t=vs(e);if(r===t)return n;switch(t){case"Number":return o;case"String":return i;case"Date":return l;case"Boolean":return a;default:throw Xo("cast.factory","Unsupported format "+t)}}}var xs=function(){function e(){g(this,e)}return h(e,[{key:"visit",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;switch(e.kind){case"group":return this.visitGroup(e,t+1);case"condition":return this.visitCondition(e,t);case"function":return this.visitFunction(e,t);default:throw Xo("expression.visitor","Invalid kind "+e.kind)}}},{key:"visitGroup",value:function(e,t){return e.right&&(this.visit(e.left,t),this.visit(e.right,t)),this.visit(e.left,t)}},{key:"visitCondition",value:function(e,t){switch(e.op){case"isNotNull":case"isNull":case"isNotEmpty":case"isEmpty":case"isNumeric":case"isNotNumeric":return this.visitUnary(e,t);case"equals":case"notEquals":case"greaterThanOrEquals":case"greaterThan":case"lessThanOrEquals":case"lessThan":case"like":case"notLike":case"startsWith":case"endsWith":case"match":return this.visitBinary(e,t);case"between":return this.visitBetween(e,t);case"in":return this.visitIn(e,t);default:throw new Xo("expression.visitor","Invalid operation "+e.op)}}},{key:"visitUnary",value:function(e){this.visitLeft(e.left)}},{key:"visitBinary",value:function(e){this.visitLeft(e.left),this.visitRight(e.right)}},{key:"visitLeft",value:function(e){if(e.kind)switch(e.kind){case"function":this.visitArguments(e.arguments)}}},{key:"visitBetween",value:function(){}},{key:"visitIn",value:function(){}},{key:"visitFunction",value:function(){}},{key:"visitArguments",value:function(e){var t=this;return e.map(function(e){switch(e.kind){case"condition":case"group":t.visit(e)}})}}]),e}(),ws=function(e){function r(e,t){g(this,r);var n=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.valueFactory=e,n.assertFactory=t,n}return c(r,xs),h(r,[{key:"visitGroup",value:function(e){if(e.right){var t=this.visit(e.left),n=this.visit(e.right);switch(e.op){case"and":return function(e){return t(e)&&n(e)};case"or":return function(e){return t(e)||n(e)};default:throw Xo("predicate.visitor","Invalid operation "+e.op)}}return this.visit(e.left)}},{key:"visitCondition",value:function(e){var t=e.right,n=e.left,r=this.valueFactory(n),i=this.assertFactory(n),o=new Set,a=void 0;M(t)?t.length?(a=ys(t[0]),t.forEach(function(e){return o.add(""+e)})):a=$o:a=ys(t);var l=i.equals,u=i.isNull,s=i.lessThan,c=function(e,t){return l(e,t)||s(e,t)},h=function(e,t){return!s(e,t)},f=void 0;switch(e.op){case"isNotNull":case"isNotEmpty":f=function(e){return!u(e)};break;case"isNull":case"isEmpty":f=function(e){return u(e)};break;case"equals":f=function(e){return l(a(e),e)};break;case"notEquals":f=function(e){return!l(a(e),e)};break;case"greaterThanOrEquals":f=function(e){return h(e,a(e))};break;case"greaterThan":f=function(e){return n=a(t=e),!c(t,n);var t,n};break;case"lessThanOrEquals":f=function(e){return c(e,a(e))};break;case"lessThan":f=function(e){return s(e,a(e))};break;case"between":f=function(e){return c(ys(t[0])(e),e)&&h(ys(t[1])(e),e)};break;case"in":f=function(e){var t=e||0===e?""+e:"null";return o.has(t)};break;case"like":f=function(e){var t=a(e);return e&&(""+e).toLowerCase().includes((""+t).toLowerCase())};break;case"notLike":f=function(e){var t=a(e);return e&&!(""+e).toLowerCase().includes((""+t).toLowerCase())};break;case"startsWith":f=function(e){var t=a(e),n=e.substr(0,t.length).toLowerCase();return(""+t).toLowerCase()===n};break;case"endsWith":f=function(e){var t=a(e),n=e.slice(-t.length).toLowerCase();return(""+t).toLowerCase()===n};break;default:throw new Xo("predicate.visitor","Invalid operation "+e.op)}return function(e){var t=r(e);return f(t)}}}]),r}();function bs(e){var t=e.model,n=function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"and",i=[],o=!0,a=!1,l=void 0;try{for(var u,s=Object.entries(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=j(u.value,2),h=c[0],f=c[1];if("$expression"!==h){f.expression&&i.push(f.expression);var d=[];f.items&&f.items.length&&d.push((t=h,n=f.items,{kind:"group",op:"and",left:{kind:"condition",left:t,op:"in",right:Array.from(n)},right:null})),f.blanks&&d.push({kind:"group",op:"and",left:{kind:"condition",left:h,op:"isEmpty",right:null},right:null}),d.length&&(1===d.length?i.push(d[0]):i.push(ps(d,"or")))}else i.push(f)}}catch(e){a=!0,l=e}finally{try{!o&&s.return&&s.return()}finally{if(a)throw l}}return ps(i,r)}(t.filter().by);if(null!==n){var r=e.labelFactory,i=t.filter().assertFactory,o=uu(t.columnList().line);return new ws(function(e){return r(o[e])},function(e){return i(o[e])}).visit(n)}return Fo}var ks=function e(){g(this,e),this.resource=new Wu,this.by={},this.match=bs,this.fetch=No,this.unit="default",this.assertFactory=function(){return{equals:function(e,t){return e===t},lessThan:function(e,t){return e<t},isNull:function(e){return""===e||null==e}}}},Cs=function e(){g(this,e),this.isActive=!1},qs=function e(){g(this,e),this.row=No,this.cell=No,this.rows=[],this.cells=[],this.classList=[],this.invalidate=new Ea({source:"style.model",canExecute:function(e){return"view"===e.model.edit().state}})},Os=function e(){g(this,e),this.mode="default",this.top=0,this.left=0,this.cursor=0,this.map={rowToView:$o,viewToRow:$o},this.resetTriggers=["sort.view","column.filter.view","data.manipulation"]},_s=function e(){g(this,e),this.resource=new Wu},Is=function e(){g(this,e),this.resource=new Wu},Es=new Set(["shift","ctrl","alt","pause","break","capslock","escape","insert","left","right","end","home","pageup","pagedown","up","down","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","numlock","scrolllock"]),zs=new Set(["enter"]),Rs=(new Map).set(8,"backspace").set(9,"tab").set(13,"enter").set(16,"shift").set(17,"ctrl").set(20,"capslock").set(27,"escape").set(32,"space").set(33,"pageup").set(34,"pagedown").set(35,"end").set(36,"home").set(37,"left").set(38,"up").set(39,"right").set(40,"down").set(45,"insert").set(46,"delete").set(96,"numpad0").set(97,"numpad1").set(98,"numpad2").set(99,"numpad3").set(100,"numpad4").set(101,"numpad5").set(102,"numpad6").set(103,"numpad7").set(104,"numpad8").set(105,"numpad9").set(112,"f1").set(113,"f2").set(114,"f3").set(115,"f4").set(116,"f5").set(117,"f6").set(118,"f7").set(119,"f8").set(120,"f9").set(121,"f10").set(122,"f11").set(123,"f12").set(144,"numlock").set(145,"scrolllock"),js=new Set(Rs.values()),Ss=(new Map).set("space"," "),Ps=function(){function t(){g(this,t)}return h(t,null,[{key:"isPrintable",value:function(e){return!zs.has(e)&&!t.isControl(e)}},{key:"isControl",value:function(e){return Es.has(e)}},{key:"stringify",value:function(e,t){return js.has(e)?Ss.get(e)||"":t}},{key:"translate",value:function(e){return Rs.get(e)||String.fromCharCode(e)}}]),t}(),As=function(){function r(e){g(this,r),this.dispatcher=e,this.keyCode={key:null,code:null}}return h(r,[{key:"factory",value:function(t){var n=this;return{register:function(e){return n.register(t,e)}}}},{key:"keyDown",value:function(e,t){var n=r.translate(e);return this.keyCode={key:e.key,code:n},this.dispatcher.execute(n,t)}},{key:"register",value:function(e,t){return this.dispatcher.register(e,t)}}],[{key:"isControl",value:function(e){if(!e)return!1;var t=e.code.split("+");return t.some(function(e){return"ctrl"===e||"alt"===e})||t.every(function(e){return Ps.isControl(e)})}},{key:"isPrintable",value:function(e){return!!e&&e.code.split("+").some(function(e){return Ps.isPrintable(e)})}},{key:"stringify",value:function(e){return e?Ps.stringify(e.code,e.key):""}},{key:"translate",value:function(e){var t=[],n=Ps.translate(e.keyCode).toLowerCase();return e.ctrlKey&&t.push("ctrl"),e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),"ctrl"!==n&&"shift"!==n&&"alt"!==n&&t.push(n),t.join("+")}}]),r}(),Ls=function(){function e(){g(this,e),this.managerMap=new Map}return h(e,[{key:"register",value:function(e,t){var n=this,r=t.values?t.values():t,i=this.managerMap.get(e);i||(i={commands:[],shortcuts:new Map},this.managerMap.set(e,i));var o=[],a=!0,l=!1,u=void 0;try{for(var s,c=function(){var r=s.value;r.shortcut&&(L(r.shortcut)?(i.commands.push(r),o.push(function(){var e=i.commands.indexOf(r);0<=e&&i.commands.splice(e,1)})):r.shortcut.toLowerCase().split("|").forEach(function(n){var e=[];i.shortcuts.has(n)&&(e=i.shortcuts.get(n)),e.push(r),i.shortcuts.set(n,e),o.push(function(){var e=i.shortcuts.get(n);if(e){var t=e.indexOf(r);0<=t&&(e.splice(t,1),e.length||i.shortcuts.delete(n))}})}))},h=r[Symbol.iterator]();!(a=(s=h.next()).done);a=!0)c()}catch(e){l=!0,u=e}finally{try{!a&&h.return&&h.return()}finally{if(l)throw u}}return function(){o.forEach(function(e){return e()}),0===i.commands.length&&0===Object.keys(i.shortcuts).length&&n.managerMap.delete(e)}}},{key:"execute",value:function(e,i){return this.fetchActivities(e,i).reduce(function(e,t){var n=t.commands,r=t.manager.invoke(n,i)||r;return r&&e.push.apply(e,b(n.map(function(e){return e.source}))),e},[])}},{key:"canExecute",value:function(e,t){return 0<this.fetchActivities(e,t).length}},{key:"fetchActivities",value:function(e,r){var t=function(e){return"*"!==e.shortcut},i=this.searchFactory(e),n=Array.from(this.managerMap.entries()).map(function(e){var t=e[0],n=e[1];return{commands:t.filter(i(n),r),manager:e[0]}}).filter(function(e){return 0<e.commands.length}),o=0<Tr(n.map(function(e){return e.commands})).filter(t).length?t:Fo;return n.map(function(e){var t=e.commands,n=e.manager;return{commands:t.filter(o),manager:n}}).filter(function(e){return 0<e.commands.length})}},{key:"searchFactory",value:function(n){var r=this;return function(e){var t=[];return e.shortcuts.has(n)&&(t=t.concat(e.shortcuts.get(n))),t=t.concat(e.commands.map(function(e){return e.clone({shortcut:e.shortcut()})}).filter(function(e){return r.test(e.shortcut,n)}))}}},{key:"test",value:function(e,t){return t=t.toLowerCase(),(""+e).toLowerCase().split("|").some(function(e){return"*"===e||t===e})}}]),e}(),Ms=function(){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(e){return e()},t=arguments[1];g(this,n),this.apply=e,this.context=t}return h(n,[{key:"invoke",value:function(u){var s=this;return!!u.length&&(this.apply(function(){var e=s.context,t=Array.from(u);t.sort(function(e,t){return t.priority-e.priority});var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;if(e){if(!1===l.execute(e))break}else if(!1===l.execute())break}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}),!0)}},{key:"filter",value:function(e){return e.filter(function(e){return e.sink=e.canExecute()})}}]),n}(),Ts=function e(){g(this,e),this.resource=new Wu,this.items=[],this.shortcut=new As(new Ls),this.manager=new Ms},Ds=function e(){g(this,e),this.skip=0},Ns=function(){function t(e){g(this,t),this.storage=e}return h(t,[{key:"getItem",value:function(t){var n=this;return new Promise(function(e){e(JSON.parse(n.storage.getItem(t)))})}},{key:"setItem",value:function(t,n){var r=this;return new Promise(function(e){e(r.storage.setItem(t,JSON.stringify(n)))})}}]),t}(),Fs=function e(){g(this,e),this.id="default",this.defaultGroup="My Presets",this.load=new Ea({source:"persistence.model"}),this.remove=new Ea({source:"persistence.model"}),this.create=new Ea({source:"persistence.model"}),this.modify=new Ea({source:"persistence.model"}),this.setDefault=new Ea({source:"persistence.model"}),this.reset=new Ea({source:"persistence.model"}),this.storage=new Ns(localStorage),this.settings={group:["by"],sort:["by"],pivot:["by"],filter:["by"],queryBuilder:["node"]}},Vs=function e(){g(this,e),this.resource=new Wu,this.rules=[]},$s=function e(){g(this,e),this.resource={}};function Bs(e){var t=e.pagination(),n=e.sort(),r=e.filter();return{order:n.by.map(function(e){var t=Object.keys(e)[0];return("asc"===e[t]?"+":"-")+t}).join(","),filter:Object.keys(r.by).map(function(e){var t=r.by[e];return"$expression"===e?"$expression=where:"+t:t.items?e+"=in:"+t.items.join(","):t.expression?e+"=where:"+t.expression:""}).filter(function(e){return!!e}).join(";"),skip:t.current*t.size,take:t.size}}var Us=function e(){g(this,e),this.url="",this.method="get",this.serialize=Bs};function Hs(t){var n=null;return function(e){if(n&&(n.reject(),n=null),!L(e))throw new Xo("job.line","job is not invocable");return(n=Hs.run(function(){n&&(e(),n.resolve(),n=null)},t)).promise}}Hs.run=function(e,t){var n=new pa,r=qa.invoke(function(){return setTimeout(e,t)});return n.promise.catch(function(){return clearTimeout(r)}),n};var Ws=function e(){g(this,e)},Gs=function e(){g(this,e),this.index=new Map};var Ks=function(e){function n(e){g(this,n);var t=m(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.host=e,t}return c(n,ya),h(n,[{key:"canWrite",value:function(e,t,n){return sr(t)?(aa.warn("model.bind","can't write undefined to the model["+n+"]"),!1):!M(e)||null!==t||(aa.warn("model.bind","the model["+n+"] expects array, got "+t),!1)}},{key:"bound",value:function(a,e){var l=this,u=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],s=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];if(a){var c=[],t=!0,n=!1,r=void 0;try{for(var h,i=function(){var n=h.value,r=a[n],i=l.packFactory(n),e=l.writeFactory(n);if(u){var t=r(),o=i(t);e({changes:l.buildChanges(o)})}s&&l.using(a[n+"Changed"].on(e)),c.push(function(){aa.info("model.bind",'to model "'+n+'"');var e=r(),t=i(e);r(t)})},o=e[Symbol.iterator]();!(t=(h=o.next()).done);t=!0)i()}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return function(){return c.forEach(function(e){return e()})}}return No}},{key:"writeFactory",value:function(c){var h=this.host;return function(e){var t=Object.keys(e.changes),n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value,u=Bo(c,l);if(h.hasOwnProperty(u)){var s=e.changes[l];h[u]=s.newValue}}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}}},{key:"packFactory",value:function(f){var d=this;return function(e){var t=d.host,n={},r=!0,i=!1,o=void 0;try{for(var a,l=Object.keys(e)[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value,s=Bo(f,u);if(t.hasOwnProperty(s)){var c=e[u],h=t[s];d.canWrite(c,h,u)&&(n[u]=h)}}}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}}},{key:"buildChanges",value:function(r){return Object.keys(r).reduce(function(e,t){var n=r[t];return e[t]={newValue:n,oldValue:n},e},{})}}]),n}(),Ys=function(){function e(){g(this,e),this.basket=new ya}return h(e,[{key:"using",value:function(e){return this.basket.using(e)}},{key:"ngOnDestroy",value:function(){this.basket.dispose()}}]),e}();var Zs=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.model=null,e.modelChanged=new ua,e.models=[],e.binder=new Ks(e),e}return c(t,Ys),h(t,[{key:"ngOnChanges",value:function(e){if(e.hasOwnProperty("model"))return this.modelChanged.emit(this.model),this.commit=this.setup(),void this.commit();this.commit||(this.commit=this.setup()),this.commit()}},{key:"ngOnDestroy",value:function(){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ngOnDestroy",this).call(this),this.binder.dispose()}},{key:"setup",value:function(){var e=!0;return this.model||(this.model=new da,this.modelChanged.emit(this.model),e=!1),this.binder.bound(this.model,this.models,e)}}]),t}();function Js(i){return Object.keys(i).reduce(function(e,t){var n=i[t],r=Object.keys(n).reduce(function(e,t){return e.push("\t"+t+":"+n[t]+" !important;"),e},[]);return e.push(t+"{\n"+r.join("\n")+"\n}"),e},[])}var Qs=ka(function(e,t){var n,r;n=ba,r=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,n=String(e),r=n.length,i=-1,o="",a=n.charCodeAt(0);++i<r;)0!=(t=n.charCodeAt(i))?o+=1<=t&&t<=31||127==t||0==i&&48<=t&&t<=57||1==i&&48<=t&&t<=57&&45==a?"\\"+t.toString(16)+" ":(0!=i||1!=r||45!=t)&&(128<=t||45==t||95==t||48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122)?n.charAt(i):"\\"+n.charAt(i):o+="�";return o};return e.CSS||(e.CSS={}),e.CSS.escape=t},e.exports=r(n)});Qs.cssEscape;function Xs(i,e){var o=i+"-"+e,a=document.getElementById(o);return{set:function(e){var t=(a||((a=document.createElement("style")).type="text/css",a.id=ec(o),document.getElementsByTagName("head")[0].appendChild(a)),a),n=Js(e),r="#"+tc(i);t.innerHTML=n.map(function(e){return r+" "+e}).join("\n")},remove:function(){a&&a.parentNode.removeChild(a)}}}function ec(e){return(""+e).replace(/\s|\t|\n|"|'/g,"_")}function tc(e){return Qs(ec(e))}var nc=function(){function t(e){g(this,t),this.elements=e}return h(t,[{key:"getBoundingClientRect",value:function(){var e=this.elements.map(function(e){return e.getBoundingClientRect()}),t=_o(e.map(function(e){return e.top})),n=_o(e.map(function(e){return e.left})),r=qo(e.map(function(e){return e.bottom})),i=qo(e.map(function(e){return e.right}));return{height:r-t,width:i-n,top:t,left:n,right:i,bottom:r}}},{key:"addClass",value:function(t){this.elements.forEach(function(e){return e.classList.add(ec(t))})}},{key:"removeClass",value:function(t){this.elements.forEach(function(e){return e.classList.remove(ec(t))})}},{key:"hasClass",value:function(t){return this.elements.some(function(e){return e.classList.contains(ec(t))})}},{key:"clientWidth",get:function(){return qo(this.elements.map(function(e){return e.clientWidth}))}},{key:"clientHeight",get:function(){return qo(this.elements.map(function(e){return e.clientHeight}))}},{key:"offsetWidth",get:function(){return qo(this.elements.map(function(e){return e.offsetWidth}))}},{key:"offsetHeight",get:function(){return qo(this.elements.map(function(e){return e.offsetHeight}))}},{key:"classList",get:function(){var t=this;return{add:function(e){return t.addClass(e)},remove:function(e){return t.removeClass(e)},contains:function(e){return t.hasClass(e)}}}}]),t}(),rc=function(){function t(e){g(this,t),this.elements=e}return h(t,[{key:"index",get:function(){var e=this.elements[0];return ca.notNull(e,"tr"),e.index}},{key:"model",get:function(){var e=this.elements[0];return ca.notNull(e,"tr"),e&&e.model}},{key:"element",get:function(){var e=this.elements;if(1<e.length)return new nc(e.map(function(e){return e.element}));var t=this.elements[0];return ca.notNull(t,"tr"),t.element}}]),t}(),ic=function(){function e(){g(this,e),this.rows=new Set,this.cells=new Set,this.elements=new Map,this.rowContainer=new Map}return h(e,[{key:"findModel",value:function(e){return this.elements.get(e)}},{key:"hasModel",value:function(e){return this.elements.has(e)}},{key:"getRowElements",value:function(){return this.rowContainer.values()}},{key:"getCellElements",value:function(){return this.cells}},{key:"addRow",value:function(e){var t=this.rowContainer,n=e.model,r=e.element;this.rows.add(e),this.elements.set(r,e);var i=t.get(n);i?i.elements.push(e):t.set(n,new rc([e]))}},{key:"addCell",value:function(e){this.cells.add(e),this.elements.set(e.element,e)}},{key:"deleteRow",value:function(e){var t=this.rowContainer,n=e.model,r=e.element;this.rows.delete(e),this.elements.delete(r);var i=t.get(n);if(i){var o=i.elements,a=o.indexOf(r);0<=a&&(o.splice(a,1),r.length||t.delete(n))}}},{key:"deleteCell",value:function(e){this.cells.delete(e),this.elements.delete(e.element)}}]),e}(),oc=function(e){function n(e,r){g(this,n);var a=m(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),t={get:function(e,t){ca.hasProperty(e,t);var n=e[t];return t.endsWith("Changed")?new Proxy(n,{get:function(e,t){return function(){return a.using(e[t].apply(e,arguments))}}}):r?new Proxy(n,{get:function(i,o){return function(){var e=i[o];if(!arguments.length)return e;var t=arguments.length<=0?void 0:arguments[0],n=e(),r=Object.keys(t).reduce(function(e,t){return e[t]=n[t],e},{});return a.using(function(){return e(r,{source:"model.proxy"})}),e.apply(void 0,arguments)}}}):n}};return a.target=e,a.subject=new Proxy(e,t),a}return c(n,ya),h(n,[{key:"toString",value:function(){return this.target.toString?this.target.toString():JSON.stringify(this.toJSON())}},{key:"toJSON",value:function(){return this.target.toJSON?this.target.toJSON():this.target}}]),n}(),ac=function(){function e(){g(this,e),this.modelProxy=null,this.markup={},this.bag={head:new ic,body:new ic,foot:new ic},this.table=null,this.commandManager=null}return h(e,[{key:"ngOnDestroy",value:function(){this.modelProxy&&(this.modelProxy.dispose(),this.modelProxy=null)}},{key:"isReady",get:function(){return!!this.modelProxy}},{key:"model",get:function(){return ca.notNull(this.modelProxy,"model"),this.modelProxy.subject},set:function(e){if(this.modelProxy&&this.modelProxy.target!==e)return this.modelProxy.dispose(),void(this.modelProxy=new oc(e));e&&(this.modelProxy=new oc(e))}}]),e}();ac.decorators=[{type:u.Injectable}],ac.ctorParameters=function(){return[]};var lc=function(){function t(e){g(this,t),this.onDestroy=e}return h(t,[{key:"destroy",value:function(){this.onDestroy()}}]),t}();var uc=function(){function e(){g(this,e),this.cache=new Map}return h(e,[{key:"get",value:function(e){return this.cache.get(e)}},{key:"put",value:function(e,t){this.cache.set(e,t)}}]),e}();uc.decorators=[{type:u.Injectable}];var sc=function(){function e(){g(this,e),this.cache=new Map}return h(e,[{key:"get",value:function(e){return this.cache.get(e)}},{key:"put",value:function(e,t){this.cache.set(e,t)}}]),e}();sc.decorators=[{type:u.Injectable}],sc.ctorParameters=function(){return[]};var cc=function(){function n(e,t){g(this,n),this.templateLink=e,this.templateCache=t}return h(n,[{key:"viewFactory",value:function(r){return function(e,t){var n=e.template;return t.createEmbeddedView(n,r)}}},{key:"find",value:function(e){if(Ht(e)){var t=e;return this.templateCache.get(t)||this.templateLink.get(t)||null}if(M(e))return this.lookInCache(e)||this.lookInLink(e)}},{key:"lookInCache",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,l=this.templateCache.get(a);if(l)return l}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return null}},{key:"lookInLink",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,l=this.templateLink.get(a);if(l)return l}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return null}}]),n}();cc.decorators=[{type:u.Injectable}],cc.ctorParameters=function(){return[{type:uc},{type:sc}]};var hc=function(){function t(e){g(this,t),this.templateService=e,this.layers=new Map}return h(t,[{key:"init",value:function(e){this.container=e;var t=this.layers;this.layers=new Map;var n=!0,r=!1,i=void 0;try{for(var o,a=Array.from(t.keys())[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;this.create(l)}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}},{key:"create",value:function(e){var t=this;if(this.layers.has(e))return this.layers.get(e);var n=this.container,r=this.templateService.find("layer-"+e+".tpl.html");r&&n&&this.templateService.viewFactory({})(r,n);var i=new lc(function(){t.layers.delete(e),t.container&&t.container.clear()});return this.layers.set(e,i),i}},{key:"count",get:function(){return this.layers.size}}]),t}();hc.decorators=[{type:u.Injectable}],hc.ctorParameters=function(){return[{type:cc}]};var fc=function e(t,n,r){g(this,e),this.command=t,this.title=n,this.icon=r,this.id=null,this.templateUrl=null},dc=function(){function e(){g(this,e)}return h(e,[{key:"add",value:function(){}},{key:"remove",value:function(){}}]),e}(),gc=Object.freeze({left:0,right:0,top:0,bottom:0,width:0,height:0}),mc=function(){function e(){g(this,e),this.classList=new dc}return h(e,[{key:"getBoundingClientRect",value:function(){return gc}},{key:"clientWidth",get:function(){return 0}},{key:"clientHeight",get:function(){return 0}},{key:"offsetWidth",get:function(){return 0}},{key:"offsetHeight",get:function(){return 0}}]),e}(),pc=new mc,vc=function(){function e(){g(this,e)}return h(e,[{key:"rect",value:function(){return this.getElement().getBoundingClientRect()}},{key:"addClass",value:function(e){this.addClassCore(e)}},{key:"removeClass",value:function(e){this.removeClassCore(e)}},{key:"hasClass",value:function(e){return this.hasClassCore(e)}},{key:"width",value:function(){return this.getElement().clientWidth}},{key:"height",value:function(){return this.getElement().clientHeight}},{key:"getElement",value:function(){return this.getElementCore()||pc}},{key:"addClassCore",value:function(e){this.getElement().classList.add(ec(e))}},{key:"removeClassCore",value:function(e){this.getElement().classList.remove(ec(e))}},{key:"hasClassCore",value:function(e){return this.getElement().classList.contains(ec(e))}},{key:"getElementCore",value:function(){return null}}]),e}();function yc(e,t){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var xc=function(e){function l(e,t,n){g(this,l);var r=m(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return r.context=e,r.model=t,r.markup=n,r.layers=new Map,r}return c(l,vc),h(l,[{key:"columns",value:function(){return this.model.scene().column.line}},{key:"focus",value:function(){var e=this.getElementsCore("body");return!!e.length&&(e[0].focus(),!0)}},{key:"blur",value:function(){this.getElementsCore("body").forEach(function(e){return e.blur()})}},{key:"isFocused",value:function(){var t=this;return this.getElementsCore("view").some(function(e){return t.isFocusedCore(e)})}},{key:"addLayer",value:function(e){var t=this.layers;if(t.has(e))return t.get(e);var n=this.context.layer(e);return t.set(e,n),n}},{key:"removeLayer",value:function(e){var t=this.layers;return!!t.has(e)&&(t.get(e).destroy(),t.delete(e),!0)}},{key:"hasLayer",value:function(e){return this.layers.has(e)}},{key:"addClass",value:function(e){this.markup.view&&this.markup.view.classList.add(ec(e))}},{key:"removeClass",value:function(e){this.markup.view&&this.markup.view.classList.remove(ec(e))}},{key:"scrollLeft",value:function(e){var t=this.markup;return arguments.length?(t.head&&(t.head.scrollLeft=e),t.foot&&(t.foot.scrollLeft=e),t.body&&(t.body.scrollLeft=e),t["body-top"]&&(t["body-top"].scrollLeft=e),void(t["body-bottom"]&&(t["body-bottom"].scrollLeft=e))):this.getElement().scrollLeft}},{key:"scrollTop",value:function(t){if(!arguments.length)return this.getElement().scrollTop;this.getElementsCore("body").forEach(function(e){return e.scrollTop=t})}},{key:"scrollHeight",value:function(){return this.getElement().scrollHeight}},{key:"scrollWidth",value:function(){return this.getElement().scrollWidth}},{key:"canScrollTo",value:function(e,t){if(e&&!(e.element instanceof mc))switch(t){case"left":if(e=e.element){var n=this.markup;if(n.table)return yc(n.table,e)}break;case"top":return!0}return!1}},{key:"rect",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"body",t=this.markup[e];if(t){var n=t.getBoundingClientRect(),r=t.clientWidth,i=t.clientHeight,o=n.left,a=n.top;return{left:o,top:a,right:o+r,bottom:a+i,width:r,height:i}}return s(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"rect",this).call(this)}},{key:"height",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"body",t=this.markup[e];return t?t.clientHeight:0}},{key:"width",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"body",t=this.markup[e];return t?t.clientWidth:0}},{key:"getElementCore",value:function(){return this.markup.body}},{key:"isFocusedCore",value:function(e){return yc(e,this.markup.document.activeElement)}},{key:"getElementsCore",value:function(e){var t=this.markup;return[e+"-left",e,e+"-right"].filter(function(e){return t.hasOwnProperty(e)}).map(function(e){return t[e]})}}]),l}(),wc=function(){function t(e){g(this,t),this.model=e}return h(t,[{key:"columns",value:function(){return this.model.view().columns}},{key:"columnMap",value:function(){return uu(this.columns())}},{key:"rows",value:function(){return this.model.view().rows}}]),t}(),bc=function(){function e(){g(this,e)}return h(e,[{key:"resource",value:function(){}},{key:"destroy",value:function(){}}]),e}(),kc=function(e){function n(e){g(this,n);var t=m(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.element=e,t}return c(n,vc),h(n,[{key:"getElementCore",value:function(){return this.element}}]),n}(),Cc=function(){function t(e){g(this,t),this.tr=e,this.index=e.index}return h(t,[{key:"model",get:function(){if(!t.equals(this,this.tr))throw new Xo("tr","Internal model doesn't match container");return this.tr.model}},{key:"element",get:function(){if(!t.equals(this,this.tr))throw new Xo("tr","Internal model doesn't match container");return this.tr.element}}],[{key:"equals",value:function(e,t){return e===t||!(!e||!t)&&e.index===t.index}}]),t}(),qc=function(e){function i(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;g(this,i);var r=m(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,n));return r.box=e,r.index=t,r}return c(i,kc),h(i,[{key:"model",value:function(){var e=this.box.context.bag.findModel(this.getKeyElementCore());return e?new Cc(e):null}},{key:"cells",value:function(){return this.box.rowCellsCore(this.index)}},{key:"cell",value:function(e){return this.box.cellCore(this.index,e)}},{key:"getKeyElementCore",value:function(){var e=s(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"getElement",this).call(this);return e.elements?e.elements[0]:e}}]),i}(),Oc=function(){function n(e,t){g(this,n),this.box=e,this.index=t}return h(n,[{key:"model",value:function(){return this.box.model.view().columns[this.index]||null}},{key:"cells",value:function(){return this.box.columnCellsCore(this.index)}},{key:"cell",value:function(e){return this.box.cell(e,this.index)}},{key:"addClass",value:function(e){for(var t=this.cells(),n=t.length,r=0;r<n;){t[r++].addClass(e)}}},{key:"removeClass",value:function(e){for(var t=this.cells(),n=t.length,r=0;r<n;){t[r++].removeClass(e)}}}]),n}(),_c=function(){function t(e){g(this,t),this.td=e,this.rowIndex=e.rowIndex,this.columnIndex=e.columnIndex}return h(t,[{key:"mode",value:function(e){if(!t.equals(this,this.td))throw new Xo("td","Internal model doesn't match container");this.td.mode(e)}},{key:"row",get:function(){if(!t.equals(this,this.td))throw new Xo("td","Internal model doesn't match container");return this.td.row}},{key:"column",get:function(){if(!t.equals(this,this.td))throw new Xo("td","Internal model doesn't match container");return this.td.column}},{key:"value",get:function(){if(!t.equals(this,this.td))throw new Xo("td","Internal model doesn't match container");return this.td.value},set:function(e){if(!t.equals(this,this.td))throw new Xo("td","Internal model doesn't match container");this.td.value=e}},{key:"label",get:function(){if(!t.equals(this,this.td))throw new Xo("td","Internal model doesn't match container");return this.td.label},set:function(e){if(!t.equals(this,this.td))throw new Xo("td","Internal model doesn't match container");this.td.label=e}},{key:"element",get:function(){if(!t.equals(this,this.td))throw new Xo("td","Internal model doesn't match container");return this.td.element}}],[{key:"equals",value:function(e,t){return e===t||!(!e||!t)&&(e.rowIndex===t.rowIndex&&e.columnIndex===t.columnIndex)}}]),t}(),Ic=function(e){function o(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;g(this,o);var i=m(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,r));return i.context=e,i.rowIndex=t,i.columnIndex=n,i}return c(o,kc),h(o,[{key:"model",value:function(){return this.modelCore()}},{key:"modelCore",value:function(){var e=this.context.bag.findModel(this.getElement());return e?new _c(e):null}}]),o}(),Ec=function(){function t(e){g(this,t),this.isDataRow=e}return h(t,[{key:"build",value:function(e){for(var t=e.rows,n=this.isDataRow,r=[],i=[],o=0,a=0,l=t.length;a<l;a++){var u=t[a];if(n(u)){for(var s=i.length>o?i[o]:i[o]=[0],c=u.cells,h=0,f=c.length;h<f;h++)for(var d=c[h],g=d.rowSpan,m=d.colSpan,p=s[0],v=p+m,y=0;y<g;y++){for(var x=o+y,w=r.length>x?r[x]:r[x]=[],b=0;b<m;b++){w[p+b]=d}var k=i.length>x?i[x]:i[x]=[0],C=Ko(k,p);if(w[v])k.splice(C,1);else{var q=k[C];k.splice(C,w[q]?1:0,v)}}o++}}return r}},{key:"assertFlatness",value:function(e){if(e.length)for(var t=e.length,n=e[0].length,r=1;r<t;r++)if(e[r].length!==n)throw new Xo("matrix","Matrix is not flat, expect width "+n+", actual "+e[r].length)}}]),t}(),zc=function(){function r(e,t,n){g(this,r),this.matrix=e,this.bag=t,this.factory=n}return h(r,[{key:"columnCount",value:function(e){var t=this.matrix[e];return t?new Set(t).size:0}},{key:"columnCells",value:function(e){for(var t=this.factory,n=this.matrix,r=[],i=new Set,o=0,a=n.length;o<a;o++){var l=n[o];if(l.length>e){var u=l[e];i.has(u)||(i.add(u),r.push(t.cell(u,o,e)))}}return r}},{key:"rowCount",value:function(e){for(var t=this.matrix,n=new Set,r=0,i=t.length;r<i;r++){var o=t[r];if(o.length>e){var a=o[e];n.add(a)}}return n.size}},{key:"rows",value:function(e){var t=this.matrix,n=this.factory,r=this.bag,i=new Set,o=[];if(sr(e)){var a=r.getRowElements(),l=!0,u=!1,s=void 0;try{for(var c,h=a[Symbol.iterator]();!(l=(c=h.next()).done);l=!0){var f=c.value;o.push(n.row(f.element,f.index))}}catch(e){u=!0,s=e}finally{try{!l&&h.return&&h.return()}finally{if(u)throw s}}o.sort(function(e,t){return e.index-t.index})}else for(var d=0,g=t.length;d<g;d++){var m=t[d];if(m.length>e){var p=m[e].parentElement;i.has(p)||(i.add(p),o.push(n.row(p,d)))}}return o}},{key:"rowCells",value:function(e){var t=this.matrix[e],n=[];if(t)for(var r=new Set,i=this.factory,o=0,a=t.length;o<a;o++){var l=t[o];r.has(l)||(r.add(l),n.push(i.cell(l,e,o)))}return n}},{key:"row",value:function(e,t){var n=this.factory;if(!sr(t)){var r=this.td(e,t);return n.row(r?r.parentElement:new mc,e)}var i=this.matrix[e];if(i){var o=new Set,a=!0,l=!1,u=void 0;try{for(var s,c=i[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var h=s.value;o.add(h.parentElement)}}catch(e){l=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(l)throw u}}var f=Array.from(o);return n.row(1<f.length?new nc(f):f[0],e)}return n.row(new mc,e)}},{key:"cell",value:function(e,t){var n=this.td(e,t);return this.factory.cell(n||new mc,e,t)}},{key:"td",value:function(e,t){var n=this.matrix[e];if(n){var r=n[t];if(r)return r}return null}}]),r}(),Rc=function(){function n(e,t){g(this,n),this.buildSelectors=e,this.factory=t}return h(n,[{key:"columnCount",value:function(e){var t=this.buildSelectors({row:e});return t.length?bo(t,function(e){return e.invoke(function(e,t){return e.columnCount(t)})}):0}},{key:"columnCells",value:function(e){for(var t=this.buildSelectors({column:e}),n=[],r=0,i=t.length;r<i;r++){var o=t[r].invoke(function(e,t){return e.columnCells(t)});n.push.apply(n,b(o))}return n}},{key:"rowCount",value:function(e){var t=this.buildSelectors({column:e});return t.length?qo(t.map(function(e){return e.invoke(function(e,t){return e.rowCount(t)})})):0}},{key:"rows",value:function(e){for(var t=sr(e)?{}:{column:e},n=this.buildSelectors(t),r=this.factory,i=[],o=0,a=n.length;o<a;o++){var l=n[o].invoke(function(e,t){return e.rows(t)});l.length&&i.push(l)}for(var u=Eo.apply(void 0,i),s=[],c=0,h=u.length;c<h;c++){var f=u[c],d=f.map(function(e){return e.element}),g=1<d.length?new nc(d):d[0],m=f[0].index,p=r.row(g,m);s.push(p)}return s}},{key:"rowCells",value:function(e){for(var t=this.buildSelectors({row:e}),n=[],r=0,i=t.length;r<i;r++){var o=t[r].invoke(function(e,t){return e.rowCells(t)});n.push.apply(n,b(o))}return n}},{key:"row",value:function(e,t){var n={row:e};sr(t)||(n.column=t);for(var r=this.buildSelectors(n),i=[],o=0,a=r.length;o<a;o++){var l=r[o].invoke(function(e,t,n){return e.row(t,n)});i.push(l.element)}return this.factory.row(new nc(i),e)}},{key:"cell",value:function(e,t){for(var n={row:e,column:t},r=this.buildSelectors(n),i=0,o=r.length;i<o;i++){var a=r[i].invoke(function(e,t,n){return e.cell(t,n)});if(!(a.element instanceof mc))return a}return this.factory.cell(new mc,e,t)}}]),n}(),jc=function(){function n(e,t){g(this,n),this.rowRange=e,this.columnRange=t}return h(n,[{key:"cell",value:function(e,t,n){return{element:e,rowIndex:t+this.rowRange.start,columnIndex:n+this.columnRange.start}}},{key:"row",value:function(e,t){return{element:e,index:t+this.rowRange.start}}}]),n}(),Sc=function e(t,n){g(this,e),this.start=t,this.end=n},Pc=function(){function n(e,t){g(this,n),this.bag=e,this.selectorMark=t}return h(n,[{key:"create",value:function(){var a=this.bag,e=this.selectorMark,i=new Ec(function(e){return a.elements.has(e)}),t=e.select().map(function(e){var t=e.element,n=e.rowRange,r=e.columnRange;return{matrix:i.build(t),rowRange:n,columnRange:r}}),n=new jc(new Sc(0,0),new Sc(0,0));return new Rc(function(o){return t.map(function(i){return{invoke:function(e){var t=new jc(i.rowRange,i.columnRange),n=new zc(i.matrix,a,t),r=[];return r.push(n),o.hasOwnProperty("row")&&r.push(o.row-i.rowRange.start),o.hasOwnProperty("column")&&r.push(o.column-i.columnRange.start),e.apply(void 0,r)}}})},n)}}]),n}(),Ac=function(){function i(e,t,n){var r=this;g(this,i),this.context=e,this.model=t,this.selectFactory=new Pc(e.bag,n),this.selector=this.selectFactory.create(),t.sceneChanged.on(function(e){e.hasChanges("status")&&"stop"===e.state.status&&(r.selector=r.selectFactory.create())})}return h(i,[{key:"columnCount",value:function(e){return this.selector.columnCount(e)}},{key:"column",value:function(e){return this.createColumnCore(e)}},{key:"columns",value:function(e){var t=this;return this.selector.rowCells(e).map(function(e){return t.createColumnCore(e.columnIndex)})}},{key:"row",value:function(e,t){return this.rowCore(e,t)}},{key:"rows",value:function(e){var t=this;return this.selector.rows(e).map(function(e){return t.createRowCore(e.index,e.element)})}},{key:"rowCount",value:function(e){return this.selector.rowCount(e)}},{key:"cell",value:function(e,t){return this.cellCore(e,t)}},{key:"getElements",value:function(){return[]}},{key:"rowCore",value:function(e,t){return this.createRowCore(e,this.selector.row(e,t).element)}},{key:"cellCore",value:function(e,t){var n=this.selector.cell(e,t);return this.createCellCore(n.rowIndex,n.columnIndex,n.element)}},{key:"rowCellsCore",value:function(e){var t=this;return this.selector.rowCells(e).map(function(e){return t.createCellCore(e.rowIndex,e.columnIndex,e.element)})}},{key:"columnCellsCore",value:function(e){var t=this;return this.selector.columnCells(e).map(function(e){return t.createCellCore(e.rowIndex,e.columnIndex,e.element)})}},{key:"createRowCore",value:function(e,t){return new qc(this,e,t)}},{key:"createColumnCore",value:function(e){return new Oc(this,e)}},{key:"createCellCore",value:function(e,t,n){return new Ic(this.context,e,t,n)}}]),i}(),Lc=function(){function r(e,t,n){g(this,r),this.model=e,this.name=n,this.markup=t}return h(r,[{key:"select",value:function(){var e=[],t=this.addFactory(e);return t("left"),t(null),t("right"),e}},{key:"addFactory",value:function(l){var u=this,e=this.model,s=e.view().rows,c=e.scene().column.area;return function(e){var t=e?u.name+"-"+e:u.name,n=u.markup[t];if(n){var r=l[l.length-1],i=r?r.columnRange.end:0,o=c[e].length,a=s.length;l.push({element:n,columnRange:new Sc(i,i+o),rowRange:new Sc(0,0+a)})}return l}}}]),r}(),Mc=function(e){function r(e,t,n){return g(this,r),m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t,new Lc(t,n,"head")))}return c(r,Ac),r}(),Tc=function(){function t(e){g(this,t),this.context=e,this.entries=new Map}return h(t,[{key:"addClass",value:function(e,t){var n=this.key(e);if(null!==n){var r=this.entries.get(n);r||(r=new Set,this.entries.set(n,r)),r.add(t)}}},{key:"removeClass",value:function(e,t){var n=this.key(e);if(null!==n){var r=this.entries.get(n);if(r)return r.delete(t),r.size||this.entries.delete(n),!0}return!1}},{key:"key",value:function(e){return e}}]),t}(),Dc=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Tc),h(t,[{key:"key",value:function(e){return e.dataRowIndex+"x"+e.dataColumnIndex}}]),t}(),Nc=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Tc),h(t,[{key:"key",value:function(e){return e.dataIndex}}]),t}(),Fc=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return c(t,Tc),h(t,[{key:"key",value:function(e){return e.dataIndex}}]),t}(),Vc=function(){function t(e){g(this,t),this.selector=e}return h(t,[{key:"mode",value:function(e){return this.model.mode(e)}},{key:"model",get:function(){var e=this.selector();if(!e)throw new Xo("cell","Model is not found");return e}},{key:"value",get:function(){return this.model.value},set:function(e){this.model.value=e}},{key:"label",get:function(){return this.model.label},set:function(e){this.model.label=e}},{key:"element",get:function(){return this.model.element||new mc}}]),t}(),$c=function(e){function a(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;g(this,a);var i=m(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e.context,t,n,r)),o=(i.box=e).context.mapper;return i.dataRowIndex=o.viewToRow(t),i.dataColumnIndex=o.viewToColumn(n),i}return c(a,Ic),h(a,[{key:"model",value:function(){var e=this,t=this.dataRowIndex,n=this.dataColumnIndex;if(0<=t&&0<=n){var r=this.box.model,i=r.data().rows,o=r.view().columns;if(i.length>t&&o.length>n){var a=new Vc(function(){return e.box.cell(t,n).modelCore()});return a.rowIndex=t,a.columnIndex=n,a.row=i[t],a.column=o[n],new _c(a)}}return null}},{key:"addClass",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.box.addCellClass(this,e,t)}},{key:"removeClass",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.box.removeCellClass(this,e,t)}}]),a}(),Bc=function(e){function i(e,t){g(this,i);var n=m(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t)),r=(n.box=e).context.mapper;return n.dataIndex=r.viewToColumn(t),n}return c(i,Oc),h(i,[{key:"cells",value:function(){return this.box.columnCellsCore(this.dataIndex)}},{key:"cell",value:function(e){return this.box.cell(e,this.dataIndex)}},{key:"addClass",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.box.addColumnClass(this,e,t)}},{key:"removeClass",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.box.removeColumnClass(this,e,t)}}]),i}(),Uc=function(){function t(e){g(this,t),this.classList=new dc,this.getRect=e}return h(t,[{key:"getBoundingClientRect",value:function(){return this.getRect()}},{key:"clientWidth",get:function(){return this.getRect().width}},{key:"clientHeight",get:function(){return this.getRect().height}},{key:"offsetWidth",get:function(){return this.getRect().width}},{key:"offsetHeight",get:function(){return this.getRect().height}}]),t}(),Hc=function(e){function o(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;g(this,o);var r=m(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t,n)),i=e.context.mapper;return r.dataIndex=i.viewToRow(t),r}return c(o,qc),h(o,[{key:"model",value:function(){var e=s(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"model",this).call(this);if(e)return e;var t=this.dataIndex;if(0<=t){var n=this.box.model.data().rows;if(n.length>t)return n[t]}return null}},{key:"cells",value:function(){return this.box.rowCellsCore(this.dataIndex)}},{key:"cell",value:function(e){return this.box.cellCore(this.dataIndex,e)}},{key:"addClass",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.box.addRowClass(this,e,t)}},{key:"removeClass",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.box.removeRowClass(this,e,t)}}]),o}(),Wc=function(e){function a(e,t,n){g(this,a);var r=m(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e,t,n));return r.cellBox=new Dc(e),r.rowBox=new Fc(e),r.columnBox=new Nc(e),r.requestInvalidate=new ua,r}return c(a,Ac),h(a,[{key:"addCellClass",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]?e.addClassCore(t):(this.cellBox.addClass(e,t),this.requestInvalidate.emit({source:"addCellClass"}))}},{key:"removeCellClass",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]?e.removeClassCore(t):(this.cellBox.removeClass(e,t),this.requestInvalidate.emit({source:"removeCellClass"}))}},{key:"addRowClass",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]?e.addClassCore(t):(this.rowBox.addClass(e,t),this.requestInvalidate.emit({source:"addRowClass"}))}},{key:"removeRowClass",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]?e.removeClassCore(t):(this.rowBox.removeClass(e,t),this.requestInvalidate.emit({source:"removeRowClass"}))}},{key:"addColumnClass",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]?e.addClassCore(t):(this.columnBox.addClass(e,t),this.requestInvalidate.emit({source:"addColumnClass"}))}},{key:"removeColumnClass",value:function(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]?e.removeClassCore(t):(this.columnBox.removeClass(e,t),this.requestInvalidate.emit({source:"removeColumnClass"}))}},{key:"columns",value:function(){var n=this,e=this.context.view.columns();return e.map(function(e,t){return n.createColumnCore(t)})}},{key:"rows",value:function(e){var t=this,n=this.context.mapper;return this.selector.rows(e).map(function(e){return t.createRowCore(n.rowToView(e.index),e.element)})}},{key:"rowCount",value:function(){return this.model.pagination().count}},{key:"rowCore",value:function(e){var t=this.context.mapper.rowToView(e);if(0<=t&&t<s(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"rowCount",this).call(this,0))return s(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"rowCore",this).call(this,t);var n=this.rowRectFactory();return this.createRowCore(t,new Uc(n(t)))}},{key:"cellCore",value:function(e,t){var n=this.context.mapper,r=n.rowToView(e),i=n.columnToView(t);if(0<=r&&r<s(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"rowCount",this).call(this,i))return s(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"cellCore",this).call(this,r,i);var o=this.cellRectFactory();return this.createCellCore(r,i,new Uc(o(r,i)))}},{key:"rowCellsCore",value:function(e){var n=this,r=this.context.mapper,i=r.rowToView(e);if(0<=i&&i<s(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"rowCount",this).call(this,0))return s(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"rowCellsCore",this).call(this,i);var o=this.cellRectFactory();return s(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"rowCellsCore",this).call(this,0).map(function(e,t){return n.createCellCore(i,t,new Uc(o(i,r.columnToView(t))))})}},{key:"createRowCore",value:function(e,t){return new Hc(this,e,t)}},{key:"createCellCore",value:function(e,t,n){return new $c(this,e,t,n)}},{key:"createColumnCore",value:function(e){return new Bc(this,e)}},{key:"rowRectFactory",value:function(){var n=this,e=this.model.row().height,r=L(e)?e:function(){return e},i=null;return function(t){return function(){i||(i=n.context.view.rect());var e=r(null,t);return{left:0,right:0,top:i.top+e*t,bottom:i.top+e*(t+1),width:0,height:e}}}}},{key:"cellRectFactory",value:function(){var a=this,e=this.model.row().height,l=L(e)?e:function(){return e},u=this.model.pagination().count,s=this.model.layout().columns,c=this.model.view().columns,h=null;return function(i,o){return function(){h||(h=a.context.view.rect());var e=c[o],t=l(null,i),n=h.top+t*i-(0<i?0:(u+i)*t),r=s.has(e.key)?s.get(e.key).width:0;return{left:0,right:0+r,top:n,bottom:n+t,width:r,height:t}}}}}]),a}(),Gc=function(e){function r(e,t,n){return g(this,r),m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t,new Lc(t,n,"body")))}return c(r,Ac),r}(),Kc=function(e){function r(e,t,n){return g(this,r),m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t,new Lc(t,n,"body")))}return c(r,Wc),r}(),Yc=function(e){function r(e,t,n){return g(this,r),m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t,new Lc(t,n,"foot")))}return c(r,Ac),r}(),Zc=function(){function i(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};g(this,i),this.model=e,this.markup=t;var r=e.scroll;this.context=Fi({mapper:{rowToView:function(e){return r().map.rowToView(e)},viewToRow:function(e){return r().map.viewToRow(e)},columnToView:$o,viewToColumn:$o},layer:function(){return new bc},bag:{head:new ic,body:new ic,foot:new ic}},n),this.head=this.headCore(),this.body=this.bodyCore(),this.foot=this.footCore()}return h(i,[{key:"headCore",value:function(){var e=this.box("head");return new Mc(e,this.model,this.markup)}},{key:"bodyCore",value:function(){var e=this.box("body");return"virtual"===this.model.scroll().mode?new Kc(e,this.model,this.markup):new Gc(e,this.model,this.markup)}},{key:"footCore",value:function(){var e=this.box("foot");return new Yc(e,this.model,this.markup)}},{key:"box",value:function(e){var t=this.view,n=this.data,r=this.context,i=r.mapper,o=r.layer,a=r.bag;switch(e){case"body":return{mapper:i,layer:o,bag:a[e],view:t,data:n};default:return{mapper:{rowToView:$o,viewToRow:$o,columnToView:$o,viewToColumn:$o},layer:o,bag:a[e],view:t,data:n}}}},{key:"view",get:function(){return this._view?this._view:this._view=new xc(this.context,this.model,this.markup)}},{key:"data",get:function(){return this._data?this._data:this._data=new wc(this.model)}}]),i}(),Jc=function(){function t(e){g(this,t),this.root=e,this.modelProxy=null}return h(t,[{key:"keep",value:function(e,t){var n={};for(var r in e){var i=e[r];n[r]=i.currentValue}new Ks(n).bound(this.model,t,!1,!1)()}},{key:"ngOnDestroy",value:function(){this.modelProxy&&(this.modelProxy.dispose(),this.modelProxy=null)}},{key:"model",get:function(){var e=this.root.model;return this.modelProxy?e!==this.modelProxy.target&&(this.modelProxy.dispose(),ca.notNull(e,"model"),this.modelProxy=new oc(e)):(ca.notNull(e,"model"),this.modelProxy=new oc(e)),this.modelProxy.subject}},{key:"table",get:function(){var e=this.root.table;return ca.notNull(e,"table"),e}}]),t}();Jc.decorators=[{type:u.Injectable}],Jc.ctorParameters=function(){return[{type:ac}]};var Qc=function(){function e(){g(this,e)}return h(e,[{key:"model",value:function(){return new da}},{key:"service",value:function(e){return new Oa(e)}},{key:"noop",get:function(){return No}},{key:"identity",get:function(){return $o}},{key:"pipe",get:function(){return Ru}},{key:"pipeUnit",get:function(){return Vu}},{key:"Command",get:function(){return Ea}},{key:"Action",get:function(){return fc}},{key:"Node",get:function(){return Node}},{key:"RowDetailsStatus",get:function(){return Mu}},{key:"valueFactory",get:function(){return ta}},{key:"labelFactory",get:function(){return ia}}]),e}();Qc.decorators=[{type:u.Injectable}],Qc.ctorParameters=function(){return[]};var Xc=function(){function e(){g(this,e),this.themeName="",this.changed=new ua}return h(e,[{key:"name",get:function(){return this.themeName},set:function(e){e!==this.themeName&&(this.themeName=e,this.changed.emit({newValue:e,oldValue:e}))}}]),e}();Xc.decorators=[{type:u.Injectable}],Xc.ctorParameters=function(){return[]};var eh=function(){function t(e){g(this,t),this.manager=e}return h(t,[{key:"filter",value:function(e){return this.manager.filter(e)}},{key:"invoke",value:function(e){return this.manager.invoke(e)}}]),t}(),th=function(e){function r(e,t){g(this,r);var n=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t));return n.model=e,n}return c(r,eh),h(r,[{key:"filter",value:function(e){if("edit"===this.model.edit().state){var t=this.model.navigation().cell;if(t&&"select"!==t.column.type)return[]}return s(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"filter",this).call(this,e)}}]),r}(),nh=function e(t,a){var n=this;g(this,e);var l=new Map,u=function(e,t,n,r,i){var o="valueFactory-"+t.key;return(n=l.get(o))||(n=ta(t),l.set(o,n)),a.getValue(e,t,n,r,i)},r=function(e,t,n,r,i){var o="getValue-"+r+"x"+t.key;if(l.has(o))return l.get(o);var a=u(e,t,n,r,i);return l.set(o,a),a},s=function(e,t,n,r,i){var o="labelFactory-"+t.key;return(n=l.get(o))||(n=ia(t),l.set(o,n)),a.getLabel(e,t,n,r,i)},i=function(e,t,n,r,i){var o="getLabel-"+r+"x"+t.key;if(l.has(o))return l.get(o);var a=s(e,t,n,r,i);return l.set(o,a),a};this.getValue=u,this.getLabel=s,this.colspan=function(e,t,n,r){var i="colspan-"+n+"x"+t.model.key;if(l.has(i))return l.get(i);var o=a.colspan(e,t,n,r);return l.set(i,o),o},this.rowspan=function(e,t,n,r){var i="rowspan-"+n+"x"+t.model.key;if(l.has(i))return l.get(i);var o=a.rowspan(e,t,n,r);return l.set(i,o),o},this.columns=function(e,t,n){var r="columns-"+t+"-"+n;if(l.has(r))return l.get(r);var i=a.columns(e,t,n);return l.set(r,i),i},this.setValue=function(){return a.setValue.apply(a,arguments)},this.setLabel=function(){return a.setLabel.apply(a,arguments)},this.columnList=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t="columnList-"+e;if(l.has(t))return l.get(t);var n=a.columnList(e);return l.set(t,n),n},t.sceneChanged.watch(function(e){e.hasChanges("status")&&"stop"!==e.state.status&&(l=new Map)}),t.gridChanged.watch(function(e){e.hasChanges("isReadonly")&&(l=new Map,e.state.isReadonly?(n.getValue=r,n.getLabel=i):(n.getValue=getValue,n.getLabel=n.getLabel))})};function rh(e,t,n){return n(e,t)}var ih=function e(t){g(this,e);var n={},r=[];t.sceneChanged.watch(function(e){e.hasChanges("column")&&(n=e.state.column.area,r=e.state.column.line)}),this.getValue=rh,this.getLabel=rh,this.setValue=na,this.setLabel=oa,this.colspan=function(e,t){return t.colspan},this.rowspan=function(){return 1};var i=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return sr(e)?r:n[e]||[]};this.columnList=i,this.columns=function(e,t){return i(t)}},oh=function e(n){g(this,e),this.columns=n.getColumns,this.rowspan=n.rowspan,this.colspan=function(e,t){return bo(n.columnList(t.model.pin),function(e){return e.colspan})},this.columns=function(e,t){return e.column.model.pin===t?[e.column]:n.columnList(t)},this.getValue=function(){throw new Xo("details.row","Can't get value from row details")},this.getLabel=function(){throw new Xo("details.row","Can't get label from row details")},this.setValue=function(){throw new Xo("details.row","Can't set value to row details")},this.setLabel=function(){throw new Xo("details.row","Can't set label to row details")}},ah=function(){function o(){g(this,o)}return h(o,null,[{key:"first",value:function(e,t){return e.length?t(e[0]):null}},{key:"last",value:function(e,t){var n=e.length;return n?t(e[n-1]):null}},{key:"max",value:function(e,t){var n=e.length;if(!n)return null;for(var r=Number.MIN_SAFE_INTEGER;n--;)r=Math.max(r,t(e[n]));return r}},{key:"min",value:function(e,t){var n=e.length;if(!n)return null;for(var r=Number.MAX_SAFE_INTEGER;n--;)r=Math.min(r,t(e[n]));return r}},{key:"minMax",value:function(e,t){var n=e.length;if(!n)return null;for(var r=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER;n--;){var o=t(e[n]);r=Math.min(r,o),i=Math.max(i,o)}return[r,i]}},{key:"avg",value:function(e,t,n){var r=e.length;if(!r)return null;if(n.distinct){var i=new Set;return o.sum(e,t,n,i)/i.size}return o.sum(e,t,n)/r}},{key:"sum",value:function(e,t,n,r){var i=e.length;if(!i)return null;var o=0;if(n.distinct)for(r=r||new Set;i--;){var a=t(e[i]);r.has(a)||(o+=a,r.add(a))}else for(;i--;)o+=Number(t(e[i]));return o}},{key:"join",value:function(e,t,n){var r=e.length;if(!r)return null;var i=t(e[0]),o=n.separator||"";if(n.distinct){var a=new Set,l=i;a.add(l);for(var u=1;u<r;)l=t(e[u]),a.has(l)||(i+=o+l,a.add(l)),u++}else for(var s=1;s<r;)i+=o+t(e[s]),s++;return i}},{key:"count",value:function(e,t,n){var r=e.length;if(!r)return null;if(n.distinct){for(var i=new Set;r--;){var o=Number(t(e[r]));i.add(o)}return i.size}return r}}]),o}(),lh=function e(s,c){g(this,e);var r=c.columnList,t=c.rowspan;this.columnList=r,this.rowspan=t;var n=Pl(s),i={group:n("group"),summary:n("group-summary")};this.getLabel=this.getValue=function(e,t,n,r,i){if("pivot"===t.type)return c.getLabel(e,t,n,r,i);var o=s.data().rows;switch(e.type){case"group":case"summary":var a=t.aggregation;if(a){if(!ah.hasOwnProperty(a))throw new Xo("node.row","Aggregation "+a+" is not supported");var l=e.rows.map(function(e){return o[e]});return ah[a](l,n,t.aggregationOptions)}return null;case"row":var u=e.rows[0];return n(o[u],t);case"value":return n(e,t);default:throw new Xo("node.row","Invalid node type "+e.type)}},this.setValue=function(e,t,n,r,i){switch(e.type){case"row":var o=s.data().rows,a=e.rows[0];c.setValue(o[a],t,n,a,i);break;case"value":c.setValue(e,t,n,r,i);break;default:throw new Xo("node.row","Can't set value to "+e.type+" node")}},this.setLabel=function(e,t,n,r,i){switch(e.type){case"row":var o=s.data().rows,a=e.rows[0];c.setLabel(o[a],t,n,a,i);break;case"value":c.setLabel(e,t,n,r,i);break;default:throw new Xo("node.row","Can't set label to "+e.type+" node")}},this.colspan=function(e,t){return"summary"===e.type?bo(r(t.model.pin),function(e){return e.colspan}):t.colspan},this.columns=function(e,t){return"summary"===e.type?[i.summary]:r(t)},this.findGroupColumn=function(e){var t=r().find(function(e){return"group"===e.model.type});if(!t&&(t=i.group).model.pin===e){var n=r(e)[0];t.columnIndex=n?n.columnIndex:0}return t.model.pin!==e?null:t}},uh=function e(o,t){g(this,e);var n=t.columnList,r=t.getValue,i=t.getLabel,a=t.columns;this.setValue=t.setValue,this.setLabel=t.setLabel,this.colspan=t.colspan,this.columnList=n;this.rowspan=function r(e,i){var t=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];switch(e.type){case"group":if("group"===i.model.type){if(e.state.expand){if(!t||e.source===i.model.by)return e.children.reduce(function(e,t,n){return e+r(t,i,!1)},0);if(e.children.length)return r(e.children[0],i,!1)}return 1}}return 1};var l=function(i){return function(e,t,n){switch(e.type){case"group":var r=function e(t){return"group"!==t.type?t:t.state.expand?t.children.length&&e(t.children[0]):null}(e);return r?n(o.data().rows[r.rows[0]],t):null}return i(e,t,n)}};this.getLabel=l(i),this.getValue=l(r),this.columns=function(t,e){switch(t.type){case"group":return Ro(n(e),function(e){return"group"===e.model.type&&e.model.by!==t.source});case"row":return n(e).filter(function(e){return"group"!==e.model.type})}return a(t,e)}},sh=function e(o){g(this,e);var a=o.columnList,i=o.columns,l=o.findGroupColumn;this.setValue=o.setValue,this.setLabel=o.setLabel,this.getValue=o.getValue,this.getLabel=o.getLabel,this.rowspan=o.rowspan,this.columnList=a,this.colspan=function(e,t){switch(e.type){case"group":if("group"===t.model.type)if(l(t.model.pin)){var n=a(t.model.pin);return bo((i=function(e){return!e.model.aggregation},(r=n)&&r.length?zo(r,wo(i)):[]),function(e){return e.colspan})}}var r,i;return o.colspan(e,t)},this.columns=function(e,t){switch(e.type){case"group":var n=l(t);if(n){var r=Ro(a(t),function(e){return!e.model.aggregation});return[n].concat(r)}}return i(e,t)}};var ch=function e(l,u){var s=this;g(this,e),this.columns=u.columns,this.rowspan=u.rowspan,this.colspan=u.colspan,this.getValue=u.getValue,this.setValue=u.setValue,this.getLabel=u.getLabel,this.setLabel=u.setLabel,this.columnList=u.columnList;var c=[];l.sceneChanged.watch(function(e){if(e.hasChanges("column")||e.hasChanges("rows")){var t=l.view().pivot.rows;if(t.length){if(l.group().by.length){var n=(y=(r=l).data().rows,i=r.view().pivot,x=r.view().rows,a=r.columnList().line,w=i.rows,b=w[0].length,k=r.group().by,C=k.length,q=uu(a),function(p){for(var v=[],e=function(e,t){var n=x[e],r=k[Math.min(n.level,C-1)],i=q[r];if(!i)throw new Xo("group.build",'Invalid key "'+r+'"');var o=i.aggregation||"count";if(!ah.hasOwnProperty(o))throw new Xo("group.build","Aggregation "+o+" is not registered");for(var a=p(i),l=ah[o],u=new Array(b),s=0,c=n.rows.length;s<c;s++)for(var h=n.rows[s],f=w[h],d=y[h],g=0;g<b;g++)if(f[g]){var m=u[g];m||(m=[],u[g]=m),m.push(d)}v.push(u.map(function(e){return l(e,a,i.aggregationOptions)}))},t=0,n=x.length;t<n;t++)e(t);return v});c=n(ta)}else c=t;var o=e.state.column.line.findIndex(function(e){return"pivot"===e.model.type});s.getValue=function(e,t,n,r,i){return"pivot"===t.type?c[r][i-o]:u.getValue(e,t,n,r,i)},s.getLabel=function(e,t,n,r,i){return"pivot"===t.type?c[r][i-o]:u.getLabel(e,t,n,r,i)}}else c=[],s.getValue=u.getValue,s.getLabel=u.getLabel}var r,y,i,x,a,w,b,k,C,q})},hh=function e(i){var o=this;g(this,e);var t=new ih(i),n=new nh(i,new ch(i,t)),r=new lh(i,n),a=new nh(i,r),l=new nh(i,new sh(r)),u=new nh(i,new uh(i,r)),s=new nh(i,new oh(n)),c=n,h=new Map;h.set(Lu,s);var f=function(){switch(i.group().mode){case"subhead":h.set(Kl,l);break;case"rowspan":h.set(Kl,u);break;default:h.set(Kl,a)}};f(),i.groupChanged.on(f),this.defaultStrategy=c,this.colspan=function(e,t,n,r){return(h.get(e.constructor)||c).colspan(e,t,n,r)},this.rowspan=function(e,t,n,r){return(h.get(e.constructor)||c).rowspan(e,t,n,r)},this.columns=function(e,t,n){return(h.get(e.constructor)||c).columns(e,t,n)},this.getValue=function(e,t,n,r){return(h.get(e.constructor)||c).getValue(e,t,ea,n,r)},this.setValue=function(e,t,n,r,i){return(h.get(e.constructor)||c).setValue(e,t,n,r,i)},this.getLabel=function(e,t,n,r){return(h.get(e.constructor)||c).getLabel(e,t,ra,n,r)},this.setLabel=function(e,t,n,r,i){return(h.get(e.constructor)||c).setLabel(e,t,n,r,i)},this.rows={left:[],right:[],null:[]};var d=function(){var e=i.scene().rows,t=i.row(),n=t.pinTop,r=t.pinBottom;o.rows={top:n,body:e,bottom:r}};i.sceneChanged.watch(function(e){e.hasChanges("rows")&&d()}),i.rowChanged.watch(function(e){(e.hasChanges("pinTop")||e.hasChanges("pinBottom"))&&d()})},fh=function(){function o(e,t){var n=this;g(this,o),this.model=e,this.table=t,this.rows=[];var r=new hh(e);this.render=r;var i=!(this.columns=function(e){return r.defaultStrategy.columnList(e)});e.sceneChanged.watch(function(e){e.hasChanges("rows")&&(n.invalidate(),i=!0)}),e.rowChanged.watch(function(e){(e.hasChanges("pinTop")||e.hasChanges("pinBottom"))&&(n.invalidate(),i=!0)}),i||this.invalidate()}return h(o,[{key:"invalidate",value:function(){aa.info("view.body","invalidate");var e=this.model,t=this.table;e.scene().rows.length||e.data().rows.length?t.view.hasLayer("blank")&&t.view.removeLayer("blank"):t.view.hasLayer("blank")||t.view.addLayer("blank")}}]),o}(),dh=function(){function t(e){g(this,t),this.select=e,this.busy=null,this.result=null}return h(t,[{key:"run",value:function(a){var l=this,u=arguments,s=this.select,c=!(this.result=null);return this.busy=new Promise(function(t,e){var n=function(e){c&&(l.result=e,t(e))};if(L(s)){var r={resolve:n,reject:e},i=Array.from(u).slice(1)||[],o=s.apply(void 0,[a,r].concat(b(i)));sr(o)||l.invoke(o,n,e)}else l.invoke(s,n,e)}),function(){l.busy=null,c=!1}}},{key:"invoke",value:function(e,t,n){if(e&&L(e.then))e.then(t),L(e.catch)&&e.catch(n);else if(e&&L(e.subscribe)){var r=!1,i=void 0;i=e.subscribe(function(){t.apply(void 0,arguments),r=!0,i&&L(i.unsubscribe)&&(i.unsubscribe(),i=null)},n),r&&i&&L(i.unsubscribe)&&(i.unsubscribe(),i=null)}else t(e)}}]),t}(),gh=function(){function t(e){g(this,t),this.td=e,this.value=null,this.label=null,this.fetch=No,this.resetFetch=No}return h(t,[{key:"commit",value:function(){}},{key:"reset",value:function(){}},{key:"clear",value:function(){}}]),t}(),mh=new gh(null),ph=function(e){function r(e){g(this,r);var t=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));if(t.fetch=t.fetchFactory(),t.resetFetch=t.fetch.run(e.row),sr(e.value))t.value=null;else{var n=Al(e.column.type,e.column.editor)(or(e.value));t.value=null===n?e.value:n}return t.label=sr(e.label)?null:or(e.label),t}return c(r,gh),h(r,[{key:"commit",value:function(){this.td.value=this.value,this.td.label=this.label,this.resetFetch(),this.resetFetch=No}},{key:"reset",value:function(){this.label=this.td.label,this.value=this.td.value,this.resetFetch(),this.resetFetch=No}},{key:"clear",value:function(){this.label=null,this.value=null,this.resetFetch(),this.resetFetch=No}},{key:"fetchFactory",value:function(){var e=this.td.column.editorOptions;return e&&e.fetch?new dh(e.fetch):new dh(this.td.value)}},{key:"cell",get:function(){return this.td}}],[{key:"empty",get:function(){return mh}}]),r}(),vh={isPrimitiveValue:function(e){return"string"==typeof e||(!("number"!=typeof e||!isFinite(e))||"boolean"==typeof e)},looksLikeNumber:function(e){return!isNaN(+e)},isObject:function(e){return Object(e)===e&&Object.getPrototypeOf(e)===Object.prototype},isEmptyObject:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNoValue:function(e){return null==e||""===e}},yh={required:function(){return function(e){if(vh.isNoValue(e))return"REQUIRED"}},not_empty:function(){return function(e){if(null!=e&&""===e)return"CANNOT_BE_EMPTY"}},not_empty_list:function(){return function(e){return void 0===e||""===e?"CANNOT_BE_EMPTY":Array.isArray(e)?e.length<1?"CANNOT_BE_EMPTY":void 0:"FORMAT_ERROR"}},any_object:function(){return function(e){if(!vh.isNoValue(e))return vh.isObject(e)?void 0:"FORMAT_ERROR"}}},xh={string:function(){return function(e,t,n){if(null!=e&&""!==e)return vh.isPrimitiveValue(e)?void n.push(e+""):"FORMAT_ERROR"}},eq:function(r){return function(e,t,n){if(null!=e&&""!==e){if(!vh.isPrimitiveValue(e))return"FORMAT_ERROR";if(e+""!=r+"")return"NOT_ALLOWED_VALUE";n.push(r)}}},one_of:function(i){return Array.isArray(i)||(i=Array.prototype.slice.call(arguments)).pop(),function(e,t,n){if(null!=e&&""!==e){if(!vh.isPrimitiveValue(e))return"FORMAT_ERROR";for(var r=0;r<i.length;r++)if(e+""==i[r]+"")return void n.push(i[r]);return"NOT_ALLOWED_VALUE"}}},max_length:function(r){return function(e,t,n){if(null!=e&&""!==e){if(!vh.isPrimitiveValue(e))return"FORMAT_ERROR";if((e+="").length>r)return"TOO_LONG";n.push(e)}}},min_length:function(r){return function(e,t,n){if(null!=e&&""!==e){if(!vh.isPrimitiveValue(e))return"FORMAT_ERROR";if((e+="").length<r)return"TOO_SHORT";n.push(e)}}},length_equal:function(r){return function(e,t,n){if(null!=e&&""!==e)return vh.isPrimitiveValue(e)?(e+="").length<r?"TOO_SHORT":e.length>r?"TOO_LONG":void n.push(e):"FORMAT_ERROR"}},length_between:function(r,i){return function(e,t,n){if(null!=e&&""!==e)return vh.isPrimitiveValue(e)?(e+="").length<r?"TOO_SHORT":e.length>i?"TOO_LONG":void n.push(e):"FORMAT_ERROR"}},like:function(e,t){var n=3===arguments.length&&t.match("i"),r=new RegExp(e,n?"i":"");return function(e,t,n){if(null!=e&&""!==e){if(!vh.isPrimitiveValue(e))return"FORMAT_ERROR";if(!(e+="").match(r))return"WRONG_FORMAT";n.push(e)}}}},wh={integer:function(){return function(e,t,n){if(!vh.isNoValue(e))return vh.isPrimitiveValue(e)?vh.looksLikeNumber(e)&&Number.isInteger(+e)?void n.push(+e):"NOT_INTEGER":"FORMAT_ERROR"}},positive_integer:function(){return function(e,t,n){if(!vh.isNoValue(e))return vh.isPrimitiveValue(e)?vh.looksLikeNumber(e)?!Number.isInteger(+e)||+e<1?"NOT_POSITIVE_INTEGER":void n.push(+e):"NOT_POSITIVE_INTEGER":"FORMAT_ERROR"}},decimal:function(){return function(e,t,n){if(!vh.isNoValue(e)){if(!vh.isPrimitiveValue(e))return"FORMAT_ERROR";if(!vh.looksLikeNumber(e))return"NOT_DECIMAL";if(!/^(?:\-?(?:(?:[0-9]+\.[0-9]+)|(?:[0-9]+)))$/.test(e+=""))return"NOT_DECIMAL";n.push(+e)}}},positive_decimal:function(){return function(e,t,n){if(!vh.isNoValue(e)){if(!vh.isPrimitiveValue(e))return"FORMAT_ERROR";if(!vh.looksLikeNumber(e))return"NOT_POSITIVE_DECIMAL";if(!/^(?:(?:[0-9]*\.[0-9]+)|(?:[1-9][0-9]*))$/.test(e+=""))return"NOT_POSITIVE_DECIMAL";n.push(+e)}}},max_number:function(r){return function(e,t,n){if(!vh.isNoValue(e))return vh.isPrimitiveValue(e)?vh.looksLikeNumber(e)?+r<+e?"TOO_HIGH":void n.push(+e):"NOT_NUMBER":"FORMAT_ERROR"}},min_number:function(r){return function(e,t,n){if(!vh.isNoValue(e))return vh.isPrimitiveValue(e)?vh.looksLikeNumber(e)?+e<+r?"TOO_LOW":void n.push(+e):"NOT_NUMBER":"FORMAT_ERROR"}},number_between:function(r,i){return function(e,t,n){if(!vh.isNoValue(e))return vh.isPrimitiveValue(e)?vh.looksLikeNumber(e)?+e<+r?"TOO_LOW":+i<+e?"TOO_HIGH":void n.push(+e):"NOT_NUMBER":"FORMAT_ERROR"}}},bh={email:function(){var t=/^([\w\-_+]+(?:\.[\w\-_+]+)*)@((?:[\w\-]+\.)*\w[\w\-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return function(e){if(null!=e&&""!==e)return vh.isPrimitiveValue(e)?(e+="",t.test(e)?/\@.*\@/.test(e)?"WRONG_EMAIL":/\@.*_/.test(e)?"WRONG_EMAIL":void 0:"WRONG_EMAIL"):"FORMAT_ERROR"}},equal_to_field:function(n){return function(e,t){if(null!=e&&""!==e)return vh.isPrimitiveValue(e)?e!=t[n]?"FIELDS_NOT_EQUAL":void 0:"FORMAT_ERROR"}},url:function(){var t=new RegExp("^(?:(?:http|https)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[0-1]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))\\.?|localhost)(?::\\d{2,5})?(?:[/?#]\\S*)?$","i");return function(e){if(null!=e&&""!==e){if(!vh.isPrimitiveValue(e))return"FORMAT_ERROR";if(!(e.length<2083&&t.test(e)))return"WRONG_URL"}}},iso_date:function(){return function(e){if(null!=e&&""!==e){if(!vh.isPrimitiveValue(e))return"FORMAT_ERROR";var t=e.match(/^(\d{4})-([0-1][0-9])-([0-3][0-9])$/);if(t){var n=Date.parse(e);if(!n&&0!==n)return"WRONG_DATE";var r=new Date(n);if(r.setTime(r.getTime()+60*r.getTimezoneOffset()*1e3),r.getFullYear()==t[1]&&r.getMonth()+1==+t[2]&&r.getDate()==+t[3])return}return"WRONG_DATE"}}}},kh={},Ch=0;function qh(e,t){this.isPrepared=!1,this.livrRules=e,this.validators={},this.validatorBuilders={},this.errors=null,this.isAutoTrim=null!=t?t:Ch,this.registerRules(kh)}qh.registerDefaultRules=function(e){for(var t in e)kh[t]=e[t]},qh.getDefaultRules=function(){return kh},qh.registerAliasedDefaultRule=function(e){if(!e.name)throw"Alias name required";kh[e.name]=qh._buildAliasedRule(e)},qh._buildAliasedRule=function(o){if(!o.name)throw"Alias name required";if(!o.rules)throw"Alias rules required";var t={value:o.rules};return function(e){var i=new qh(t).registerRules(e).prepare();return function(e,t,n){var r=i.validate({value:e});return r?void n.push(r.value):o.error||i.getErrors().value}}},qh.defaultAutoTrim=function(e){Ch=!!e},qh.prototype={prepare:function(){var e=this.livrRules;for(var t in e){var n=e[t];Array.isArray(n)||(n=[n]);for(var r=[],i=0;i<n.length;i++){var o=this._parseRule(n[i]);r.push(this._buildValidator(o.name,o.args))}this.validators[t]=r}return this.isPrepared=!0,this},validate:function(e){if(this.isPrepared||this.prepare(),vh.isObject(e)){this.isAutoTrim&&(e=this._autoTrim(e));var t={},n={};for(var r in this.validators){var i=this.validators[r];if(i&&i.length)for(var o=e[r],a=0;a<i.length;a++){var l=[],u=i[a](n.hasOwnProperty(r)?n[r]:o,e,l);if(u){t[r]=u;break}l.length?n[r]=l[0]:e.hasOwnProperty(r)&&!n.hasOwnProperty(r)&&(n[r]=o)}}return vh.isEmptyObject(t)?(this.errors=null,n):(this.errors=t,!1)}this.errors="FORMAT_ERROR"},getErrors:function(){return this.errors},registerRules:function(e){for(var t in e)this.validatorBuilders[t]=e[t];return this},registerAliasedRule:function(e){if(!e.name)throw"Alias name required";return this.validatorBuilders[e.name]=qh._buildAliasedRule(e),this},getRules:function(){return this.validatorBuilders},_parseRule:function(e){var t,n;return vh.isObject(e)?(n=e[t=Object.keys(e)[0]],Array.isArray(n)||(n=[n])):(t=e,n=[]),{name:t,args:n}},_buildValidator:function(e,t){if(!this.validatorBuilders[e])throw"Rule ["+e+"] not registered";var n=[];return n.push.apply(n,t),n.push(this.getRules()),this.validatorBuilders[e].apply(null,n)},_autoTrim:function(e){var t=void 0===e?"undefined":f(e);if("object"!==t&&e)return e.replace?e.replace(/^\s*/,"").replace(/\s*$/,""):e;if("object"==t&&Array.isArray(e)){for(var n=[],r=0;r<e.length;r++)n[r]=this._autoTrim(e[r]);return n}if("object"==t&&vh.isObject(e)){n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=this._autoTrim(e[i]));return n}return e}};var Oh=qh,_h={nested_object:function(e,t){var i=new Oh(e).registerRules(t).prepare();return function(e,t,n){if(!vh.isNoValue(e)){if(!vh.isObject(e))return"FORMAT_ERROR";var r=i.validate(e);return r?void n.push(r):i.getErrors()}}},variable_object:function(o,e,t){var a={};for(var n in e){var r=new Oh(e[n]).registerRules(t).prepare();a[n]=r}return function(e,t,n){if(!vh.isNoValue(e)){if(!vh.isObject(e)||!e[o]||!a[e[o]])return"FORMAT_ERROR";var r=a[e[o]],i=r.validate(e);return i?void n.push(i):r.getErrors()}}},list_of:function(e,t){Array.isArray(e)||(t=(e=Array.prototype.slice.call(arguments)).pop());var u=new Oh({field:e}).registerRules(t).prepare();return function(e,t,n){if(!vh.isNoValue(e)){if(!Array.isArray(e))return"FORMAT_ERROR";for(var r=[],i=[],o=!1,a=0;a<e.length;a++){var l=u.validate({field:e[a]});l?(r.push(l.field),i.push(null)):(o=!0,i.push(u.getErrors().field),r.push(null))}return o?i:void n.push(r)}}},list_of_objects:function(e,t){var u=new Oh(e).registerRules(t).prepare();return function(e,t,n){if(!vh.isNoValue(e)){if(!Array.isArray(e))return"FORMAT_ERROR";for(var r=[],i=[],o=!1,a=0;a<e.length;a++){var l=u.validate(e[a]);l?(r.push(l),i.push(null)):(o=!0,i.push(u.getErrors()),r.push(null))}return o?i:void n.push(r)}}},list_of_different_objects:function(c,e,t){var h={};for(var n in e){var r=new Oh(e[n]).registerRules(t).prepare();h[n]=r}return function(e,t,n){if(!vh.isNoValue(e)){if(!Array.isArray(e))return"FORMAT_ERROR";for(var r=[],i=[],o=!1,a=0;a<e.length;a++){var l=e[a];if("object"==(void 0===l?"undefined":f(l))&&l[c]&&h[l[c]]){var u=h[l[c]],s=u.validate(l);s?(r.push(s),i.push(null)):(o=!0,i.push(u.getErrors()),r.push(null))}else i.push("FORMAT_ERROR")}return o?i:void n.push(r)}}},or:function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),l=e.map(function(e){return new Oh({field:e}).registerRules(t).prepare()});return function(e,t,n){if(!vh.isNoValue(e)){for(var r,i=0;i<l.length;i++){var o=l[i],a=o.validate({field:e});if(a)return void n.push(a.field);r=o.getErrors().field}return r||void 0}}}},Ih={default:function(r){return function(e,t,n){vh.isNoValue(e)&&n.push(r)}},trim:function(){return function(e,t,n){vh.isNoValue(e)||"object"===(void 0===e?"undefined":f(e))||(e+="",n.push(e.replace(/^\s*/,"").replace(/\s*$/,"")))}},to_lc:function(){return function(e,t,n){vh.isNoValue(e)||"object"===(void 0===e?"undefined":f(e))||(e+="",n.push(e.toLowerCase()))}},to_uc:function(){return function(e,t,n){vh.isNoValue(e)||"object"===(void 0===e?"undefined":f(e))||(e+="",n.push(e.toUpperCase()))}},remove:function(e){e=vh.escapeRegExp(e);var r=new RegExp("["+e+"]","g");return function(e,t,n){vh.isNoValue(e)||"object"===(void 0===e?"undefined":f(e))||(e+="",n.push(e.replace(r,"")))}},leave_only:function(e){e=vh.escapeRegExp(e);var r=new RegExp("[^"+e+"]","g");return function(e,t,n){vh.isNoValue(e)||"object"===(void 0===e?"undefined":f(e))||(e+="",n.push(e.replace(r,"")))}}},Eh={rules:{}};Eh.rules.common=yh,Eh.rules.string=xh,Eh.rules.numeric=wh,Eh.rules.special=bh,Eh.rules.meta=_h,Eh.rules.modifiers=Ih,Eh.Validator=Oh,Eh.util=vh,Eh.Validator.registerDefaultRules({required:Eh.rules.common.required,not_empty:Eh.rules.common.not_empty,not_empty_list:Eh.rules.common.not_empty_list,any_object:Eh.rules.common.any_object,string:Eh.rules.string.string,eq:Eh.rules.string.eq,one_of:Eh.rules.string.one_of,max_length:Eh.rules.string.max_length,min_length:Eh.rules.string.min_length,length_equal:Eh.rules.string.length_equal,length_between:Eh.rules.string.length_between,like:Eh.rules.string.like,integer:Eh.rules.numeric.integer,positive_integer:Eh.rules.numeric.positive_integer,decimal:Eh.rules.numeric.decimal,positive_decimal:Eh.rules.numeric.positive_decimal,max_number:Eh.rules.numeric.max_number,min_number:Eh.rules.numeric.min_number,number_between:Eh.rules.numeric.number_between,email:Eh.rules.special.email,equal_to_field:Eh.rules.special.equal_to_field,url:Eh.rules.special.url,iso_date:Eh.rules.special.iso_date,nested_object:Eh.rules.meta.nested_object,variable_object:Eh.rules.meta.variable_object,list_of:Eh.rules.meta.list_of,list_of_objects:Eh.rules.meta.list_of_objects,or:Eh.rules.meta.or,list_of_different_objects:Eh.rules.meta.list_of_different_objects,default:Eh.rules.modifiers.default,trim:Eh.rules.modifiers.trim,to_lc:Eh.rules.modifiers.to_lc,to_uc:Eh.rules.modifiers.to_uc,remove:Eh.rules.modifiers.remove,leave_only:Eh.rules.modifiers.leave_only});var zh=Eh.Validator;function Rh(e,l){var u=[];return e.forEach(function(e){if(e.key===l){var t=!0,n=!1,r=void 0;try{for(var i,o=Object.keys(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;"key"!==a&&"for"!==a&&u.push(R({},a,e[a]))}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}}),{hasRules:0<u.length,rules:R({},l,u)}}function jh(e,t){if(2===arguments.length){var n=Rh(e,t);return new zh(n.rules)}return new zh(e)}var Sh=function(){function o(e,t,n){var r=this;g(this,o),this.model=e,this.table=t,this.shortcut=n,this.editor=ph.empty;var i=this.commands;n.register(i),this.enter=i.get("enter"),this.commit=i.get("commit"),this.push=i.get("push"),this.cancel=i.get("cancel"),this.reset=i.get("reset"),this.exit=i.get("exit"),this.clear=i.get("clear"),e.navigationChanged.watch(function(e){if(e.hasChanges("cell")){var t=r.editor.td;t&&("data"===t.column.class?r.commit.canExecute(t)&&r.commit.execute(t):r.cancel.canExecute(t)&&r.cancel.execute(t));var n=e.changes.cell.newValue;n&&"focus"===n.column.editorOptions.trigger&&r.enter.canExecute(n)&&r.enter.execute(n)}})}return h(o,[{key:"mode",value:function(e,t){this.model.edit({state:t}),e.mode(t)}},{key:"contextFactory",value:function(e,t,n,r){var i=e.column,o=e.row,a=e.columnIndex,l=e.rowIndex,u=e.value,s=e.label;return{column:i,row:o,columnIndex:a,rowIndex:l,oldValue:u,newValue:2<=arguments.length?t:u,oldLabel:s,newLabel:3<=arguments.length?n:s,unit:"cell",tag:r,valueFactory:ta,labelFactory:ia}}},{key:"canEdit",value:function(e){return!!e&&(e.column.canEdit&&"cell"===this.model.edit().mode)}},{key:"shortcutFactory",value:function(r){var i=this,o=this.model.edit;return function(){var e=o()[r+"Shortcuts"],t=i.editor.td;if(t){var n=t.column&&t.column.editor?t.column.editor:t.column.type;if(e.hasOwnProperty(n))return e[n]}return e.$default}}},{key:"commands",get:function(){var a=this,l=this.model,u=this.table,e={enter:new Ea({priority:1,source:"edit.cell.view",shortcut:this.shortcutFactory("enter"),canExecute:function(e){return("keyboard"!=(e?"mouse":"keyboard")||!As.isControl(a.shortcut.keyCode()))&&((e=e||l.navigation().cell)&&e.column.canEdit&&("control"===e.column.class||"cell"===l.edit().mode)&&"view"===l.edit().state&&l.edit().enter.canExecute(a.contextFactory(e)))},execute:function(e,t){aa.info("cell.edit","edit mode"),t&&t.stopImmediatePropagation();var n=e?"mouse":"keyboard";if((e=e||l.navigation().cell)&&!1!==l.edit().enter.execute(a.contextFactory(e,e.value,e.label))){var r=u.body.cell(e.rowIndex,e.columnIndex).model();a.editor=new ph(r);var i=a.shortcut.keyCode();if("keyboard"===n&&As.isPrintable(i)){var o=Al(e.column.type,e.column.editor)(As.stringify(i));null!==o&&(a.value=o)}return a.mode(a.editor.td,"edit"),!0}return!1}}),commit:new Ea({priority:1,source:"edit.cell.view",shortcut:this.shortcutFactory("commit"),canExecute:function(e){if((e=e||a.editor.td)&&e===a.editor.td&&e.column.canEdit&&("control"===e.column.class||"cell"===l.edit().mode)&&"edit"===l.edit().state){var t=a.contextFactory(e),n=t.column.key,r=jh(l.validation().rules,n);return l.edit().commit.canExecute(t)&&r.validate(R({},n,a.value))}return!1},execute:function(e,t){return aa.info("cell.edit","commit"),t&&t.stopImmediatePropagation(),!(!(e=e||a.editor.td)||!1===l.edit().commit.execute(a.contextFactory(e,a.value,a.label,a.tag)))&&(a.editor.commit(),a.editor=ph.empty,a.mode(e,"view"),u.view.focus(),!0)}}),push:new Ea({priority:1,source:"edit.cell.view",canExecute:function(e){if((e=e||a.editor.td)&&e.column.canEdit){var t=a.contextFactory(e),n=t.column.key,r=jh(l.validation().rules,n);return l.edit().commit.canExecute(t)&&r.validate(R({},n,a.value))}return!1},execute:function(e,t){return aa.info("cell.edit","batch commit"),t&&t.stopImmediatePropagation(),!(!(e=e||a.editor.td)||!1===l.edit().commit.execute(a.contextFactory(e,a.value,a.label,a.tag)))&&(a.editor.commit(),a.editor=ph.empty,!0)}}),cancel:new Ea({priority:1,source:"edit.cell.view",shortcut:this.shortcutFactory("cancel"),canExecute:function(e){return(e=e||a.editor.td)&&e.column.canEdit&&("control"===e.column.class||"cell"===l.edit().mode)&&"edit"===l.edit().state&&l.edit().cancel.canExecute(a.contextFactory(e,a.value,a.label))},execute:function(e,t){return aa.info("cell.edit","cancel"),t&&t.stopImmediatePropagation(),!(!(e=e||a.editor.td)||!1===l.edit().cancel.execute(a.contextFactory(e,e.value,e.label)))&&(a.editor.reset(),a.editor=ph.empty,a.mode(e,"view"),u.view.focus(),!0)}}),reset:new Ea({priority:1,source:"edit.cell.view",canExecute:function(e){return(e=e||a.editor.td)&&e.column.canEdit&&("control"===e.column.class||"cell"===l.edit().mode)&&"edit"===l.edit().state&&l.edit().reset.canExecute(a.contextFactory(e,a.value,a.label))},execute:function(e,t){return aa.info("cell.edit","reset"),t&&t.stopImmediatePropagation(),!(!(e=e||a.editor.td)||!1===l.edit().reset.execute(a.contextFactory(e,a.value,a.label)))&&(a.editor.reset(),!0)}}),exit:new Ea({priority:1,source:"edit.cell.view",execute:function(e,t){if(aa.info("cell.edit","reset"),t&&t.stopImmediatePropagation(),e=e||a.editor.td){if(a.commit.canExecute(e,t))if(e.value!==a.value)return a.commit.execute(e,t),!0;if(a.cancel.canExecute(e,t))return a.cancel.execute(e,t),!0}return!1}}),clear:new Ea({priority:1,source:"edit.cell.view",canExecute:function(e){return(e=e||a.editor.td)&&e.column.canEdit&&("control"===e.column.class||"cell"===l.edit().mode)&&"edit"===l.edit().state&&l.edit().clear.canExecute(a.contextFactory(e,a.value,a.label))},execute:function(e,t){return aa.info("cell.edit","clear"),t&&t.stopImmediatePropagation(),!(!(e=e||a.editor.td)||!1===l.edit().clear.execute(a.contextFactory(e,a.value,a.label)))&&(a.editor.clear(),!0)}})};return new Map(Object.entries(e))}},{key:"fetch",get:function(){return this.editor.fetch}},{key:"value",get:function(){return this.editor.value},set:function(e){this.editor.value=e}},{key:"label",get:function(){return this.editor.label},set:function(e){this.editor.label=e}},{key:"row",get:function(){return this.cell.row}},{key:"column",get:function(){return this.cell.column}},{key:"cell",get:function(){return this.editor.td}},{key:"options",get:function(){return this.column.options}}]),o}(),Ph=function(){function e(){g(this,e),this.editors=[]}return h(e,[{key:"commit",value:function(){}},{key:"reset",value:function(){}}]),e}(),Ah=function(){function n(e,t){g(this,n),this.row=e,this.column=t}return h(n,[{key:"value",get:function(){return ea(this.row,this.column)},set:function(e){return na(this.row,this.column,e)}},{key:"label",get:function(){return ra(this.row,this.column)},set:function(e){return oa(this.row,this.column,e)}}]),n}(),Lh=new Ph,Mh=function(e){function r(e,t){g(this,r);var n=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.value=ur(e),n.row=e,n.editors=t.filter(function(e){return e.canEdit}).map(function(e){return new ph(new Ah(n.value,e))}),n}return c(r,Ph),h(r,[{key:"commit",value:function(){this.editors.forEach(function(e){return e.commit()}),Object.assign(this.row,this.value)}},{key:"reset",value:function(){this.editors.forEach(function(e){return e.reset()}),this.value=ur(this.row)}}],[{key:"empty",get:function(){return Lh}}]),r}(),Th=function(){function i(e,t,n){g(this,i),this.model=e,this.table=t,this.editor=Mh.empty;var r=this.commands;n.register(r),this.enter=r.get("enter"),this.commit=r.get("commit"),this.cancel=r.get("cancel"),this.reset=r.get("reset")}return h(i,[{key:"contextFactory",value:function(e){return{row:e,unit:"row"}}},{key:"shortcutFactory",value:function(t){var n=this.model.edit;return function(){var e=n()[t+"Shortcuts"];return e.row||e.$default}}},{key:"commands",get:function(){var r=this,i=this.model,e={enter:new Ea({source:"edit.row.view",shortcut:this.shortcutFactory("enter"),canExecute:function(e){return(e=e||i.navigation().row)&&"row"===i.edit().mode&&"view"===i.edit().state&&i.edit().enter.canExecute(r.contextFactory(e))},execute:function(e,t){aa.info("row.edit","edit mode"),t&&t.stopImmediatePropagation();var n=r.model.columnList().line;r.editor=new Mh(e,n),i.edit({state:"edit"},{source:"edit.row.view"})}}),commit:new Ea({source:"edit.row.view",shortcut:this.shortcutFactory("commit"),canExecute:function(e){return(e=e||i.navigation().row)&&"row"===i.edit().mode&&"edit"===i.edit().state&&i.edit().commit.canExecute(r.contextFactory(e))},execute:function(e,t){aa.info("row.edit","commit"),t&&t.stopImmediatePropagation(),r.editor.commit(),r.editor=Mh.empty,i.edit({state:"view"},{source:"edit.row.view"})}}),cancel:new Ea({source:"edit.row.view",shortcut:this.shortcutFactory("cancel"),canExecute:function(e){return(e=e||i.navigation().row)&&"row"===i.edit().mode&&"edit"===i.edit().state&&i.edit().cancel.canExecute(r.contextFactory(e))},execute:function(e,t){aa.info("cell.edit","cancel"),t&&t.stopImmediatePropagation(),r.editor.reset(),r.editor=Mh.empty,i.edit({state:"view"},{source:"edit.row.view"})}}),reset:new Ea({source:"edit.row.view",canExecute:function(e){return(e=e||i.navigation().row)&&"row"===i.edit().mode&&"edit"===i.edit().state&&i.edit().reset.canExecute(r.contextFactory(e))},execute:function(e,t){if(aa.info("row.edit","reset"),t&&t.stopImmediatePropagation(),e&&!1!==i.edit().reset.execute(r.contextFactory(e)))return r.editor.reset(),!1}})};return new Map(Object.entries(e))}}]),i}(),Dh=function e(t,n,r){g(this,e),this.cell=new Sh(t,n,r),this.row=new Th(t,n,r)},Nh=function(){function e(o){g(this,e),this.model=o,this.column=new Ea({source:"filter.view",execute:function(e,t){var n=e.key,r=o.filter,i=or(r().by);sr(t)||""===t?delete i[n]:i[n]={expression:{kind:"group",op:"and",left:{kind:"condition",left:n,op:"like",right:t},right:null}},r({by:i})}})}return h(e,[{key:"has",value:function(e){return this.model.filter().by.hasOwnProperty(e.key)}}]),e}(),Fh=function(){function r(e,t){var n=this;g(this,r),this.model=e,this.table=t,this.rows=[],this.valueFactory=ta,e.sceneChanged.watch(function(e){e.hasChanges("column")&&n.invalidate()})}return h(r,[{key:"invalidate",value:function(){aa.info("view.foot","invalidate"),this.rows=new Array(this.count)}},{key:"columns",value:function(e,t){return this.model.scene().column.area[t]||[]}},{key:"value",value:function(e){if(e.aggregation){var t=e.aggregation,n=e.aggregationOptions;if(!ah.hasOwnProperty(t))throw new Xo("foot","Aggregation "+t+" is not registered");var r=this.model.data().rows,i=this.valueFactory(e);return ah[t](r,i,n)}return null}},{key:"count",get:function(){for(var e=this.model,t=e.view().columns,n=e.foot().resource.count,r=0,i=t.length;r<i;r++)if(t[r].aggregation)return Math.max(n,1);return n}}]),r}();function Vh(e,t){return e.source===t.by?e:e.children.length?e.children[0]:e}function $h(e,t){return"group"!==t.type||e.source===t.by}function Bh(e,t,n){return e.source===t.by?!n||n.state.expand:!!e.children.length&&Bh(e.children[0],t,e)}var Uh=function(){function s(r,e,n,t){var i=this;g(this,s),this.model=r,this.table=e,this.valueFactory=ta;var o=new Ea({source:"group.view",execute:function(e,t){e=e||r.navigation().row,t=t||r.navigation().column,e=i.getNode(e,t),!1!==r.group().toggle.execute(e)&&(e.state.expand=!e.state.expand,n.invalidate({source:"group.view",pipe:Vu.group,why:Vu.group.why}))},canExecute:function(e,t){e=e||r.navigation().row,t=t||r.navigation().column,e=i.getNode(e,t);var n=r.group().toggle;return e&&"group"===e.type&&n.canExecute(e)},shortcut:r.group().shortcut.toggle}),a=!0,l=new Ea({source:"group.view",execute:function(){if(!1!==r.group().toggleAll.execute()){var e=r.view().nodes,t=r.group().toggle;Yl(e,function(e){o.canExecute(e)&&!1!==t.execute(e)&&(e.state.expand=a)}),a=!a,n.invalidate({source:"group.view",pipe:Vu.group,why:Vu.group.why})}},canExecute:function(){return r.group().toggleAll.canExecute()}});this.toggleStatus=o,this.toggleAllStatus=l,t.register([o,l]);var u=Pl(r);this.reference={group:u("group")},this.getNode=$o,this.isVisible=Fo,r.groupChanged.watch(function(e){if(e.hasChanges("mode"))switch(e.state.mode){case"rowspan":i.getNode=Vh,i.isVisible=Bh;break;case"flat":i.getNode=$o,i.isVisible=$h;break;default:i.getNode=$o,i.isVisible=Fo}})}return h(s,[{key:"count",value:function(e,t){return(e=this.getNode(e,t)).children.length||e.rows.length}},{key:"status",value:function(e,t){return(e=this.getNode(e,t)).state.expand?"expand":"collapse"}},{key:"offset",value:function(e,t){switch(e=this.getNode(e,t),this.model.group().mode){case"nest":case"subhead":return t?t.offset*e.level:0;default:return 0}}},{key:"value",value:function(e,t){return e=this.getNode(e,t),t?ia(t)(e):null}}]),s}(),Hh=function(){function t(e){g(this,t),this.bag=e}return h(t,[{key:"cell",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;if("TD"===a.nodeName||"TH"===a.nodeName){var l=this.bag.findModel(a);return l||new Xo("path.find","Can't find model for "+a.nodeName),l}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return null}},{key:"row",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;if("TR"===a.nodeName){var l=this.bag.findModel(a);return l||new Xo("path.find","Can't find model for "+a.nodeName),l}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return null}}]),t}();Ra.register("filter-row-cell",function(e,t){return{model:e.for,resource:t.key}});var Wh=function(e){function n(e){g(this,n);var t=m(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return Object.assign(t,e),t.key="$filter.row."+e.key,t.type="filter-row",t.class="control",t.canFilter=e.canFilter&&"data"===e.class,t.model=e,t}return c(n,ja),n}(),Gh=function(e){function t(e){return g(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,new Wh(e)))}return c(t,Sa),t}();function Kh(e){for(var t=[];e;)t.unshift(e),e=e.parentNode;return t}function Yh(e){var t=e.composedPath&&e.composedPath()||e.path,n=e.target;return t?t.indexOf(window)<0?t.concat(window):t:n===window?[window]:[n].concat(Kh(n),window)}var Zh=function(){function n(k,C,e){var t=this;g(this,n),this.model=k,this.table=C,this.tagName=e,this.rows=[];var q=new Hh(C.context.bag.head);this.drop=new Ea({source:"head.view",canExecute:function(e){if("end"===e.action)return!0;var t=q.cell(Yh(e));return t&&t.column.canMove},execute:function(e){var t,n,r=e.dragData;switch(e.action){case"over":var i=q.cell(Yh(e));if(!e.inAreaX(i.element))return;var o=i.column.key;if(r!==o){var a=k.columnList,l=(t=a().index,(n=new Kl(t.key,t.level,t.type)).rows=Array.from(t.rows),n.children=Array.from(t.children),n.state=ur(t.state),n.source=t.source,n.value=t.value,n),u=Ql(l,function(e){return e.key.model.key===r}),s=Ql(l,function(e){return e.key.model.key===o});if(u&&s&&s.path.indexOf(u.node)<0){var c=u.path.reverse(),h=c.findIndex(function(e){return 1<e.children.length});if(0<=h){var f=c[h],d=c[h-1]||u.node,g=f.children.indexOf(d);f.children.splice(g,1),s.parent.children.splice(s.index,0,d),d.level=s.parent.level+1,Yl(d.children,function(e,t,n){e.level=(t||n).level+1},d),a({index:l},{source:"head.view"})}}}break;case"end":case"drop":var m=Ql(k.columnList().index,function(e){return e.key.model.key===r});if(m){var p=!0,v=!1,y=void 0;try{for(var x,w=Jl(m.node)[Symbol.iterator]();!(p=(x=w.next()).done);p=!0){var b=x.value;C.body.column(b.key.columnIndex).removeClass(_a+"-drag")}}catch(e){v=!0,y=e}finally{try{!p&&w.return&&w.return()}finally{if(v)throw y}}}}}}),this.drag=new Ea({source:"head.view",execute:function(e){var t=e.data,n=Ql(k.columnList().index,function(e){return e.key.model.key===t});if(n){var r=!0,i=!1,o=void 0;try{for(var a,l=Jl(n.node)[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;return C.body.column(u.key.columnIndex).addClass(_a+"-drag"),function(){return C.head.cell}}}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}}},canExecute:function(e){var t=e.data,n=Ql(k.columnList().index,function(e){return e.key.model.key===t});return n&&n.node.key.model.canMove}}),this.resize=new Ea({source:"head.view",canExecute:function(e){var t=e.data,n=C.data.columnMap();return n.hasOwnProperty(t)&&!1!==n[t].canResize}}),k.dataChanged.watch(function(e){if(e.hasChanges("columns")){var t=function e(t){for(var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],r=0,i=t.length;r<i;r++){var o=t[r];n.push(o);var a=o.children;a&&a.length&&e(a,n)}return n}(e.state.columns);k.columnList({line:t},{source:"head.view"})}}),k.sceneChanged.watch(function(e){e.hasChanges("column")&&t.invalidate()}),k.filterChanged.watch(function(e){e.hasChanges("unit")&&t.invalidate()})}return h(n,[{key:"columns",value:function(e,t){return e.filter(function(e){return e.model.pin===t})}},{key:"invalidate",value:function(){aa.info("view.head","invalidate");var e=this.model;if(this.rows=Array.from(e.scene().column.rows),1<this.rows.length?this.table.view.addClass(_a+"-head-span"):this.table.view.removeClass(_a+"-head-span"),"row"===e.filter().unit){var t=this.table.data.columns().map(function(e){return new Gh(e)});this.rows.push(t)}}}]),n}(),Jh=function(){function n(e,t){g(this,n),this.model=e,this.table=t}return h(n,[{key:"map",value:function(e){var t=this.model.selection();switch(t.unit){case"row":return this.mapFromRows(e);case"column":return this.mapFromColumns(e);case"cell":return this.mapFromCells(e);case"mix":return this.mapFromMix(e);default:throw new Xo("cell.selector","Invalid unit "+t.unit)}}},{key:"mapFromRows",value:function(e){var t=this.table,n=[],r=t.data.rows(),i=!0,o=!1,a=void 0;try{for(var l,u=e[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var s=l.value,c=r.indexOf(s),h=!0,f=!1,d=void 0;try{for(var g,m=t.body.row(c).cells()[Symbol.iterator]();!(h=(g=m.next()).done);h=!0){var p=g.value;n.push(p)}}catch(e){f=!0,d=e}finally{try{!h&&m.return&&m.return()}finally{if(f)throw d}}}}catch(e){o=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}return n}},{key:"mapFromColumns",value:function(e){var n=this.table,r=[],i=n.data.columns(),t=!0,o=!1,a=void 0;try{for(var l,u=function(){var t=l.value,e=i.findIndex(function(e){return e===t});r.push.apply(r,b(n.body.column(e).cells()))},s=e[Symbol.iterator]();!(t=(l=s.next()).done);t=!0)u()}catch(e){o=!0,a=e}finally{try{!t&&s.return&&s.return()}finally{if(o)throw a}}return r}},{key:"mapFromCells",value:function(e){var r=this.table,i=[],o=r.data.rows(),a=r.data.columns(),t=!0,n=!1,l=void 0;try{for(var u,s=function(){var t=u.value,e=o.indexOf(t.row),n=a.findIndex(function(e){return e===t.column});i.push(r.body.cell(e,n))},c=e[Symbol.iterator]();!(t=(u=c.next()).done);t=!0)s()}catch(e){n=!0,l=e}finally{try{!t&&c.return&&c.return()}finally{if(n)throw l}}return i}},{key:"mapFromMix",value:function(e){var t=Array.from(e),n=t.filter(function(e){return"row"===e.unit}).map(function(e){return e.item}),r=t.filter(function(e){return"cell"===e.unit}).map(function(e){return e.item});return[].concat(b(this.mapFromRows(n)),b(this.mapFromCells(r)))}}]),n}();function Qh(e){return e.selection().key.column===$o?function(e){return e.key}:$o}function Xh(e){if(e.selection().key.row===$o){var t=e.data().rows,n=e.columnList().line,r=n.findIndex(function(e){return"id"===e.type});return 0<=r?ta(n[r]):function(e){return t.indexOf(e)}}return $o}function ef(e,t){switch(e){case"row":return t.row;case"column":return t.column;case"cell":return function(e){return e.row&&e.column?{row:t.row(e.row),column:t.column(e.column)}:e};default:throw new Xo("selection.state","Invalid unit "+e)}}var tf=function(){function t(e){g(this,t),this.model=e}return h(t,[{key:"lookup",value:function(e,t){var n=[];if(0===e.length)return n;var r=this.model;switch(sr(t)&&(t=r.selection().unit),t){case"column":var i=function(e,i){if(e.selection().key.column===$o)return $o;var t=e.columnList().line;return function(n){var r=[];return t.forEach(function(e){var t=i(e);-1<n.indexOf(t)&&r.push(e)}),r}}(r,this.keyFactory("column"));n=i(e);break;case"row":n=function(e,i){if(e.selection().key.row===$o)return $o;var t=e.data().rows;return function(n){var r=[];return t.forEach(function(e){var t=i(e);-1<n.indexOf(t)&&r.push(e)}),r}}(r,this.keyFactory("row"))(e);break;case"cell":n=function(e,o){var t=e.selection();if(t.key.row===$o&&t.key.column===$o)return $o;var a=e.data().rows,n=e.columnList().line,l=function(e,t){return e.column===t.column&&e.row===t.row};return function(r){var i=[];return n.forEach(function(n){a.forEach(function(e){var t={column:n,row:e};0<=r.findIndex(function(e){return l(e,o(t))})&&i.push(t)})}),i}}(r,this.keyFactory("cell"))(e);break;case"mix":var o,a,l,u=e.filter(function(e){return"row"===e.unit}).map(function(e){return e.item}),s=e.filter(function(e){return"column"===e.unit}).map(function(e){return e.item}),c=e.filter(function(e){return"cell"===e.unit}).map(function(e){return e.item});(o=n).push.apply(o,b(this.lookup(u,"row").map(function(e){return{item:e,unit:"row"}}))),(a=n).push.apply(a,b(this.lookup(s,"column").map(function(e){return{item:e,unit:"column"}}))),(l=n).push.apply(l,b(this.lookup(c,"cell").map(function(e){return{item:e,unit:"cell"}})));break;default:throw new Xo("selection.state","Invalid unit "+t)}return n}},{key:"map",value:function(e){var t=this.model.selection(),n=this.keyFactory();switch(t.unit){case"column":case"row":case"cell":return e.map(n);case"mix":return e.map(function(e){return{unit:e.unit,item:n(e)}});default:throw new Xo("selection.state","Invalid unit "+t.unit)}}},{key:"keyFactory",value:function(e){var t=this.model.selection();switch(e=e||t.unit){case"column":case"row":case"cell":return ef(e,t.key);case"mix":var n=ef("cell",t.key),r=ef("row",t.key),i=ef("column",t.key);return function(e){if(!e.unit)return $o;switch(e.unit){case"column":return i(e.item);case"row":return r(e.item);case"cell":return n(e.item);default:throw new Xo("selection.service","Invalid unit "+e.unit)}};default:throw new Xo("selection.service","Invalid unit "+e)}}},{key:"hashFactory",value:function(){var n=this.keyFactory(),r=function(e){var t=e.selection();switch(t.unit){case"row":return Xh(e);case"column":return Qh(e);case"cell":var n=Qh(e),r=Xh(e);return function(e){return n(e.column)+"["+r(e.row)+"]"};case"mix":var i=Qh(e),o=Xh(e);return function(e,t){if(!t.unit)return e;switch(t.unit){case"column":return i(e);case"row":return o(e);case"cell":return i(e.column)+"["+o(e.row)+"]";default:throw new Xo("selection.service","Invalid unit "+t.unit)}};default:throw new Xo("selection.service","Invalid unit "+t.unit)}}(this.model);return function(e){var t=n(e);return r(t,e)}}}]),t}(),nf=function(){function u(o,e){var t=this;g(this,u),this.model=o,this.table=e,this.cellSelector=new Jh(o,e),this.selectionService=new tf(o);var n=[],r=[],i=[],a=[],l=[];this.column=new Ea({source:"highlight.view",canExecute:function(){return!t.isRendering},execute:function(e,t){var n=Array.from(o.highlight().columns),r=n.indexOf(e.key),i=!1;t?r<0&&(n.push(e.key),i=!0):0<=r&&(n.splice(r,1),i=!0),i&&o.highlight({columns:n},{source:"highlight.view"})}}),this.row=new Ea({source:"highlight.view",canExecute:function(){return!t.isRendering},execute:function(e,t){var n=Array.from(o.highlight().rows),r=n.indexOf(e),i=!1;t?r<0&&(n.push(e),i=!0):0<=r&&(n.splice(r,1),i=!0),i&&o.highlight({rows:n},{source:"highlight.view"})}}),this.cell=new Ea({source:"highlight.view",canExecute:function(){return!t.isRendering},execute:function(e,t){var n=o.highlight().cell,r=!0;e===n?r=!1:e&&n&&(r=e.rowIndex!==n.rowIndex||e.columnIndex!==n.columnIndex),r&&o.highlight({cell:e},{source:"highlight.view"})}}),o.selectionChanged.watch(function(e){e.hasChanges("items")&&(a=t.invalidateSelection(a))}),o.sceneChanged.watch(function(e){e.hasChanges("status")&&"stop"===e.state.status&&(r=t.invalidateColumnHover(r),i=t.invalidateRowHover(i),l=t.invalidateCellHover(l),n=t.invalidateSortBy(n),a=t.invalidateSelection(a))}),o.sortChanged.watch(function(e){!t.isRendering&&e.hasChanges("by")&&(n=t.invalidateSortBy(n))}),o.highlightChanged.watch(function(e){t.isRendering||(e.hasChanges("cell")&&(l=t.invalidateCellHover(l)),e.hasChanges("columns")&&(r=t.invalidateColumnHover(r)),e.hasChanges("rows")&&(i=t.invalidateRowHover(i)))}),o.dragChanged.on(function(e){e.hasChanges("isActive")&&e.state.isActive&&(o.highlight({columns:[],rows:[],cell:null},{source:"highlight.view"}),r=t.invalidateColumnHover(r),i=t.invalidateRowHover(i),l=t.invalidateCellHover(l))})}return h(u,[{key:"invalidateColumnHover",value:function(e){e.forEach(function(e){return e()}),e=[];var t=this.model.highlight().columns,n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;e.push(this.highlightColumn(l,"highlighted"))}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return e}},{key:"invalidateRowHover",value:function(e){e.forEach(function(e){return e()}),e=[];var t=this.model.highlight().rows,n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;e.push(this.highlightRow(l,"highlighted"))}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return e}},{key:"invalidateCellHover",value:function(e){e.forEach(function(e){return e()}),e=[];var t=this.model.highlight().cell;if(t){var n=this.table.body,r=t.rowIndex,i=t.columnIndex;e.push(this.highlightCell(n.cell(r,i),"highlighted"))}return e}},{key:"invalidateSortBy",value:function(e){e.forEach(function(e){return e()}),e=[];var t=this.model.sort().by,n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value,u=eu(l);e.push(this.highlightColumn(u,"sorted"))}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return e}},{key:"invalidateSelection",value:function(e){var t=this;e.forEach(function(e){return e()});var n=this.model.selection().items,r=this.selectionService.lookup(n);return e=this.cellSelector.map(r).map(function(e){return t.highlightCell(e,"selected")})}},{key:"findColumnPosition",value:function(t){var e=Ql(this.model.columnList().index,function(e){return e.key.model.key===t});return e?Jl(e.node).map(function(e){return e.key.columnIndex}):[]}},{key:"highlightColumn",value:function(e,s){var c=this.findColumnPosition(e);if(!c.length)return No;var t=this.table,h=t.head,f=t.body,d=t.foot;return qa.mutate(function(){var e=1===c.length,t=!0,n=!1,r=void 0;try{for(var i,o=c[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;e&&(h.column(a).addClass(_a+"-"+s),h.column(a-1).addClass(_a+"-"+s+"-prev"),h.column(a+1).addClass(_a+"-"+s+"-next"));var l=f.column(a),u=l.model();u&&u.canHighlight&&(l.addClass(_a+"-"+s),d.column(a).addClass(_a+"-"+s))}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}),this.blurColumn(e,s)}},{key:"blurColumn",value:function(e,a){var l=this.findColumnPosition(e);if(!l.length)return No;var t=this.table,u=t.head,s=t.body,c=t.foot;return function(){qa.mutate(function(){var e=!0,t=!1,n=void 0;try{for(var r,i=l[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var o=r.value;u.column(o).removeClass(_a+"-"+a),u.column(o-1).removeClass(_a+"-"+a+"-prev"),u.column(o+1).removeClass(_a+"-"+a+"-next"),s.column(o).removeClass(_a+"-"+a),c.column(o).removeClass(_a+"-"+a)}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}})}}},{key:"highlightRow",value:function(e,t){if(e<0)return No;var n=this.table.body;return qa.mutate(function(){return n.row(e).addClass(_a+"-"+t)}),this.blurRow(e,t)}},{key:"blurRow",value:function(e,t){var n=this.table;if(e<0)return No;var r=n.body.row(e);return function(){return qa.mutate(function(){return r.removeClass(_a+"-"+t)})}}},{key:"highlightCell",value:function(e,t){return qa.mutate(function(){e.addClass(_a+"-"+t)}),this.blurCell(e,t)}},{key:"blurCell",value:function(e,t){return function(){return qa.mutate(function(){return e.removeClass(_a+"-"+t)})}}},{key:"isRendering",get:function(){return"stop"!==this.model.scene().status||this.model.drag().isActive}}]),u}(),rf=function(e){function r(e,t,n){g(this,r);var i=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return i.model=e,i.table=t,i.service=n,e.navigationChanged.watch(function(e){if(e.hasChanges("cell")){var t=e.changes.cell.oldValue?e.changes.cell.oldValue.column:{},n=e.changes.cell.newValue?e.changes.cell.newValue.column:{};if(t.key!==n.key&&(t.viewWidth||n.viewWidth)){var r=i.updateColumnForm();i.invalidateColumns(r)}}}),i.onInit(),i}return c(r,ya),h(r,[{key:"onInit",value:function(){var n=this,r=this.model,i=this.styleRow.bind(this);r.layoutChanged.watch(function(e){if("layout.view"!==e.tag.source&&e.hasChanges("columns")){var t=n.updateColumnForm();n.invalidateColumns(t)}}),r.rowChanged.watch(function(e){if(e.hasChanges("canResize")){var t=Array.from(r.style().rows);if(e.state.canResize)t.push(i);else{var n=r.style.rows.indexOf(i);t.splice(n,1)}r.style({rows:t},{source:"layout.view"})}}),r.dataChanged.watch(function(e){e.hasChanges("columns")&&r.layout({columns:new Map},{source:"layout.view",behavior:"core"})}),r.sceneChanged.watch(function(e){e.hasChanges("column")&&n.invalidateColumns(),e.hasChanges("status")&&"stop"===e.state.status&&n.updateColumnForm()})}},{key:"updateColumnForm",value:function(){var e=this.model,t=this.table.head,n=e.layout().columns,r=new Map,i=this.table.head.context.bag.cells,o=!0,a=!1,l=void 0;try{for(var u,s=i[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,h=c.column,f=c.rowIndex,d=c.columnIndex;if(h.canResize){var g=h.key;if(n.has(g))r.set(g,{width:n.get(g).width});else{var m=t.cell(f,d).width();m&&r.set(g,{width:m})}}}}catch(e){a=!0,l=e}finally{try{!o&&s.return&&s.return()}finally{if(a)throw l}}e.layout({columns:r},{source:"layout.view",behavior:"core"});var p=this.model.navigation().column;if(p&&p.viewWidth){var v=new Map(r),y=r.get(p.key);return v.set(p.key,{width:y?Math.max(y.width,p.viewWidth):p.viewWidth}),v}return r}},{key:"invalidateColumns",value:function(e){aa.info("layout","invalidate columns");for(var t=this.table,n=t.data.columns(),r=fu(t,e),i={},o=n.length;o--;){var a=n[o],l=r(a.key);if(null!==l){var u=tc(a.key),s=l+"px",c={width:s,"min-width":s,"max-width":s};i["td.q-grid-the-"+u]=c,i["th.q-grid-the-"+u]=c}}Xs(this.gridId,"layout-column").set(i)}},{key:"styleRow",value:function(e,t){var n=(0,this.model.layout)().rows.get(e);n&&t.class("resized-"+n.height+"px",{height:n.height+"px"})}},{key:"dispose",value:function(){s(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"dispose",this).call(this),Xs(this.gridId,"layout-column").remove()}},{key:"gridId",get:function(){return this.model.grid().id}}]),r}(),of=function(){function n(e,t){g(this,n),this.model=e,this.table=t}return h(n,[{key:"positon",value:function(e,t){for(var n=this.table,r=n.body,i=this.lastRow,o=n.view.scrollHeight()-n.view.height(),a=0,l=0;a<=i&&l<=e;)l+=r.row(a).height(),a++;return"down"===t&&r.row(a)&&(l-=r.row(a).height(),a--),{row:Math.max(this.firstRow,Math.min(i,a)),offset:l=Math.min(l,o)}}},{key:"goTo",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"navigation",r=this.cell(e,t);return r||(r=this.cell(e,this.firstColumn)),this.model.navigation({cell:r},{source:n}),!0}},{key:"columns",value:function(e){for(var t=this.table.body.columns(e),n=[],r=0,i=t.length;r<i;r++){var o=t[r];o.model().canFocus&&n.push(o.index)}return n}},{key:"cell",value:function(e,t){var n=this.table.body.cell(e,t),r=n.model();return r?{rowIndex:e,columnIndex:t,row:r.row,column:r.column}:null}},{key:"context",value:function(e,t){var n=this.model,r=this.currentRow,i=this.currentColumn,o=n.action().shortcut.keyCode;return Object.assign({model:n,type:e,oldRow:r,oldColumn:i,keyCode:o},t)}},{key:"currentColumn",get:function(){var e=this.columns(this.currentRow),t=this.model.navigation().columnIndex,n=e.indexOf(t);return e.length?e[Math.max(n,0)]:-1}},{key:"nextColumn",get:function(){var e=this.columns(this.currentRow),t=e.indexOf(this.currentColumn);return 0<=t&&t<e.length-1?e[t+1]:-1}},{key:"prevColumn",get:function(){var e=this.columns(this.currentRow),t=e.indexOf(this.currentColumn);return 0<t&&t<e.length?e[t-1]:-1}},{key:"lastColumn",get:function(){var e=this.columns(this.currentRow),t=e.length-1;return 0<=t?e[t]:-1}},{key:"firstColumn",get:function(){var e=this.columns(this.currentRow);return e.length?e[0]:-1}},{key:"currentRow",get:function(){var e=this.model.navigation().rowIndex;return e<0?this.model.scene().rows.length?0:-1:e}},{key:"nextRow",get:function(){var e=this.currentRow+1;return e<=this.lastRow?e:-1}},{key:"prevRow",get:function(){var e=this.currentRow-1;return 0<=e?e:-1}},{key:"firstRow",get:function(){return Math.min(0,this.lastRow)}},{key:"lastRow",get:function(){return this.table.body.rowCount(this.currentColumn)-1}},{key:"commands",get:function(){var i=this,e=this.model,o=this.table,t=e.navigation().shortcut,n=e.edit,r=function(){if("view"===n().state)return!0;var e=o.body.column(i.currentColumn).model();return e&&("focus"===e.editorOptions.trigger||"transparent"===e.editorOptions.cruise)},a=this.model.navigation().go,l={goDown:new Ea({source:"navigation",shortcut:t.down,canExecute:function(){if(r()){var e=i.nextRow;return 0<=e&&a.canExecute(i.context("down",{newRow:e}))}return!1},execute:function(){var e=i.nextRow,t=i.currentColumn;return a.execute(i.context("down",{newRow:e,newColumn:t}))&&i.goTo(e,t)}}),goUp:new Ea({source:"navigation",shortcut:t.up,canExecute:function(){if(r()){var e=i.prevRow;return 0<=e&&a.canExecute(i.context("up",{newRow:e}))}return!1},execute:function(){var e=i.prevRow,t=i.currentColumn;return a.execute(i.context("up",{newRow:e,newColumn:t}))&&i.goTo(e,t)}}),goRight:new Ea({source:"navigation",shortcut:t.right,canExecute:function(){if(r()){var e=i.nextColumn;return 0<=e&&a.canExecute(i.context("right",{newColumn:e}))}return!1},execute:function(){var e=i.currentRow,t=i.nextColumn;return a.execute(i.context("right",{newRow:e,newColumn:t}))&&i.goTo(e,t)}}),goLeft:new Ea({source:"navigation",shortcut:t.left,canExecute:function(){if(r()){var e=i.prevColumn;return 0<=e&&a.canExecute(i.context("left",{newColumn:e}))}return!1},execute:function(){var e=i.currentRow,t=i.prevColumn;return a.execute(i.context("left",{newRow:e,newColumn:t}))&&i.goTo(e,t)}}),goNext:new Ea({source:"navigation",shortcut:t.next,canExecute:function(){var e=i.nextRow,t=i.nextColumn;return(0<=t||0<=e)&&a.canExecute(i.context("next",{newRow:e,newColumn:t}))},execute:function(){var e=i.nextColumn,t=0<=e,n=t?i.currentRow:i.nextRow,r=t?e:i.firstColumn;return a.execute(i.context("next",{newRow:n,newColumn:r}))&&i.goTo(n,r)}}),goPrevious:new Ea({source:"navigation",shortcut:t.previous,canExecute:function(){var e=i.prevColumn,t=i.prevRow;return(0<=e||0<=t)&&a.canExecute(i.context("previous",{newRow:t,newColumn:e}))},execute:function(){var e=i.prevColumn,t=0<=e,n=t?e:i.lastColumn,r=t?i.currentRow:i.prevRow;return a.execute(i.context("previous",{newRow:r,newColumn:n}))&&i.goTo(r,n)}}),home:new Ea({source:"navigation",shortcut:t.home,canExecute:function(){if(r()){var e=i.prevColumn;return 0<=e&&a.canExecute(i.context("end",{newColumn:e}))}return!1},execute:function(){var e=i.currentRow,t=i.firstColumn;return a.execute(i.context("home",{newRow:e,newColumn:t}))&&i.goTo(e,t)}}),end:new Ea({source:"navigation",shortcut:t.end,canExecute:function(){if(r()){var e=i.nextColumn;return 0<=e&&a.canExecute(i.context("home",{newColumn:e}))}return!1},execute:function(){var e=i.currentRow,t=i.lastColumn;return a.execute(i.context("end",{newRow:e,newColumn:t}))&&i.goTo(e,t)}}),upward:new Ea({source:"navigation",shortcut:t.upward,canExecute:function(){if(r()){var e=i.prevRow;return 0<=e&&a.canExecute(i.context("upward",{newRow:e}))}return!1},execute:function(){var e=i.firstRow,t=i.currentColumn;return a.execute(i.context("upward",{newRow:e,newColumn:t}))&&i.goTo(e,t)}}),downward:new Ea({source:"navigation",shortcut:t.downward,canExecute:function(){if(r()){var e=i.nextRow;return 0<=e&&a.canExecute(i.context("downward",{newRow:e}))}return!1},execute:function(){var e=i.lastRow,t=i.currentColumn;return a.execute(i.context("downward",{newRow:e,newColumn:t}))&&i.goTo(e,t)}}),pageUp:new Ea({source:"navigation",shortcut:t.pageUp,canExecute:function(){if(r()){var e=i.prevRow;return 0<=e&&a.canExecute(i.context("pageUp",{newRow:e}))}return!1},execute:function(){var e=o.view,t=i.positon(e.scrollTop()-e.height(),"up"),n=t.row,r=i.currentColumn;return!!a.execute(i.context("pageUp",{newRow:n,newColumn:r}))&&(i.model.scroll({top:t.offset},{source:"navigation"}),i.goTo(n,r,"navigation.scroll"))}}),pageDown:new Ea({source:"navigation",shortcut:t.pageDown,canExecute:function(){if(r()){var e=i.nextRow;return 0<=e&&a.canExecute(i.context("pageDown",{newRow:e}))}return!1},execute:function(){var e=o.view,t=i.positon(e.scrollTop()+e.height(),"down"),n=t.row,r=i.currentColumn;return!!a.execute(i.context("pageDown",{newRow:n,newColumn:r}))&&(i.model.scroll({top:t.offset},{source:"navigation"}),i.goTo(t.row,i.currentColumn,"navigation.scroll"))}})};return new Map(Object.entries(l))}}]),n}(),af=function(){function n(l,u,e){var s=this;g(this,n),this.model=l,this.table=u;var t=new of(l,u),i=[];e.register(t.commands),this.focus=new Ea({source:"navigation.view",execute:function(e){var t=e.rowIndex,n=e.columnIndex,r=e.behavior,i=u.body.cell(t,n).model();if(i){var o=i.row,a=i.column;l.navigation({cell:{rowIndex:t,columnIndex:n,row:o,column:a}},{source:"navigation.view",behavior:r})}else l.navigation({cell:null},{source:"navigation.view",behavior:r})},canExecute:function(e){var t=l.navigation().cell;return!(!e||!e.column.canFocus||_c.equals(e,t))}}),this.scrollTo=new Ea({source:"navigation.view",execute:function(e,t){var n=u.body.cell(e,t);s.scroll(u.view,n)},canExecute:function(e,t){return null!==u.body.cell(e,t).model()}}),l.navigationChanged.watch(function(e){if(e.hasChanges("cell")){"core"!==e.tag.behavior&&(s.table.view.isFocused()||s.table.view.focus());var t=e.state,n=t.rowIndex,r=t.columnIndex;i=s.invalidateFocus(i),"navigation.scroll"!==e.tag.source&&s.scrollTo.canExecute(n,r)&&s.scrollTo.execute(n,r),l.focus({rowIndex:n,columnIndex:r},{source:"navigation.view"})}}),l.focusChanged.watch(function(e){if("navigation.view"!==e.tag.source){if(e.hasChanges("isActive")){var t=u.view,n=_a+"-active";e.state.isActive?(qa.mutate(function(){return t.addClass(n)}),t.focus()):qa.mutate(function(){return t.removeClass(n)})}(e.hasChanges("rowIndex")||e.hasChanges("columnIndex"))&&s.focus.execute(e.state)}}),l.sceneChanged.watch(function(e){if(e.hasChanges("status"))switch(e.state.status){case"stop":var t=l.navigation(),n=t.row,r=t.column,i=t.columnIndex;t.rowIndex;if(n&&r){var o=u.data.rows().indexOf(n),a=u.data.columns().findIndex(function(e){return e.key===r.key});a<0&&"control"===r.class&&(a=i),s.focus.execute({rowIndex:o,columnIndex:a,behavior:"core"})}}})}return h(n,[{key:"invalidateFocus",value:function(e){e.forEach(function(e){return e()}),e=[];var t=this.model.navigation(),n=t.rowIndex,r=t.columnIndex,i=this.table.body.cell(n,r);return i.model()&&(qa.mutate(function(){return i.addClass(_a+"-focused")}),e.push(function(){return qa.mutate(function(){return i.removeClass(_a+"-focused")})})),e}},{key:"scroll",value:function(r,i){var o=this.model.scroll;qa.measure(function(){var e=i.rect(),t=r.rect(),n={};r.canScrollTo(i,"left")&&(t.left>e.left||t.left>e.right||t.right<e.left||t.right<e.right)&&(t.width<e.width||t.left>e.left||t.left>e.right?n.left=e.left-t.left+o().left:(t.left<e.left||t.right<e.right)&&(n.left=e.right-t.right+o().left)),r.canScrollTo(i,"top")&&(t.top>e.top||t.top>e.bottom||t.bottom<e.top||t.bottom<e.bottom)&&(t.height<e.height||t.top>e.top||t.top>e.bottom?n.top=e.top-t.top+o().top:(t.top<e.top||t.bottom<e.bottom)&&(n.top=e.bottom-t.bottom+o().top)),Object.keys(n).length&&o(n,{behavior:"core",source:"navigation.view"})})}}]),n}(),lf=function(){function e(s){g(this,e);var c=(this.model=s).pagination().resetTriggers;Object.keys(c).forEach(function(u){return s[u+"Changed"].on(function(e){if("core"!==e.tag.behavior&&"virtual"!==s.scroll().mode){var t=c[u],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;e.hasChanges(l)&&s.pagination({current:0},{source:e.tag.source||"pagination.view"})}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}})})}return h(e,[{key:"current",get:function(){return this.model.pagination().current}},{key:"size",get:function(){return this.model.pagination().size}}]),e}(),uf=function(){function n(r,e,t){g(this,n),this.model=r,this.toggleStatus=new Ea({source:"row.details.view",execute:function(e){e||(e=r.navigation().row);var t=function(e,n){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"single";return n=Tu(e,n,t),"all"!==t&&e.forEach(function(e){var t=n.get(e);t?t.expand=!t.expand:n.set(e,new Mu(!0))}),n}([e],r.row().status,r.row().mode);r.row({status:t},{source:"row.details.view"})},canExecute:function(e){if(!e){var t=r.navigation().cell;t&&"row-expand"===t.column.type&&(e=t.row)}return!!e},shortcut:r.row().shortcut.toggle}),r.sceneChanged.watch(function(e){if("row.details.view"!==e.tag.source&&e.hasChanges("rows")){var t=r.row(),n=Tu(r.data().rows,t.status,t.mode);r.row({status:n},{source:"row.details.view"})}}),t.register([this.toggleStatus])}return h(n,[{key:"status",value:function(e){if(e instanceof Lu)return null;var t=this.model.row().status,n=t.get(e);return n&&n.expand?"expand":"collapse"}}]),n}(),sf=function(){function t(m,p,e){g(this,t),this.model=m,this.tagName=e;var v=new Hh(p.context.bag.body);this.drop=new Ea({source:"row.view",canExecute:function(e){if("end"===e.action)return!0;e.dragData;return!!v.row(Yh(e))},execute:function(e){var t=e.dragData;switch(e.action){case"over":var n=v.row(Yh(e));if(!e.inAreaY(n.element))return;var r=n.index;if(t!==r){if("virtual"===m.scroll().mode)p.body.row(t).removeClass(_a+"-drag"),p.body.row(r).addClass(_a+"-drag");var i=p.body.row(t).model(),o=[],a=!0,l=!1,u=void 0;try{for(var s,c=m.rowList().index.entries()[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var h=s.value,f=h[1];t<f&&f<=r?h[1]=f-1:f<t&&r<=f&&(h[1]=f+1),o.push(h)}}catch(e){l=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(l)throw u}}var d=new Map(o),g=m.data().id.row(r,i.model);d.set(g,r),m.rowList({index:d},{source:"row.view"}),e.dragData=r}break;case"drop":case"end":p.body.row(t).removeClass(_a+"-drag")}}}),this.drag=new Ea({source:"row.view",execute:function(e){var t=e.data,n=p.body.row(t);n.addClass(_a+"-drag");var r=n.model();if(r)return r.element},canExecute:function(e){if(Yt(e.data)){var t=e.data;return 0<=t&&m.view().rows.length>t}return!1}}),this.resize=new Ea({source:"row.view"}),m.dataChanged.on(function(e){e.hasChanges("rows")&&m.rowList({index:new Map},{source:"row.view",behavior:"core"})})}return h(t,[{key:"canMove",get:function(){return this.model.row().canMove}},{key:"canResize",get:function(){return this.model.row().canResize}}]),t}(),cf=function(){function d(i,e,t,o){var n=this;g(this,d),this.model=i,this.table=e;var u=i.scroll,r=i.row().height,s=i.pagination,a={threshold:i.pagination().size,resetTriggers:[]};(0<r||L(r))&&(a.rowHeight=r),this.y=t.factory(a),this.y.container.read=qa.measure,this.y.container.write=qa.mutate;var l=(this.y.container.drawEvent.on||this.y.container.drawEvent.subscribe).bind(this.y.container.drawEvent),c=function(){var e=i.pipe().effect;if(e.hasOwnProperty("memo")){var t=e.memo.length;return s({count:t},{source:"scroll.view",behavior:"core"}),t}return s().count};switch(l(function(e){var t,n,r,i,o,a,l=e.position;t=l,n=s(),r=n.size,i=n.current,o=n.count,(a=0===r?0:o-1<=t+r?Math.ceil(o/r)-1:Math.floor((t+r/2)/r))!==i&&s({current:a},{source:"scroll.view",behavior:"core"}),u({cursor:l},{source:"scroll.view",behavior:"core"})}),u().mode){case"virtual":this.y.settings.fetch=function(e,t,n){if(i.fetch({skip:e},{source:"scroll.view",behavior:"core"}),0===e){var r=c();n.resolve(r)}else o.invalidate({source:"scroll.view",why:"refresh"}).then(function(){var e=c();n.resolve(e)})};var h=void 0,f=new Set(u().resetTriggers);i.sceneChanged.watch(function(e){if(e.hasChanges("status"))switch(e.state.status){case"start":h=e.tag.source,f.has(h)&&i.fetch({skip:0},{source:"scroll.view",behavior:"core"});break;case"stop":f.has(h)&&n.y.container.reset()}});break;default:i.paginationChanged.watch(function(){return n.y.container.reset()})}i.scrollChanged.watch(function(e){if("scroll.view"!==e.source){if(e.hasChanges("mode"))switch(e.state.mode){case"virtual":u({map:{rowToView:function(e){return e-n.y.container.position},viewToRow:function(e){return e+n.y.container.position}}},{source:"scroll.view",behavior:"core"});break;case"default":u({map:{rowToView:$o,viewToRow:$o}})}(e.hasChanges("left")||e.hasChanges("top"))&&n.invalidate()}})}return h(d,[{key:"invalidate",value:function(){aa.info("layout","invalidate scroll");var e=this.table,t=this.model.scroll();qa.mutate(function(){e.view.scrollLeft(t.left),e.view.scrollTop(t.top)})}},{key:"mode",get:function(){return this.model.scroll().mode}}]),d}(),hf=function(){function n(e,t){g(this,n),this.model=e,this.service=t}return h(n,[{key:"select",value:function(e){var t=this,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=arguments[2];if(r=r||this.keyFactory(),M(e))e.forEach(function(e){return t.select(e,n,r)});else{if(e instanceof Kl){var i=this.model.data().rows;if(i.length)return void e.rows.forEach(function(e){return t.select(i[e],n,r)})}this.selectCore(e,n,r)}}},{key:"toggle",value:function(e){var t=this.state(e);return this.select(e,null===t||!t)}},{key:"state",value:function(e,t){var n=this;if(t=t||this.keyFactory(),M(e))return!!e.every(function(e){return n.state(e,t)})||!!e.some(function(e){return n.state(e,t)})&&null;if(e instanceof Kl){var r=this.model.data().rows;if(r.length)return!!(e.rows.length&&e.rows.every(function(e){return n.state(r[e],t)}))||!!e.rows.some(function(e){return n.state(r[e],t)})&&null}return this.stateCore(e,t)}},{key:"stateAll",value:function(e){var t=this.entries();return e.length===t.length||0<t.length&&null}},{key:"keyFactory",value:function(){return this.service.hashFactory()}},{key:"clear",value:function(){this.clearCore()}},{key:"entries",value:function(){return[]}},{key:"selectCore",value:function(){}},{key:"clearCore",value:function(){}},{key:"stateCore",value:function(){return!1}}]),n}(),ff=function(e){function r(e,t){g(this,r);var n=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.item=null,n}return c(r,hf),h(r,[{key:"entries",value:function(){return this.item?[this.item]:[]}},{key:"selectCore",value:function(e,t){this.item=t?e:null}},{key:"stateCore",value:function(e,t){return null!==this.item&&t(e)===t(this.item)}},{key:"clearCore",value:function(){this.item=null}}]),r}(),df=function(e){function r(e,t){g(this,r);var n=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.items=new Map,n}return c(r,hf),h(r,[{key:"entries",value:function(){return Array.from(this.items.values())}},{key:"selectCore",value:function(e,t,n){t?this.items.set(n(e),e):this.items.delete(n(e))}},{key:"stateCore",value:function(e,t){return this.items.has(t(e))}},{key:"clearCore",value:function(){this.items=new Map}}]),r}(),gf=function(e){function n(e,t){return g(this,n),m(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return c(n,df),h(n,[{key:"select",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];M(e)&&this.clear(),s(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"select",this).call(this,e,t)}}]),n}();function mf(e,t){var n=e.selection().mode;switch(n){case"single":return new ff(e,t);case"multiple":return new df(e,t);case"range":return new gf(e,t);default:throw new Xo("selection.state.factory",'Invalid selection mode "'+n+'"')}}var pf=function(){function t(e){g(this,t),this.model=e}return h(t,[{key:"build",value:function(){var n={row:this.buildRows.bind(this),column:this.buildColumns.bind(this),cell:this.buildCells.bind(this),mix:this.buildMix.bind(this)},r=this.model;return function(){var e=r.selection(),t=n[e.unit];if(!t)throw new Xo("range.builder","Invalid unit "+e.unit);return t.apply(void 0,arguments)}}},{key:"buildRows",value:function(e,t){var n=this.model.view().rows;if(!t)return[n[e.rowIndex]];var r=Math.min(e.rowIndex,t.rowIndex),i=Math.max(e.rowIndex,t.rowIndex);return n.slice(r,i+1)}},{key:"buildColumns",value:function(e,t){if(!t)return[e.column];var n=this.model.columnList().line,r=Math.min(e.columnIndex,t.columnIndex),i=Math.max(e.columnIndex,t.columnIndex);return n.slice(r,i+1)}},{key:"buildCells",value:function(e,t){if(!t)return[{column:e.column,row:e.row}];var n=this.model.view(),r=n.rows,i=n.columns,o=Math.min(e.rowIndex,t.rowIndex),a=Math.max(e.rowIndex,t.rowIndex),l=Math.min(e.columnIndex,t.columnIndex),u=Math.max(e.columnIndex,t.columnIndex),s=r.slice(o,a+1),c=i.slice(l,u+1),h=[];return s.forEach(function(t){c.filter(function(e){return"data"===e.class}).forEach(function(e){h.push({column:e,row:t})})}),h}},{key:"buildMix",value:function(e,t){var n="row-indicator"===e.column.type?"row":"cell";return("row"===n?this.buildRows(e,t):this.buildCells(e,t)).map(function(e){return{item:e,unit:n}})}}]),t}(),vf=function(){function o(l,e,t){var u=this;g(this,o),this.model=l,this.table=e,this.selectionService=new tf(l),this.selectionState=mf(l,this.selectionService),this.selectionRange=new pf(l);var n=this.commands;t.register(n),this.toggleRow=n.get("toggleRow"),this.toggleColumn=n.get("toggleColumn"),this.toggleCell=n.get("toggleCell"),this.reset=n.get("reset"),l.navigationChanged.watch(function(e){"selection.view"!==e.tag.source&&e.hasChanges("cell")&&u.toggleCell.canExecute(e.state.cell)&&u.toggleCell.execute(e.state.cell)});var r=_a+"-select-"+l.selection().mode,i=_a+"-select-"+l.selection().unit,s=e.view;s.addClass(r),s.addClass(i),l.selectionChanged.watch(function(e){if(e.hasChanges("mode")){var t=_a+"-select-"+e.state.mode,n=_a+"-select-"+e.changes.mode.oldValue;s.removeClass(n),s.addClass(t)}if(e.hasChanges("unit")){var r=_a+"-select-"+e.state.unit,i=_a+"-select-"+e.changes.unit.oldValue;s.removeClass(i),s.addClass(r)}if((e.hasChanges("unit")||e.hasChanges("mode"))&&(e.hasChanges("items")||(u.selectionState.clear(),l.selection({items:[]},{source:"selection.view"}),u.selectionState=mf(l,u.selectionService))),e.hasChanges("items")&&"selection.view"!==e.tag.source){var o=u.selectionService.lookup(e.changes.items.oldValue);u.select(o,!1);var a=u.selectionService.lookup(e.state.items);u.select(a,!0)}})}return h(o,[{key:"selectRange",value:function(e,t,n){var r=this.selectionRange.build()(e,t);this.select(r,!0,n)()}},{key:"toggle",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"custom",r=this.model.selection().toggle,i={items:e,source:n,kind:"toggle"};if(r.canExecute(i)){r.execute(i);var o=this.selectionState;return arguments.length&&!sr(e)||(e=this.model.view().rows),o.toggle(e),function(){var e=t.selectionService.map(o.entries());t.model.selection({items:e},{source:"selection.view"})}}return No}},{key:"select",value:function(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"custom",i=this.model.selection().toggle,o={items:e,state:t,source:r,kind:"select"};if(i.canExecute(o)){i.execute(o);var a=this.selectionState;return a.select(e,t),function(){var e=n.selectionService.map(a.entries());n.model.selection({items:e},{source:"selection.view"})}}return No}},{key:"state",value:function(e){return arguments.length?!0===this.selectionState.state(e):!!this.selectionState.stateAll(this.rows)}},{key:"isIndeterminate",value:function(e){return arguments.length?null===this.selectionState.state(e):null===this.selectionState.stateAll(this.rows)}},{key:"navigateTo",value:function(e,t){var n=this.table.body.cell(e,t).model(),r=n.row,i=n.column;this.model.navigation({cell:{rowIndex:e,columnIndex:t,row:r,column:i}},{source:"selection.view"})}},{key:"commands",get:function(){var i=this,o=this.model,e=o.selection().shortcut,t=new Ea({source:"selection.view",canExecute:function(){return"row"===o.selection().unit&&0<i.rows.length},execute:function(){var e=o.navigation().rowIndex,t=i.rows[0<=e?e:e+1];i.toggle(t)()},shortcut:e.toggleRow}),n={toggleCell:new Ea({source:"selection.view",canExecute:function(e){var t=o.selection();return e&&"range"!==t.mode&&("cell"===t.unit||"mix"===t.unit)},execute:function(e,t){switch(o.selection().unit){case"cell":i.toggle(e,t)();break;case"mix":if("row-indicator"===e.column.type){i.toggle({item:e.row,unit:"row"},t)();break}i.toggle({item:e,unit:"cell"},t)()}}}),toggleRow:new Ea({source:"selection.view",execute:function(e,t){i.toggle(e,t)()},canExecute:function(){return!!arguments.length||"multiple"===i.mode}}),toggleColumn:new Ea({source:"selection.view",execute:function(e,t){i.toggle(e,t)()}}),commitRow:new Ea({source:"selection.view",canExecute:function(){var e=o.navigation().column;return e&&"select"===e.type},execute:function(){t.canExecute()&&t.execute()},shortcut:o.edit().commitShortcuts.select||""}),toggleActiveRow:t,togglePrevRow:new Ea({source:"selection.view",canExecute:function(){return"row"===o.selection().unit&&0<o.navigation().rowIndex},execute:function(){var e=o.navigation(),t=e.rowIndex,n=e.columnIndex,r=i.rows[t];i.toggle(r)(),i.navigateTo(t-1,n)},shortcut:e.togglePreviousRow}),toggleNextRow:new Ea({source:"selection.view",canExecute:function(){return"row"===o.selection().unit&&o.navigation().rowIndex<i.rows.length-1},execute:function(){var e=o.navigation(),t=e.rowIndex,n=e.columnIndex,r=i.rows[t];i.toggle(r)(),i.navigateTo(t+1,n)},shortcut:e.toggleNextRow}),toggleActiveColumn:new Ea({source:"selection.view",canExecute:function(){return"column"===o.selection().unit&&0<=o.navigation().columnIndex},execute:function(){var e=o.navigation().columnIndex,t=i.columns[e];i.toggle(t)()},shortcut:e.toggleColumn}),toggleNextColumn:new Ea({source:"selection.view",canExecute:function(){return"column"===o.selection().unit&&o.navigation().columnIndex<i.columns.length-1},execute:function(){var e=o.navigation(),t=e.rowIndex,n=e.columnIndex,r=i.columns[n];i.toggle(r)(),i.navigateTo(t,n+1)},shortcut:e.toggleNextColumn}),togglePrevColumn:new Ea({source:"selection.view",canExecute:function(){return"column"===o.selection().unit&&0<o.navigation().columnIndex},execute:function(){var e=o.navigation(),t=e.rowIndex,n=e.columnIndex,r=i.columns[n];i.toggle(r)(),i.navigateTo(t,n-1)},shortcut:e.togglePreviousColumn}),selectAll:new Ea({source:"selection.view",canExecute:function(){return"multiple"===o.selection().mode},execute:function(){var e=[];switch(o.selection().unit){case"row":e=o.data().rows;break;case"column":e=o.columnList().line;break;case"cell":case"mix":var t=i.selectionRange.build(),n=i.table.body;e=t(n.cell(0,0),n.cell(n.rowCount()-1,n.columnCount()-1));break;default:throw new Xo("selection.view","Invalid unit "+o.selection().unit)}i.select(e,!0)()},shortcut:e.selectAll})};return new Map(Object.entries(n))}},{key:"selection",get:function(){return this.model.selection()}},{key:"mode",get:function(){return this.selection.mode}},{key:"items",get:function(){return this.selection.items}},{key:"rows",get:function(){return this.table.data.rows()}},{key:"columns",get:function(){return this.table.data.columns()}}]),o}(),yf=function(){function e(s){var c=this;g(this,e),this.model=s,this.hover=!1,this.toggle=new Ea({source:"sort.view",canExecute:function(e){var t=e.key,n=uu(s.columnList().line);return n.hasOwnProperty(t)&&!1!==n[t].canSort},execute:function(e){var t=e.key,n=s.sort,r=n(),i=Array.from(r.by),o=tu(i,t);if(0<=o){var a=nu(i[o]);switch(a){case"desc":i.splice(o,1),c.hover=!1;break;case"asc":var l=R({},t,"desc");i[o]=l,c.hover=!1;break;default:throw Xo("head.core","Invalid sort direction "+a)}}else{"single"===r.mode&&(i.length=0);var u=R({},t,"asc");i.push(u),iu(s)(i)}n({by:i},{source:"sort.view"})}}),this.onInit()}return h(e,[{key:"onInit",value:function(){var i=this,r=this.model,o=r.sort;r.columnListChanged.watch(function(e){if(e.hasChanges("index")){var t=o(),n=iu(r)(Array.from(t.by));i.equals(n,t.by)||o({by:n},{source:"sort.view"})}}),r.dataChanged.watch(function(e){if(e.hasChanges("columns")){var t=o().by,n=uu(e.state.columns),r=t.filter(function(e){return n.hasOwnProperty(eu(e))});i.equals(r,t)||o({by:r},{source:"sort.view"})}})}},{key:"equals",value:function(e,t){return JSON.stringify(e)===JSON.stringify(t)}},{key:"direction",value:function(e){var t=e.key,n=this.model.sort().by;return ru(n)[t]}},{key:"order",value:function(e){var t=e.key,n=this.model.sort().by;return tu(n,t)}}]),e}(),xf=function(){function r(e,t,n){g(this,r),this.element=e,this.list=new Set,this.sheets=t,this.markDirty=n}return h(r,[{key:"class",value:function(e,t){if(e=tc(e),this.list.add(e),this.markDirty(this),t){var n=this.sheets;n.has(e)||n.set(e,t)}}}]),r}(),wf=function(){function t(e){g(this,t),this.model=e,this.entries=new Set,this.newSheets=new Map,this.oldSheets=new Map}return h(t,[{key:"enter",value:function(){var n=this.newSheets,t=this.entries,e=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var l=o.value,u=!0,s=!1,c=void 0;try{for(var h,f=l.list[Symbol.iterator]();!(u=(h=f.next()).done);u=!0){var d=h.value;l.element.removeClass(d,!0)}}catch(e){s=!0,c=e}finally{try{!u&&f.return&&f.return()}finally{if(s)throw c}}}}catch(e){r=!0,i=e}finally{try{!e&&a.return&&a.return()}finally{if(r)throw i}}t=this.entries=new Set;var g=function(e){return t.add(e)};return function(e){var t=new xf(e,n,g);return t.class.bind(t)}}},{key:"exit",value:function(){var e=this.entries,t=!0,n=!1,r=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,l=!0,u=!1,s=void 0;try{for(var c,h=a.list[Symbol.iterator]();!(l=(c=h.next()).done);l=!0){var f=c.value;a.element.addClass(f,!0)}}catch(e){u=!0,s=e}finally{try{!l&&h.return&&h.return()}finally{if(u)throw s}}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}var d=this.newSheets,g=this.oldSheets,m=this.model.grid().id,p=!0,v=!1,y=void 0;try{for(var x,w=g.keys()[Symbol.iterator]();!(p=(x=w.next()).done);p=!0){var b=x.value;if(!d.has(b))Xs(m,b).remove()}}catch(e){v=!0,y=e}finally{try{!p&&w.return&&w.return()}finally{if(v)throw y}}var k=!0,C=!1,q=void 0;try{for(var O,_=d.entries()[Symbol.iterator]();!(k=(O=_.next()).done);k=!0){var I=j(O.value,2),E=I[0],z=I[1];if(!g.has(E))Xs(m,E).set(R({},"."+E,z))}}catch(e){C=!0,q=e}finally{try{!k&&_.return&&_.return()}finally{if(C)throw q}}this.oldSheets=d,this.newSheets=new Map}}]),t}(),bf=function(){function n(e,t){g(this,n),this.table=e,this.style=t}return h(n,[{key:"visitFactory",value:function(){var h=this.style,f=this.table.body.rowBox,d=f.entries;return function(e,t){var n={dataIndex:t.row},r=f.key(n),i=d.get(r);if(i){var o=!0,a=!1,l=void 0;try{for(var u,s=i[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value;t.class(c)}}catch(e){a=!0,l=e}finally{try{!o&&s.return&&s.return()}finally{if(a)throw l}}}h(e,t)}}}]),n}(),kf=function(){function n(e,t){g(this,n),this.table=e,this.style=t}return h(n,[{key:"visitFactory",value:function(){var b=this.style,k=this.table.body.cellBox,C=this.table.body.columnBox,q=k.entries,O=C.entries;return function(e,t,n){var r={dataIndex:n.column},i=C.key(r),o=O.get(i);if(o){var a=!0,l=!1,u=void 0;try{for(var s,c=o[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var h=s.value;n.class(h)}}catch(e){l=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(l)throw u}}}var f={dataRowIndex:n.row,dataColumnIndex:n.column},d=k.key(f),g=q.get(d);if(g){var m=!0,p=!1,v=void 0;try{for(var y,x=g[Symbol.iterator]();!(m=(y=x.next()).done);m=!0){var w=y.value;n.class(w)}}catch(e){p=!0,v=e}finally{try{!m&&x.return&&x.return()}finally{if(p)throw v}}}b(e,t,n)}}}]),n}(),Cf=function(){function e(){g(this,e)}return h(e,null,[{key:"func",value:function(a){var l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:No,u=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return function(){var e=!0,t=!1,n=void 0;try{for(var r,i=a[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var o=r.value;u=l(u,o.apply(void 0,arguments))}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}return u}}},{key:"command",value:function(r){return new Ea({source:"composite",canExecute:function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];return r.reduce(function(e,t){return e||t.canExecute.apply(t,n)},!1)},execute:function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];return r.filter(function(e){return e.canExecute.apply(e,n)}).reduce(function(e,t){return t.execute.apply(t,n)||e},void 0)}})}},{key:"list",value:function(e){return e.reduce(function(e,t){return e.concat(t)},[])}},{key:"object",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Object.assign.apply(Object,[t].concat(b(e)))}}]),e}(),qf=function(){function t(e){g(this,t),this.style=e.style}return h(t,[{key:"row",value:function(){var e=this.style(),t=e.rows,n=e.row,r=n===No?t:t.concat([n]);return Cf.func(r)}},{key:"cell",value:function(){var e=this.style(),t=e.cells,n=e.cell;if(L(n)){var r=n===No?t:t.concat([n]);return Cf.func(r)}var i=Object.keys(n);if(i.length){var o=t.concat(i.map(function(r){var i=n[r];return function(e,t,n){t.key===r&&i(e,t,n)}}));return Cf.func(o)}return Cf.func(t)}}]),t}(),Of=function(){function r(e,t){var n=this;g(this,r),this.model=e,this.table=t,this.valueFactory=ta,this.service=new qf(e),this.active={row:!1,cell:!1},this.monitor={row:new wf(e),cell:new wf(e)},e.styleChanged.watch(function(e){(e.hasChanges("row")||e.hasChanges("rows"))&&(n.active.row=e.state.row!==No||0<e.state.rows.length),(e.hasChanges("cell")||e.hasChanges("cells"))&&(n.active.cell=e.state.cell!==No||0<e.state.cells.length),n.invalidate()})}return h(r,[{key:"needInvalidate",value:function(){var e=this.model;if("stop"!==e.scene().status)return!1;var t=this.active;if(!("virtual"===e.scroll().mode||t.row||t.cell))return!1;var n={model:e},r=e.style().invalidate;return r.canExecute(n)&&!1!==r.execute(n)}},{key:"invalidate",value:function(e,t){var n=this.active,r="virtual"===this.model.scroll().mode,i=this.table,o=this.valueFactory,a=new Map,l=function(e,t){var n=a.get(t);return n||(n=o(t),a.set(t,n)),n(e)},u=i.data.columns(),s=uu(u),c=n.row,h=n.cell,f=this.service.row(),d=this.service.cell();r&&(h=c=!0,f=new bf(i,f).visitFactory(),d=new kf(i,d).visitFactory());var g={class:No,row:-1,value:null,columns:{map:s,list:u}},m={class:No,row:-1,column:-1,value:null,columns:g.columns},p=i.body,v=i.context.mapper,y=v.rowToView,x=v.columnToView;i.context.bag.body;if(c){var w=i.context.bag.body.getRowElements(),b=!0,k=!1,C=void 0;try{for(var q,O=w[Symbol.iterator]();!(b=(q=O.next()).done);b=!0){var _=q.value,I=_.index,E=_.element,z=_.model,R=p.createRowCore(y(I),E);g.class=t(R),g.row=I,g.value=l,f(z,g)}}catch(e){k=!0,C=e}finally{try{!b&&O.return&&O.return()}finally{if(k)throw C}}}if(h){var j=i.context.bag.body.getCellElements(),S=!0,P=!1,A=void 0;try{for(var L,M=j[Symbol.iterator]();!(S=(L=M.next()).done);S=!0){var T=L.value,D=T.rowIndex,N=T.columnIndex,F=(E=T.element,T.row),V=T.column,$=p.createCellCore(y(D),x(N),E);m.class=e($),m.row=D,m.column=N,m.value=l,d(F,V,m)}}catch(e){P=!0,A=e}finally{try{!S&&M.return&&M.return()}finally{if(P)throw A}}}}}]),r}();var _f=window.requestAnimationFrame||window.webkitRequestAnimationFrame,If=function(){function t(e){g(this,t),this.settings=e,this.count=0,this.total=0,this.position=0,this.cursor=0,this.page=0,this.items=[],this.force=!0,this.resetEvent=new u.EventEmitter,this.updateEvent=new u.EventEmitter,this.drawEvent=new u.EventEmitter,this.deferred=null}return h(t,[{key:"tick",value:function(e){_f(e)}},{key:"read",value:function(e){e()}},{key:"write",value:function(e){e()}},{key:"apply",value:function(e,t){t(e)}},{key:"place",value:function(){var e=this.settings.threshold,t=this.cursor;return Math.ceil((t+e)/e)-1}},{key:"update",value:function(e,t){var o=this,a=this.settings,l=a.threshold,u=this.page,s=this.place();this.count!==e&&(this.count=e,this.total=Math.max(this.total,e),this.updateEvent.emit({force:sr(t)?Yt(a.rowHeight)&&0<a.rowHeight||Yt(a.columnWidth)&&0<a.columnWidth:t})),(t||u<s)&&(this.page=s,new Promise(function(e,t){var n=o.deferred={resolve:e,reject:t};if(0===s)a.fetch(0,l,n);else{var r=(u+1)*l;if(o.total<r)n.resolve(o.total);else{var i=(s-u)*l;a.fetch(r,i,n)}}}).then(function(e){o.force=!0,o.update(e)}).catch(function(){return o.deferred=null}))}},{key:"reset",value:function(){this.deferred&&(this.deferred=null),this.count=0,this.total=0,this.position=0,this.cursor=0,this.page=0,this.items=[];this.force=!0;this.resetEvent.emit({handled:!1,source:"container"}),this.update(this.count,!0)}}]),t}();function Ef(e,t,n,r){if(L(e))return function(){return e(n,t.position+r)};if(Yt(e))return function(){return e};throw new Xo("vscroll.utility","Invalid size "+e)}var zf=function(){function t(e){g(this,t),this.getCount=e,this.threshold=64,this.placeholderHeight=0,this.placeholderWidth=0,this.resetTriggers=["resize"]}return h(t,[{key:"fetch",value:function(e,t,n){n.resolve(this.getCount())}},{key:"rowHeight",value:function(e){var t=e.offsetHeight,n=getComputedStyle(e);return t+=Number.parseInt(n.marginTop)+Number.parseInt(n.marginBottom)}},{key:"columnWidth",value:function(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=Number.parseInt(n.marginLeft)+Number.parseInt(n.marginRight)}}]),t}();var Rf=function e(t){var n=this;g(this,e),this.settings=new zf(function(){return n.container.total}),t&&Object.assign(this.settings,t),this.container=new If(this.settings)};var jf=function(){function e(){g(this,e)}return h(e,[{key:"factory",value:function(e){return new Rf(e)}}]),e}(),Sf=function(){function n(e,t){g(this,n),this.gridServiceFactory=e,this.vscroll=t,this.dispose=null,this.body=null,this.edit=null,this.filter=null,this.foot=null,this.group=null,this.head=null,this.highlight=null,this.layout=null,this.nav=null,this.pagination=null,this.rowDetails=null,this.scroll=null,this.selection=null,this.sort=null,this.style=null,this.row=null}return h(n,[{key:"init",value:function(e,t,n){var r,i,o,a,l,u,s,c,h,f,d,g,m=this.gridServiceFactory.service(e),p=(r=e,i=t,o=n,a=m,l=this.vscroll,u={th:"q-grid-core-th",tr:"q-grid-core-tr"},s=new oc(r),c=new ya,h=r.action().shortcut,f={register:function(e){c.using(h.register(o,e))},keyCode:function(){return h.keyCode}},d=new th(r,o),g={register:function(e){c.using(h.register(d,e))}},function(e){var t=s.subject;return e.head=new Zh(t,i,u.th),e.body=new fh(t,i),e.foot=new Fh(t,i),e.row=new sf(t,i,u.tr),e.layout=new rf(t,i,a),e.scroll=new cf(t,i,l,a),e.highlight=new nf(t,i),e.sort=new yf(t),e.pagination=new lf(t),e.nav=new af(t,i,f),e.group=new Uh(t,i,a,f),e.edit=new Dh(t,i,f),e.filter=new Nh(t),e.rowDetails=new uf(t,i,f),e.selection=new vf(t,i,g),e.style=new Of(t,i),function(){e.layout.dispose(),s.dispose(),c.dispose()}});this.dispose=p(this)}},{key:"ngOnDestroy",value:function(){this.dispose&&(this.dispose(),this.dispose=null)}}]),n}();Sf.decorators=[{type:u.Injectable}],Sf.ctorParameters=function(){return[{type:Qc},{type:jf}]};var Pf=function(){function n(e,t){g(this,n),this.element=e,this.manager=t,this.handlers={}}return h(n,[{key:"on",value:function(t,e){var n=this,r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=this.manager.bind(e),o=this.handlers[t]||(this.handlers[t]=[]);return o.push(i),this.element.addEventListener(t,i,r),function(){n.element.removeEventListener(t,i);var e=o.indexOf(i);0<=e&&o.splice(e,1)}}},{key:"off",value:function(){var e=this.handlers,t=this.element,n=!0,r=!1,i=void 0;try{for(var o,a=Object.keys(e)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value,u=!0,s=!1,c=void 0;try{for(var h,f=Array.from(e[l])[Symbol.iterator]();!(u=(h=f.next()).done);u=!0){var d=h.value;t.removeEventListener(l,d)}}catch(e){s=!0,c=e}finally{try{!u&&f.return&&f.return()}finally{if(s)throw c}}}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}}]),n}(),Af=function(){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(e){return e()};g(this,n),this.context=e,this.apply=t}return h(n,[{key:"bind",value:function(e){var r=e.bind(this.context),i=this.apply;return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(function(){return r.apply(void 0,t)})}}}]),n}(),Lf=function(e){function l(e,t){g(this,l);var n=m(this,(l.__proto__||Object.getPrototypeOf(l)).call(this)),r=(n.model=e).grid;if("bound"===r().status)throw new Xo("grid.ctrl",'Model is already used by grid "'+r().id+'"');n.markup={document:document},n.bag={head:new ic,body:new ic,foot:new ic};var i=t.element;i.id||(i.id=e.grid().id),r({status:"bound"},{source:"grid.ctrl"});var o=t.layerFactory(n.markup),a={layer:function(e){return o.create(e)},bag:n.bag};return n.table=new Zc(e,n.markup,a),e.sceneChanged.watch(function(e){e.hasChanges("column")&&n.invalidateVisibility()}),n}return c(l,ya),h(l,[{key:"keyDown",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"grid",n=this.model,r=n.action().shortcut.keyDown(e,t);if(0<r.length)return e.preventDefault(),e.stopPropagation(),r;if("TBODY"===e.target.tagName){var i=As.translate(e);n.navigation().prevent.has(i)&&(e.preventDefault(),e.stopPropagation())}return r}},{key:"invalidateVisibility",value:function(){var e=this.model.scene().column.area,t=e.left,n=e.right,r=this.model.row(),i=r.pinTop,o=r.pinBottom;this.model.visibility({pin:{left:0<t.length,right:0<n.length,top:0<i.length,bottom:0<o.length}},{source:"grid.ctrl"})}},{key:"invalidateActive",value:function(){var e=this.table,t=e.view,n=e.model;t.isFocused()?n.focus({isActive:!0},{source:"grid.ctrl"}):n.focus({isActive:!1},{source:"grid.ctrl"})}},{key:"dispose",value:function(){s(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"dispose",this).call(this),this.model.grid({status:"unbound"},{source:"grid.ctrl"})}}]),l}(),Mf=function(e){function r(e,t){g(this,r);var n=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return n.table=t,n}return c(r,Ms),h(r,[{key:"filter",value:function(e,t){return"editor"===t||this.isViewActive()?s(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"filter",this).call(this,e,t):[]}},{key:"isViewActive",value:function(){return this.table.view.isFocused()}}]),r}(),Tf=function(e){function l(e,t,n,r,i,o){g(this,l);var a=m(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));if(a.root=e,a.element=t,a.zone=n,a.layerService=r,a.document=i,a.selectionChanged=new u.EventEmitter,a.models=["action","data","edit","filter","grid","group","pivot","row","selection","scroll","sort","style"],a.modelChanged.watch(function(e){return a.root.model=e}),!o.component)throw new Xo("grid.component","Ensure that grid theme module was included");return a.themeComponent=o.component,a}return c(l,Zs),h(l,[{key:"ngOnInit",value:function(){var n=this,e=this.root.model,t=this.element.nativeElement;e.style({classList:Array.from(t.classList)});var r=this.using(new Lf(e,{layerFactory:function(){return n.layerService},element:t}));this.root.table=r.table,this.root.bag=r.bag,this.root.markup=r.markup,this.root.commandManager=new Mf(function(e){return e()},r.table);var i=new Pf(t,new Af(this)),o=new Pf(this.document,new Af(this));this.zone.runOutsideAngular(function(){return n.using(o.on("focusin",function(){return r.invalidateActive()}))});var a=e.navigation().debounce;if(a){var l=Hs(a);this.zone.runOutsideAngular(function(){i.on("keydown",function(e){var t=r.keyDown(e);0<=t.indexOf("navigation")?l(function(){return n.zone.run(No)}):t.length&&n.zone.run(No)})})}else i.on("keydown",function(e){r.keyDown(e).length&&n.zone.run(No)})}},{key:"visibility",get:function(){return this.root.model.visibility()}}]),l}();Tf.decorators=[{type:u.Component,args:[{selector:"q-grid",providers:[ac,sc,cc,Sf,Qc,uc,hc],styles:["/* * *  Responsive attributes * *  References: *  1) https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties#flex *  2) https://css-tricks.com/almanac/properties/f/flex/ *  3) https://css-tricks.com/snippets/css/a-guide-to-flexbox/ *  4) https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items *  5) http://godban.com.ua/projects/flexgrid * * */ /* IE10-IE11 column-flex bug fix (set proper default value) */ /* Apply Mixins to create Layout/Flexbox styles */ .flex-order { order: 0; } .flex-order--20 { order: -20; } .flex-order--19 { order: -19; } .flex-order--18 { order: -18; } .flex-order--17 { order: -17; } .flex-order--16 { order: -16; } .flex-order--15 { order: -15; } .flex-order--14 { order: -14; } .flex-order--13 { order: -13; } .flex-order--12 { order: -12; } .flex-order--11 { order: -11; } .flex-order--10 { order: -10; } .flex-order--9 { order: -9; } .flex-order--8 { order: -8; } .flex-order--7 { order: -7; } .flex-order--6 { order: -6; } .flex-order--5 { order: -5; } .flex-order--4 { order: -4; } .flex-order--3 { order: -3; } .flex-order--2 { order: -2; } .flex-order--1 { order: -1; } .flex-order-0 { order: 0; } .flex-order-1 { order: 1; } .flex-order-2 { order: 2; } .flex-order-3 { order: 3; } .flex-order-4 { order: 4; } .flex-order-5 { order: 5; } .flex-order-6 { order: 6; } .flex-order-7 { order: 7; } .flex-order-8 { order: 8; } .flex-order-9 { order: 9; } .flex-order-10 { order: 10; } .flex-order-11 { order: 11; } .flex-order-12 { order: 12; } .flex-order-13 { order: 13; } .flex-order-14 { order: 14; } .flex-order-15 { order: 15; } .flex-order-16 { order: 16; } .flex-order-17 { order: 17; } .flex-order-18 { order: 18; } .flex-order-19 { order: 19; } .flex-order-20 { order: 20; } .offset-0, .flex-offset-0 { margin-left: 0; } [dir=rtl] .offset-0, [dir=rtl] .flex-offset-0 { margin-left: auto; margin-right: 0; } .offset-5, .flex-offset-5 { margin-left: 5%; } [dir=rtl] .offset-5, [dir=rtl] .flex-offset-5 { margin-left: auto; margin-right: 5%; } .offset-10, .flex-offset-10 { margin-left: 10%; } [dir=rtl] .offset-10, [dir=rtl] .flex-offset-10 { margin-left: auto; margin-right: 10%; } .offset-15, .flex-offset-15 { margin-left: 15%; } [dir=rtl] .offset-15, [dir=rtl] .flex-offset-15 { margin-left: auto; margin-right: 15%; } .offset-20, .flex-offset-20 { margin-left: 20%; } [dir=rtl] .offset-20, [dir=rtl] .flex-offset-20 { margin-left: auto; margin-right: 20%; } .offset-25, .flex-offset-25 { margin-left: 25%; } [dir=rtl] .offset-25, [dir=rtl] .flex-offset-25 { margin-left: auto; margin-right: 25%; } .offset-30, .flex-offset-30 { margin-left: 30%; } [dir=rtl] .offset-30, [dir=rtl] .flex-offset-30 { margin-left: auto; margin-right: 30%; } .offset-35, .flex-offset-35 { margin-left: 35%; } [dir=rtl] .offset-35, [dir=rtl] .flex-offset-35 { margin-left: auto; margin-right: 35%; } .offset-40, .flex-offset-40 { margin-left: 40%; } [dir=rtl] .offset-40, [dir=rtl] .flex-offset-40 { margin-left: auto; margin-right: 40%; } .offset-45, .flex-offset-45 { margin-left: 45%; } [dir=rtl] .offset-45, [dir=rtl] .flex-offset-45 { margin-left: auto; margin-right: 45%; } .offset-50, .flex-offset-50 { margin-left: 50%; } [dir=rtl] .offset-50, [dir=rtl] .flex-offset-50 { margin-left: auto; margin-right: 50%; } .offset-55, .flex-offset-55 { margin-left: 55%; } [dir=rtl] .offset-55, [dir=rtl] .flex-offset-55 { margin-left: auto; margin-right: 55%; } .offset-60, .flex-offset-60 { margin-left: 60%; } [dir=rtl] .offset-60, [dir=rtl] .flex-offset-60 { margin-left: auto; margin-right: 60%; } .offset-65, .flex-offset-65 { margin-left: 65%; } [dir=rtl] .offset-65, [dir=rtl] .flex-offset-65 { margin-left: auto; margin-right: 65%; } .offset-70, .flex-offset-70 { margin-left: 70%; } [dir=rtl] .offset-70, [dir=rtl] .flex-offset-70 { margin-left: auto; margin-right: 70%; } .offset-75, .flex-offset-75 { margin-left: 75%; } [dir=rtl] .offset-75, [dir=rtl] .flex-offset-75 { margin-left: auto; margin-right: 75%; } .offset-80, .flex-offset-80 { margin-left: 80%; } [dir=rtl] .offset-80, [dir=rtl] .flex-offset-80 { margin-left: auto; margin-right: 80%; } .offset-85, .flex-offset-85 { margin-left: 85%; } [dir=rtl] .offset-85, [dir=rtl] .flex-offset-85 { margin-left: auto; margin-right: 85%; } .offset-90, .flex-offset-90 { margin-left: 90%; } [dir=rtl] .offset-90, [dir=rtl] .flex-offset-90 { margin-left: auto; margin-right: 90%; } .offset-95, .flex-offset-95 { margin-left: 95%; } [dir=rtl] .offset-95, [dir=rtl] .flex-offset-95 { margin-left: auto; margin-right: 95%; } .offset-33, .flex-offset-33 { margin-left: calc(100% / 3); } .offset-66, .flex-offset-66 { margin-left: calc(200% / 3); } [dir=rtl] .offset-66, [dir=rtl] .flex-offset-66 { margin-left: auto; margin-right: calc(200% / 3); } .layout-align, .layout-align-start-stretch { justify-content: flex-start; align-content: stretch; align-items: stretch; } .layout-align-start, .layout-align-start-start, .layout-align-start-center, .layout-align-start-end, .layout-align-start-stretch { justify-content: flex-start; } .layout-align-center, .layout-align-center-start, .layout-align-center-center, .layout-align-center-end, .layout-align-center-stretch { justify-content: center; } .layout-align-end, .layout-align-end-start, .layout-align-end-center, .layout-align-end-end, .layout-align-end-stretch { justify-content: flex-end; } .layout-align-space-around, .layout-align-space-around-center, .layout-align-space-around-start, .layout-align-space-around-end, .layout-align-space-around-stretch { justify-content: space-around; } .layout-align-space-between, .layout-align-space-between-center, .layout-align-space-between-start, .layout-align-space-between-end, .layout-align-space-between-stretch { justify-content: space-between; } .layout-align-start-start, .layout-align-center-start, .layout-align-end-start, .layout-align-space-between-start, .layout-align-space-around-start { align-items: flex-start; align-content: flex-start; } .layout-align-start-center, .layout-align-center-center, .layout-align-end-center, .layout-align-space-between-center, .layout-align-space-around-center { align-items: center; align-content: center; max-width: 100%; } .layout-align-start-center > *, .layout-align-center-center > *, .layout-align-end-center > *, .layout-align-space-between-center > *, .layout-align-space-around-center > * { max-width: 100%; box-sizing: border-box; } .layout-align-start-end, .layout-align-center-end, .layout-align-end-end, .layout-align-space-between-end, .layout-align-space-around-end { align-items: flex-end; align-content: flex-end; } .layout-align-start-stretch, .layout-align-center-stretch, .layout-align-end-stretch, .layout-align-space-between-stretch, .layout-align-space-around-stretch { align-items: stretch; align-content: stretch; } .flex { flex: 1; box-sizing: border-box; } .flex-grow { flex: 1 1 100%; box-sizing: border-box; } .flex-initial { flex: 0 1 auto; box-sizing: border-box; } .flex-auto { flex: 1 1 auto; box-sizing: border-box; } .flex-none { flex: 0 0 auto; box-sizing: border-box; } .flex-noshrink { flex: 1 0 auto; box-sizing: border-box; } .flex-nogrow { flex: 0 1 auto; box-sizing: border-box; } .flex-0 { flex: 1 1 0%; max-width: 0%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-0 { flex: 1 1 0%; max-width: 0%; max-height: 100%; box-sizing: border-box; min-width: 0; } .layout-column > .flex-0 { flex: 1 1 0%; max-width: 100%; max-height: 0%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-0 { flex: 1 1 0%; max-width: 0%; max-height: 100%; box-sizing: border-box; min-width: 0; } .layout-column > .flex-0 { flex: 1 1 0%; max-width: 100%; max-height: 0%; box-sizing: border-box; min-height: 0; } .flex-5 { flex: 1 1 5%; max-width: 5%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-5 { flex: 1 1 5%; max-width: 5%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-5 { flex: 1 1 5%; max-width: 100%; max-height: 5%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-5 { flex: 1 1 5%; max-width: 5%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-5 { flex: 1 1 5%; max-width: 100%; max-height: 5%; box-sizing: border-box; } .flex-10 { flex: 1 1 10%; max-width: 10%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-10 { flex: 1 1 10%; max-width: 10%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-10 { flex: 1 1 10%; max-width: 100%; max-height: 10%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-10 { flex: 1 1 10%; max-width: 10%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-10 { flex: 1 1 10%; max-width: 100%; max-height: 10%; box-sizing: border-box; } .flex-15 { flex: 1 1 15%; max-width: 15%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-15 { flex: 1 1 15%; max-width: 15%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-15 { flex: 1 1 15%; max-width: 100%; max-height: 15%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-15 { flex: 1 1 15%; max-width: 15%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-15 { flex: 1 1 15%; max-width: 100%; max-height: 15%; box-sizing: border-box; } .flex-20 { flex: 1 1 20%; max-width: 20%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-20 { flex: 1 1 20%; max-width: 20%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-20 { flex: 1 1 20%; max-width: 100%; max-height: 20%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-20 { flex: 1 1 20%; max-width: 20%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-20 { flex: 1 1 20%; max-width: 100%; max-height: 20%; box-sizing: border-box; } .flex-25 { flex: 1 1 25%; max-width: 25%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-25 { flex: 1 1 25%; max-width: 25%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-25 { flex: 1 1 25%; max-width: 100%; max-height: 25%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-25 { flex: 1 1 25%; max-width: 25%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-25 { flex: 1 1 25%; max-width: 100%; max-height: 25%; box-sizing: border-box; } .flex-30 { flex: 1 1 30%; max-width: 30%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-30 { flex: 1 1 30%; max-width: 30%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-30 { flex: 1 1 30%; max-width: 100%; max-height: 30%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-30 { flex: 1 1 30%; max-width: 30%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-30 { flex: 1 1 30%; max-width: 100%; max-height: 30%; box-sizing: border-box; } .flex-35 { flex: 1 1 35%; max-width: 35%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-35 { flex: 1 1 35%; max-width: 35%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-35 { flex: 1 1 35%; max-width: 100%; max-height: 35%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-35 { flex: 1 1 35%; max-width: 35%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-35 { flex: 1 1 35%; max-width: 100%; max-height: 35%; box-sizing: border-box; } .flex-40 { flex: 1 1 40%; max-width: 40%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-40 { flex: 1 1 40%; max-width: 40%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-40 { flex: 1 1 40%; max-width: 100%; max-height: 40%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-40 { flex: 1 1 40%; max-width: 40%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-40 { flex: 1 1 40%; max-width: 100%; max-height: 40%; box-sizing: border-box; } .flex-45 { flex: 1 1 45%; max-width: 45%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-45 { flex: 1 1 45%; max-width: 45%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-45 { flex: 1 1 45%; max-width: 100%; max-height: 45%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-45 { flex: 1 1 45%; max-width: 45%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-45 { flex: 1 1 45%; max-width: 100%; max-height: 45%; box-sizing: border-box; } .flex-50 { flex: 1 1 50%; max-width: 50%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-50 { flex: 1 1 50%; max-width: 50%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-50 { flex: 1 1 50%; max-width: 100%; max-height: 50%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-50 { flex: 1 1 50%; max-width: 50%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-50 { flex: 1 1 50%; max-width: 100%; max-height: 50%; box-sizing: border-box; } .flex-55 { flex: 1 1 55%; max-width: 55%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-55 { flex: 1 1 55%; max-width: 55%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-55 { flex: 1 1 55%; max-width: 100%; max-height: 55%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-55 { flex: 1 1 55%; max-width: 55%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-55 { flex: 1 1 55%; max-width: 100%; max-height: 55%; box-sizing: border-box; } .flex-60 { flex: 1 1 60%; max-width: 60%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-60 { flex: 1 1 60%; max-width: 60%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-60 { flex: 1 1 60%; max-width: 100%; max-height: 60%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-60 { flex: 1 1 60%; max-width: 60%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-60 { flex: 1 1 60%; max-width: 100%; max-height: 60%; box-sizing: border-box; } .flex-65 { flex: 1 1 65%; max-width: 65%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-65 { flex: 1 1 65%; max-width: 65%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-65 { flex: 1 1 65%; max-width: 100%; max-height: 65%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-65 { flex: 1 1 65%; max-width: 65%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-65 { flex: 1 1 65%; max-width: 100%; max-height: 65%; box-sizing: border-box; } .flex-70 { flex: 1 1 70%; max-width: 70%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-70 { flex: 1 1 70%; max-width: 70%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-70 { flex: 1 1 70%; max-width: 100%; max-height: 70%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-70 { flex: 1 1 70%; max-width: 70%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-70 { flex: 1 1 70%; max-width: 100%; max-height: 70%; box-sizing: border-box; } .flex-75 { flex: 1 1 75%; max-width: 75%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-75 { flex: 1 1 75%; max-width: 75%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-75 { flex: 1 1 75%; max-width: 100%; max-height: 75%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-75 { flex: 1 1 75%; max-width: 75%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-75 { flex: 1 1 75%; max-width: 100%; max-height: 75%; box-sizing: border-box; } .flex-80 { flex: 1 1 80%; max-width: 80%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-80 { flex: 1 1 80%; max-width: 80%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-80 { flex: 1 1 80%; max-width: 100%; max-height: 80%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-80 { flex: 1 1 80%; max-width: 80%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-80 { flex: 1 1 80%; max-width: 100%; max-height: 80%; box-sizing: border-box; } .flex-85 { flex: 1 1 85%; max-width: 85%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-85 { flex: 1 1 85%; max-width: 85%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-85 { flex: 1 1 85%; max-width: 100%; max-height: 85%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-85 { flex: 1 1 85%; max-width: 85%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-85 { flex: 1 1 85%; max-width: 100%; max-height: 85%; box-sizing: border-box; } .flex-90 { flex: 1 1 90%; max-width: 90%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-90 { flex: 1 1 90%; max-width: 90%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-90 { flex: 1 1 90%; max-width: 100%; max-height: 90%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-90 { flex: 1 1 90%; max-width: 90%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-90 { flex: 1 1 90%; max-width: 100%; max-height: 90%; box-sizing: border-box; } .flex-95 { flex: 1 1 95%; max-width: 95%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-95 { flex: 1 1 95%; max-width: 95%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-95 { flex: 1 1 95%; max-width: 100%; max-height: 95%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-95 { flex: 1 1 95%; max-width: 95%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-95 { flex: 1 1 95%; max-width: 100%; max-height: 95%; box-sizing: border-box; } .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex { min-width: 0; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-column > .flex { min-height: 0; } .layout, .layout-column, .layout-row { box-sizing: border-box; display: -webkit-box; display: -webkit-flex; display: -moz-box; display: -ms-flexbox; display: flex; } .layout-column { flex-direction: column; } .layout-row { flex-direction: row; } .layout-padding-sm > *, .layout-padding > .flex-sm { padding: 4px; } .layout-padding, .layout-padding-gt-sm, .layout-padding-md, .layout-padding > *, .layout-padding-gt-sm > *, .layout-padding-md > *, .layout-padding > .flex, .layout-padding > .flex-gt-sm, .layout-padding > .flex-md { padding: 8px; } .layout-padding-gt-md > *, .layout-padding-lg > *, .layout-padding-gt-lg > *, .layout-padding > .flex-gt-md, .layout-padding > .flex-lg, .layout-padding > .flex-lg, .layout-padding > .flex-gt-lg { padding: 16px; } .layout-margin-sm > *, .layout-margin > .flex-sm { margin: 4px; } .layout-margin, .layout-margin-gt-sm, .layout-margin-md, .layout-margin > *, .layout-margin-gt-sm > *, .layout-margin-md > *, .layout-margin > .flex, .layout-margin > .flex-gt-sm, .layout-margin > .flex-md { margin: 8px; } .layout-margin-gt-md > *, .layout-margin-lg > *, .layout-margin-gt-lg > *, .layout-margin > .flex-gt-md, .layout-margin > .flex-lg, .layout-margin > .flex-gt-lg { margin: 16px; } .layout-wrap { flex-wrap: wrap; } .layout-nowrap { flex-wrap: nowrap; } .layout-fill { margin: 0; width: 100%; min-height: 100%; height: 100%; } /* Apply Mixins to create Layout/Flexbox styles */ .flex-order { order: 0; } .flex-order--20 { order: -20; } .flex-order--19 { order: -19; } .flex-order--18 { order: -18; } .flex-order--17 { order: -17; } .flex-order--16 { order: -16; } .flex-order--15 { order: -15; } .flex-order--14 { order: -14; } .flex-order--13 { order: -13; } .flex-order--12 { order: -12; } .flex-order--11 { order: -11; } .flex-order--10 { order: -10; } .flex-order--9 { order: -9; } .flex-order--8 { order: -8; } .flex-order--7 { order: -7; } .flex-order--6 { order: -6; } .flex-order--5 { order: -5; } .flex-order--4 { order: -4; } .flex-order--3 { order: -3; } .flex-order--2 { order: -2; } .flex-order--1 { order: -1; } .flex-order-0 { order: 0; } .flex-order-1 { order: 1; } .flex-order-2 { order: 2; } .flex-order-3 { order: 3; } .flex-order-4 { order: 4; } .flex-order-5 { order: 5; } .flex-order-6 { order: 6; } .flex-order-7 { order: 7; } .flex-order-8 { order: 8; } .flex-order-9 { order: 9; } .flex-order-10 { order: 10; } .flex-order-11 { order: 11; } .flex-order-12 { order: 12; } .flex-order-13 { order: 13; } .flex-order-14 { order: 14; } .flex-order-15 { order: 15; } .flex-order-16 { order: 16; } .flex-order-17 { order: 17; } .flex-order-18 { order: 18; } .flex-order-19 { order: 19; } .flex-order-20 { order: 20; } .offset-0, .flex-offset-0 { margin-left: 0; } [dir=rtl] .offset-0, [dir=rtl] .flex-offset-0 { margin-left: auto; margin-right: 0; } .offset-5, .flex-offset-5 { margin-left: 5%; } [dir=rtl] .offset-5, [dir=rtl] .flex-offset-5 { margin-left: auto; margin-right: 5%; } .offset-10, .flex-offset-10 { margin-left: 10%; } [dir=rtl] .offset-10, [dir=rtl] .flex-offset-10 { margin-left: auto; margin-right: 10%; } .offset-15, .flex-offset-15 { margin-left: 15%; } [dir=rtl] .offset-15, [dir=rtl] .flex-offset-15 { margin-left: auto; margin-right: 15%; } .offset-20, .flex-offset-20 { margin-left: 20%; } [dir=rtl] .offset-20, [dir=rtl] .flex-offset-20 { margin-left: auto; margin-right: 20%; } .offset-25, .flex-offset-25 { margin-left: 25%; } [dir=rtl] .offset-25, [dir=rtl] .flex-offset-25 { margin-left: auto; margin-right: 25%; } .offset-30, .flex-offset-30 { margin-left: 30%; } [dir=rtl] .offset-30, [dir=rtl] .flex-offset-30 { margin-left: auto; margin-right: 30%; } .offset-35, .flex-offset-35 { margin-left: 35%; } [dir=rtl] .offset-35, [dir=rtl] .flex-offset-35 { margin-left: auto; margin-right: 35%; } .offset-40, .flex-offset-40 { margin-left: 40%; } [dir=rtl] .offset-40, [dir=rtl] .flex-offset-40 { margin-left: auto; margin-right: 40%; } .offset-45, .flex-offset-45 { margin-left: 45%; } [dir=rtl] .offset-45, [dir=rtl] .flex-offset-45 { margin-left: auto; margin-right: 45%; } .offset-50, .flex-offset-50 { margin-left: 50%; } [dir=rtl] .offset-50, [dir=rtl] .flex-offset-50 { margin-left: auto; margin-right: 50%; } .offset-55, .flex-offset-55 { margin-left: 55%; } [dir=rtl] .offset-55, [dir=rtl] .flex-offset-55 { margin-left: auto; margin-right: 55%; } .offset-60, .flex-offset-60 { margin-left: 60%; } [dir=rtl] .offset-60, [dir=rtl] .flex-offset-60 { margin-left: auto; margin-right: 60%; } .offset-65, .flex-offset-65 { margin-left: 65%; } [dir=rtl] .offset-65, [dir=rtl] .flex-offset-65 { margin-left: auto; margin-right: 65%; } .offset-70, .flex-offset-70 { margin-left: 70%; } [dir=rtl] .offset-70, [dir=rtl] .flex-offset-70 { margin-left: auto; margin-right: 70%; } .offset-75, .flex-offset-75 { margin-left: 75%; } [dir=rtl] .offset-75, [dir=rtl] .flex-offset-75 { margin-left: auto; margin-right: 75%; } .offset-80, .flex-offset-80 { margin-left: 80%; } [dir=rtl] .offset-80, [dir=rtl] .flex-offset-80 { margin-left: auto; margin-right: 80%; } .offset-85, .flex-offset-85 { margin-left: 85%; } [dir=rtl] .offset-85, [dir=rtl] .flex-offset-85 { margin-left: auto; margin-right: 85%; } .offset-90, .flex-offset-90 { margin-left: 90%; } [dir=rtl] .offset-90, [dir=rtl] .flex-offset-90 { margin-left: auto; margin-right: 90%; } .offset-95, .flex-offset-95 { margin-left: 95%; } [dir=rtl] .offset-95, [dir=rtl] .flex-offset-95 { margin-left: auto; margin-right: 95%; } .offset-33, .flex-offset-33 { margin-left: calc(100% / 3); } .offset-66, .flex-offset-66 { margin-left: calc(200% / 3); } [dir=rtl] .offset-66, [dir=rtl] .flex-offset-66 { margin-left: auto; margin-right: calc(200% / 3); } .layout-align, .layout-align-start-stretch { justify-content: flex-start; align-content: stretch; align-items: stretch; } .layout-align-start, .layout-align-start-start, .layout-align-start-center, .layout-align-start-end, .layout-align-start-stretch { justify-content: flex-start; } .layout-align-center, .layout-align-center-start, .layout-align-center-center, .layout-align-center-end, .layout-align-center-stretch { justify-content: center; } .layout-align-end, .layout-align-end-start, .layout-align-end-center, .layout-align-end-end, .layout-align-end-stretch { justify-content: flex-end; } .layout-align-space-around, .layout-align-space-around-center, .layout-align-space-around-start, .layout-align-space-around-end, .layout-align-space-around-stretch { justify-content: space-around; } .layout-align-space-between, .layout-align-space-between-center, .layout-align-space-between-start, .layout-align-space-between-end, .layout-align-space-between-stretch { justify-content: space-between; } .layout-align-start-start, .layout-align-center-start, .layout-align-end-start, .layout-align-space-between-start, .layout-align-space-around-start { align-items: flex-start; align-content: flex-start; } .layout-align-start-center, .layout-align-center-center, .layout-align-end-center, .layout-align-space-between-center, .layout-align-space-around-center { align-items: center; align-content: center; max-width: 100%; } .layout-align-start-center > *, .layout-align-center-center > *, .layout-align-end-center > *, .layout-align-space-between-center > *, .layout-align-space-around-center > * { max-width: 100%; box-sizing: border-box; } .layout-align-start-end, .layout-align-center-end, .layout-align-end-end, .layout-align-space-between-end, .layout-align-space-around-end { align-items: flex-end; align-content: flex-end; } .layout-align-start-stretch, .layout-align-center-stretch, .layout-align-end-stretch, .layout-align-space-between-stretch, .layout-align-space-around-stretch { align-items: stretch; align-content: stretch; } .flex { flex: 1; box-sizing: border-box; } .flex-grow { flex: 1 1 100%; box-sizing: border-box; } .flex-initial { flex: 0 1 auto; box-sizing: border-box; } .flex-auto { flex: 1 1 auto; box-sizing: border-box; } .flex-none { flex: 0 0 auto; box-sizing: border-box; } .flex-noshrink { flex: 1 0 auto; box-sizing: border-box; } .flex-nogrow { flex: 0 1 auto; box-sizing: border-box; } .flex-0 { flex: 1 1 0%; max-width: 0%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-0 { flex: 1 1 0%; max-width: 0%; max-height: 100%; box-sizing: border-box; min-width: 0; } .layout-column > .flex-0 { flex: 1 1 0%; max-width: 100%; max-height: 0%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-0 { flex: 1 1 0%; max-width: 0%; max-height: 100%; box-sizing: border-box; min-width: 0; } .layout-column > .flex-0 { flex: 1 1 0%; max-width: 100%; max-height: 0%; box-sizing: border-box; min-height: 0; } .flex-5 { flex: 1 1 5%; max-width: 5%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-5 { flex: 1 1 5%; max-width: 5%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-5 { flex: 1 1 5%; max-width: 100%; max-height: 5%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-5 { flex: 1 1 5%; max-width: 5%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-5 { flex: 1 1 5%; max-width: 100%; max-height: 5%; box-sizing: border-box; } .flex-10 { flex: 1 1 10%; max-width: 10%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-10 { flex: 1 1 10%; max-width: 10%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-10 { flex: 1 1 10%; max-width: 100%; max-height: 10%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-10 { flex: 1 1 10%; max-width: 10%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-10 { flex: 1 1 10%; max-width: 100%; max-height: 10%; box-sizing: border-box; } .flex-15 { flex: 1 1 15%; max-width: 15%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-15 { flex: 1 1 15%; max-width: 15%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-15 { flex: 1 1 15%; max-width: 100%; max-height: 15%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-15 { flex: 1 1 15%; max-width: 15%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-15 { flex: 1 1 15%; max-width: 100%; max-height: 15%; box-sizing: border-box; } .flex-20 { flex: 1 1 20%; max-width: 20%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-20 { flex: 1 1 20%; max-width: 20%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-20 { flex: 1 1 20%; max-width: 100%; max-height: 20%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-20 { flex: 1 1 20%; max-width: 20%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-20 { flex: 1 1 20%; max-width: 100%; max-height: 20%; box-sizing: border-box; } .flex-25 { flex: 1 1 25%; max-width: 25%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-25 { flex: 1 1 25%; max-width: 25%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-25 { flex: 1 1 25%; max-width: 100%; max-height: 25%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-25 { flex: 1 1 25%; max-width: 25%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-25 { flex: 1 1 25%; max-width: 100%; max-height: 25%; box-sizing: border-box; } .flex-30 { flex: 1 1 30%; max-width: 30%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-30 { flex: 1 1 30%; max-width: 30%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-30 { flex: 1 1 30%; max-width: 100%; max-height: 30%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-30 { flex: 1 1 30%; max-width: 30%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-30 { flex: 1 1 30%; max-width: 100%; max-height: 30%; box-sizing: border-box; } .flex-35 { flex: 1 1 35%; max-width: 35%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-35 { flex: 1 1 35%; max-width: 35%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-35 { flex: 1 1 35%; max-width: 100%; max-height: 35%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-35 { flex: 1 1 35%; max-width: 35%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-35 { flex: 1 1 35%; max-width: 100%; max-height: 35%; box-sizing: border-box; } .flex-40 { flex: 1 1 40%; max-width: 40%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-40 { flex: 1 1 40%; max-width: 40%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-40 { flex: 1 1 40%; max-width: 100%; max-height: 40%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-40 { flex: 1 1 40%; max-width: 40%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-40 { flex: 1 1 40%; max-width: 100%; max-height: 40%; box-sizing: border-box; } .flex-45 { flex: 1 1 45%; max-width: 45%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-45 { flex: 1 1 45%; max-width: 45%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-45 { flex: 1 1 45%; max-width: 100%; max-height: 45%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-45 { flex: 1 1 45%; max-width: 45%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-45 { flex: 1 1 45%; max-width: 100%; max-height: 45%; box-sizing: border-box; } .flex-50 { flex: 1 1 50%; max-width: 50%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-50 { flex: 1 1 50%; max-width: 50%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-50 { flex: 1 1 50%; max-width: 100%; max-height: 50%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-50 { flex: 1 1 50%; max-width: 50%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-50 { flex: 1 1 50%; max-width: 100%; max-height: 50%; box-sizing: border-box; } .flex-55 { flex: 1 1 55%; max-width: 55%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-55 { flex: 1 1 55%; max-width: 55%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-55 { flex: 1 1 55%; max-width: 100%; max-height: 55%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-55 { flex: 1 1 55%; max-width: 55%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-55 { flex: 1 1 55%; max-width: 100%; max-height: 55%; box-sizing: border-box; } .flex-60 { flex: 1 1 60%; max-width: 60%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-60 { flex: 1 1 60%; max-width: 60%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-60 { flex: 1 1 60%; max-width: 100%; max-height: 60%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-60 { flex: 1 1 60%; max-width: 60%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-60 { flex: 1 1 60%; max-width: 100%; max-height: 60%; box-sizing: border-box; } .flex-65 { flex: 1 1 65%; max-width: 65%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-65 { flex: 1 1 65%; max-width: 65%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-65 { flex: 1 1 65%; max-width: 100%; max-height: 65%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-65 { flex: 1 1 65%; max-width: 65%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-65 { flex: 1 1 65%; max-width: 100%; max-height: 65%; box-sizing: border-box; } .flex-70 { flex: 1 1 70%; max-width: 70%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-70 { flex: 1 1 70%; max-width: 70%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-70 { flex: 1 1 70%; max-width: 100%; max-height: 70%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-70 { flex: 1 1 70%; max-width: 70%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-70 { flex: 1 1 70%; max-width: 100%; max-height: 70%; box-sizing: border-box; } .flex-75 { flex: 1 1 75%; max-width: 75%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-75 { flex: 1 1 75%; max-width: 75%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-75 { flex: 1 1 75%; max-width: 100%; max-height: 75%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-75 { flex: 1 1 75%; max-width: 75%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-75 { flex: 1 1 75%; max-width: 100%; max-height: 75%; box-sizing: border-box; } .flex-80 { flex: 1 1 80%; max-width: 80%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-80 { flex: 1 1 80%; max-width: 80%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-80 { flex: 1 1 80%; max-width: 100%; max-height: 80%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-80 { flex: 1 1 80%; max-width: 80%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-80 { flex: 1 1 80%; max-width: 100%; max-height: 80%; box-sizing: border-box; } .flex-85 { flex: 1 1 85%; max-width: 85%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-85 { flex: 1 1 85%; max-width: 85%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-85 { flex: 1 1 85%; max-width: 100%; max-height: 85%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-85 { flex: 1 1 85%; max-width: 85%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-85 { flex: 1 1 85%; max-width: 100%; max-height: 85%; box-sizing: border-box; } .flex-90 { flex: 1 1 90%; max-width: 90%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-90 { flex: 1 1 90%; max-width: 90%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-90 { flex: 1 1 90%; max-width: 100%; max-height: 90%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-90 { flex: 1 1 90%; max-width: 90%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-90 { flex: 1 1 90%; max-width: 100%; max-height: 90%; box-sizing: border-box; } .flex-95 { flex: 1 1 95%; max-width: 95%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-95 { flex: 1 1 95%; max-width: 95%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-95 { flex: 1 1 95%; max-width: 100%; max-height: 95%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-95 { flex: 1 1 95%; max-width: 95%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-95 { flex: 1 1 95%; max-width: 100%; max-height: 95%; box-sizing: border-box; } .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-row > .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-column > .flex-100 { flex: 1 1 100%; max-width: 100%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-33, .layout-row > .flex-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex-66, .layout-row > .flex-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; } .layout-row > .flex { min-width: 0; } .layout-column > .flex-33, .layout-column > .flex-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; } .layout-column > .flex-66, .layout-column > .flex-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; } .layout-column > .flex { min-height: 0; } .layout, .layout-column, .layout-row { box-sizing: border-box; display: -webkit-box; display: -webkit-flex; display: -moz-box; display: -ms-flexbox; display: flex; } .layout-column { flex-direction: column; } .layout-row { flex-direction: row; } .layout-padding-sm > *, .layout-padding > .flex-sm { padding: 4px; } .layout-padding, .layout-padding-gt-sm, .layout-padding-md, .layout-padding > *, .layout-padding-gt-sm > *, .layout-padding-md > *, .layout-padding > .flex, .layout-padding > .flex-gt-sm, .layout-padding > .flex-md { padding: 8px; } .layout-padding-gt-md > *, .layout-padding-lg > *, .layout-padding-gt-lg > *, .layout-padding > .flex-gt-md, .layout-padding > .flex-lg, .layout-padding > .flex-lg, .layout-padding > .flex-gt-lg { padding: 16px; } .layout-margin-sm > *, .layout-margin > .flex-sm { margin: 4px; } .layout-margin, .layout-margin-gt-sm, .layout-margin-md, .layout-margin > *, .layout-margin-gt-sm > *, .layout-margin-md > *, .layout-margin > .flex, .layout-margin > .flex-gt-sm, .layout-margin > .flex-md { margin: 8px; } .layout-margin-gt-md > *, .layout-margin-lg > *, .layout-margin-gt-lg > *, .layout-margin > .flex-gt-md, .layout-margin > .flex-lg, .layout-margin > .flex-gt-lg { margin: 16px; } .layout-wrap { flex-wrap: wrap; } .layout-nowrap { flex-wrap: nowrap; } .layout-fill { margin: 0; width: 100%; min-height: 100%; height: 100%; } .q-grid tbody tr.q-grid-scroll-mark { height: 0; border: none; } .q-grid ::-webkit-scrollbar { width: 8px; height: 8px; } .q-grid ::-webkit-scrollbar-thumb { height: 15px; background-color: #c8c8c8; -webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.07); } .q-grid ::-webkit-scrollbar-button { width: 0; height: 0; display: none; } .q-grid ::-webkit-scrollbar-corner { background-color: transparent; } .q-grid ::-webkit-scrollbar-track, .q-grid ::-webkit-scrollbar-track-piece { background-color: #f8f8f8; } .q-grid.q-grid-box { height: 100%; min-height: 100%; max-height: 100%; transform: translate3d(0, 0, 0); } .q-grid td, .q-grid th { vertical-align: middle; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; } .q-grid td > *, .q-grid th > * { vertical-align: middle; } .q-grid td.q-grid-pivot, .q-grid th.q-grid-pivot { text-align: center; } .q-grid.q-grid-box:not(.q-grid-drag) td, .q-grid.q-grid-box:not(.q-grid-drag) th { transition: min-width 0.3s, width 0.3s, max-width 0.3s; } .q-grid td .q-grid-box td, .q-grid td .q-grid-box th { transition: none !important; } .q-grid td .q-grid-box:not(.q-grid-drag) td, .q-grid td .q-grid-box:not(.q-grid-drag) th { transition: min-width 0.3s, width 0.3s, max-width 0.3s !important; } .q-grid thead th > div { overflow: hidden; text-overflow: ellipsis; outline: none; } .q-grid thead td, .q-grid thead th, .q-grid tfoot td, .q-grid tfoot th, .q-grid tbody td, .q-grid tbody th { width: 150px; min-width: 150px; max-width: 150px; } .q-grid thead td.q-grid-pad, .q-grid thead th.q-grid-pad, .q-grid tfoot td.q-grid-pad, .q-grid tfoot th.q-grid-pad, .q-grid tbody td.q-grid-pad, .q-grid tbody th.q-grid-pad { width: 100%; min-width: 100%; max-width: 100%; padding: 0 0 0 1px !important; margin: 0 !important; } .q-grid thead td.q-grid-group, .q-grid thead th.q-grid-group, .q-grid tfoot td.q-grid-group, .q-grid tfoot th.q-grid-group, .q-grid tbody td.q-grid-group, .q-grid tbody th.q-grid-group { width: 200px; min-width: 200px; max-width: 200px; } .q-grid thead td.q-grid-pivot, .q-grid thead th.q-grid-pivot, .q-grid tfoot td.q-grid-pivot, .q-grid tfoot th.q-grid-pivot, .q-grid tbody td.q-grid-pivot, .q-grid tbody th.q-grid-pivot { width: 80px; min-width: 80px; max-width: 80px; } .q-grid thead td.q-grid-email, .q-grid thead th.q-grid-email, .q-grid tfoot td.q-grid-email, .q-grid tfoot th.q-grid-email, .q-grid tbody td.q-grid-email, .q-grid tbody th.q-grid-email { width: 200px; min-width: 200px; max-width: 200px; } .q-grid thead td.q-grid-password, .q-grid thead th.q-grid-password, .q-grid tfoot td.q-grid-password, .q-grid tfoot th.q-grid-password, .q-grid tbody td.q-grid-password, .q-grid tbody th.q-grid-password { width: 100px; min-width: 100px; max-width: 100px; } .q-grid thead td.q-grid-bool, .q-grid thead th.q-grid-bool, .q-grid tfoot td.q-grid-bool, .q-grid tfoot th.q-grid-bool, .q-grid tbody td.q-grid-bool, .q-grid tbody th.q-grid-bool { width: 80px; min-width: 80px; max-width: 80px; } .q-grid thead td.q-grid-date, .q-grid thead th.q-grid-date, .q-grid tfoot td.q-grid-date, .q-grid tfoot th.q-grid-date, .q-grid tbody td.q-grid-date, .q-grid tbody th.q-grid-date { width: 120px; min-width: 110px; max-width: 110px; } .q-grid thead td.q-grid-number, .q-grid thead td.q-grid-currency, .q-grid thead td.q-grid-id, .q-grid thead th.q-grid-number, .q-grid thead th.q-grid-currency, .q-grid thead th.q-grid-id, .q-grid tfoot td.q-grid-number, .q-grid tfoot td.q-grid-currency, .q-grid tfoot td.q-grid-id, .q-grid tfoot th.q-grid-number, .q-grid tfoot th.q-grid-currency, .q-grid tfoot th.q-grid-id, .q-grid tbody td.q-grid-number, .q-grid tbody td.q-grid-currency, .q-grid tbody td.q-grid-id, .q-grid tbody th.q-grid-number, .q-grid tbody th.q-grid-currency, .q-grid tbody th.q-grid-id { width: 100px; min-width: 100px; max-width: 100px; } .q-grid thead td.q-grid-array, .q-grid thead th.q-grid-array, .q-grid tfoot td.q-grid-array, .q-grid tfoot th.q-grid-array, .q-grid tbody td.q-grid-array, .q-grid tbody th.q-grid-array { width: 250px; min-width: 250px; max-width: 250px; } .q-grid thead td.q-grid-row-indicator, .q-grid thead th.q-grid-row-indicator, .q-grid tfoot td.q-grid-row-indicator, .q-grid tfoot th.q-grid-row-indicator, .q-grid tbody td.q-grid-row-indicator, .q-grid tbody th.q-grid-row-indicator { width: 24px; min-width: 24px; max-width: 24px; text-overflow: initial; } .q-grid thead td.q-grid-row-options, .q-grid thead th.q-grid-row-options, .q-grid tfoot td.q-grid-row-options, .q-grid tfoot th.q-grid-row-options, .q-grid tbody td.q-grid-row-options, .q-grid tbody th.q-grid-row-options { width: 48px; min-width: 48px; max-width: 48px; text-overflow: initial; } .q-grid thead td.q-grid-row-expand, .q-grid thead th.q-grid-row-expand, .q-grid tfoot td.q-grid-row-expand, .q-grid tfoot th.q-grid-row-expand, .q-grid tbody td.q-grid-row-expand, .q-grid tbody th.q-grid-row-expand { width: 48px; min-width: 48px; max-width: 48px; } .q-grid thead td.q-grid-row-number, .q-grid thead th.q-grid-row-number, .q-grid tfoot td.q-grid-row-number, .q-grid tfoot th.q-grid-row-number, .q-grid tbody td.q-grid-row-number, .q-grid tbody th.q-grid-row-number { width: 56px; min-width: 56px; max-width: 56px; } .q-grid thead td.q-grid-select, .q-grid thead th.q-grid-select, .q-grid tfoot td.q-grid-select, .q-grid tfoot th.q-grid-select, .q-grid tbody td.q-grid-select, .q-grid tbody th.q-grid-select { width: 56px; min-width: 56px; max-width: 56px; text-overflow: initial; } .q-grid thead td.q-grid-image, .q-grid thead th.q-grid-image, .q-grid tfoot td.q-grid-image, .q-grid tfoot th.q-grid-image, .q-grid tbody td.q-grid-image, .q-grid tbody th.q-grid-image { width: 80px; min-width: 80px; max-width: 80px; } .q-grid tbody td.q-grid-number, .q-grid tbody td.q-grid-currency, .q-grid tfoot td.q-grid-number, .q-grid tfoot td.q-grid-currency { text-align: right; } .q-grid tbody td.q-grid-id, .q-grid tfoot td.q-grid-id { text-align: left; } .q-grid tbody td.q-grid-bool, .q-grid tbody td.q-grid-password, .q-grid tbody td.q-grid-select, .q-grid tfoot td.q-grid-bool, .q-grid tfoot td.q-grid-password, .q-grid tfoot td.q-grid-select { text-align: center; } .q-grid tbody td.q-grid-dropdown select, .q-grid tfoot td.q-grid-dropdown select { width: 100%; } .q-grid tbody td.q-grid-row-options, .q-grid tfoot td.q-grid-row-options { cursor: pointer; } .q-grid-can-drag { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -khtml-user-drag: element; -webkit-user-drag: element; } .q-grid.q-grid-box .q-grid-row-indicator .q-grid-can-drag { cursor: move; opacity: 0.4; } .q-grid.q-grid-box .q-grid-row-indicator .q-grid-can-drag .q-grid-icon { width: 16px; min-width: 16px; min-height: 16px; height: 16px; font-size: 16px; vertical-align: middle; } .q-grid tr.q-grid-drag { opacity: 0.5; } .q-grid td.q-grid-drag, .q-grid th.q-grid-drag { opacity: 0.5; } .q-grid.q-grid-box:not(.q-grid-drag) td.q-grid-focused { outline: 2px solid rgba(63, 81, 181, 0.25); outline-offset: -2px; } .q-grid.q-grid-box:not(.q-grid-drag) td.q-grid-focused.q-grid-animate { outline: none; } .q-grid .q-grid-view:not(.q-grid-active) td.q-grid-focused { outline-color: rgba(63, 81, 181, 0.05); } .q-grid .q-grid-cell-handler { transition: all 0.15s; position: absolute; pointer-events: none; outline: 2px solid rgba(63, 81, 181, 0.25); outline-offset: -2px; display: none; } .q-grid .q-grid-cell-handler.q-grid-active { display: block; } .q-grid .q-grid-marker { display: block; position: absolute; width: 10px; height: 10px; bottom: 5px; right: 5px; font-size: 14px; color: #C8C8C8; cursor: move; } .q-grid .q-grid-view .q-grid-layer { position: absolute; width: 100%; height: 100%; } .q-grid .q-grid-view .q-grid-layer:empty { pointer-events: none; } .q-grid th > .q-grid-resize-handler { top: 20%; bottom: 20%; right: 0; height: 60%; width: 4px; z-index: 2; background: transparent; position: absolute; border-right: 1px solid #e0e0e0; cursor: col-resize; opacity: 0; } .q-grid th.q-grid-highlighted .q-grid-resize-handler, .q-grid th.q-grid-highlighted-prev .q-grid-resize-handler { opacity: 1; } .q-grid td > .q-grid-can-drag > .q-grid-resize-handler { height: 2px; width: 100%; bottom: 0; left: 0; width: 100vh; position: absolute; cursor: row-resize; z-index: 2; pointer-events: all; } .q-grid.q-grid-box.q-grid-drag th > .q-grid-resize-handler { opacity: 0; } .q-grid .q-grid-table tbody, .q-grid .q-grid-table thead, .q-grid .q-grid-table tfoot { border-collapse: collapse; border-spacing: 0; } .q-grid .q-grid-table table { border-spacing: 0; overflow: hidden; table-layout: fixed; display: flex; flex-flow: column; height: 100%; width: 100%; outline: none; } .q-grid .q-grid-table table thead, .q-grid .q-grid-table table tfoot { /* head takes the height it requires, and it's not scaled when table is resized */ flex: 0 0 auto; width: calc(100% - 8px); overflow: hidden; } .q-grid .q-grid-table table tbody { /* body takes all the remaining available space */ flex: 1 1 auto; display: block; overflow-y: scroll; overflow-x: scroll; outline: none; overflow-anchor: none; } .q-grid .q-grid-table table tbody.q-grid-body-top { flex: none; overflow-x: hidden; } .q-grid .q-grid-table table tbody.q-grid-body-bottom { flex: none; } .q-grid .q-grid-table table tbody tr { width: 100%; display: table-row; table-layout: fixed; } .q-grid .q-grid-table table tbody tr.q-grid-align { height: 0 !important; border: 0; } .q-grid .q-grid-table table tbody tr.q-grid-align:last-child { display: initial; } .q-grid .q-grid-table.q-grid-table-left thead, .q-grid .q-grid-table.q-grid-table-left tfoot { width: 100%; } .q-grid .q-grid-with-right-pin > .q-grid-view > .q-grid-table.q-grid-table-center > table > thead, .q-grid .q-grid-with-right-pin > .q-grid-view > .q-grid-table.q-grid-table-center > table > tfoot { width: 100%; } .q-grid .q-grid-toolbar-left, .q-grid .q-grid-toolbar-right { max-width: 250px; overflow: auto; } .q-grid .q-grid-view { position: relative; overflow: hidden; } .q-grid .q-grid-view.q-grid-select-range thead td, .q-grid .q-grid-view.q-grid-select-range thead th, .q-grid .q-grid-view.q-grid-select-range tfoot td, .q-grid .q-grid-view.q-grid-select-range tfoot th, .q-grid .q-grid-view.q-grid-select-range tbody td, .q-grid .q-grid-view.q-grid-select-range tbody th { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; } .q-grid .q-grid-view > .q-grid-table-left > table > tbody { overflow-y: hidden; } .q-grid .q-grid-with-right-pin > .q-grid-view > .q-grid-table-center > table > tbody { overflow-y: hidden; } .q-grid .q-grid-with-bottom-pin > .q-grid-view > .q-grid-table-center > table > tbody:not(.q-grid-body-bottom) { overflow-x: hidden; } "],template:'<ng-container *ngComponentOutlet="themeComponent"></ng-container> <q-grid-box class="q-grid-box layout-column" q-grid-markup="box"> <q-grid-core-toolbar position="top" class="q-grid-toolbar q-grid-toolbar-top flex-auto" *ngIf="visibility.toolbar.top"> </q-grid-core-toolbar> <div class="flex-100 layout-row" [ngClass]="{ \'q-grid-with-left-pin\': visibility.pin.left, \'q-grid-with-right-pin\': visibility.pin.right, \'q-grid-with-top-pin\': visibility.pin.top, \'q-grid-with-bottom-pin\': visibility.pin.bottom }"> <q-grid-core-toolbar position="left" class="q-grid-toolbar q-grid-toolbar-left flex-auto" *ngIf="visibility.toolbar.left"> </q-grid-core-toolbar> <q-grid-core-view class="q-grid-view layout-row flex" q-grid-markup="view"> </q-grid-core-view> <q-grid-core-toolbar position="right" class="q-grid-toolbar q-grid-toolbar-right flex-auto" *ngIf="visibility.toolbar.right"> </q-grid-core-toolbar> </div> <q-grid-core-toolbar position="bottom" class="q-grid-toolbar q-grid-toolbar-bottom flex-auto" *ngIf="visibility.toolbar.bottom"> </q-grid-core-toolbar> </q-grid-box>',encapsulation:u.ViewEncapsulation.None}]}],Tf.ctorParameters=function(){return[{type:ac},{type:u.ElementRef},{type:u.NgZone},{type:hc},{type:void 0,decorators:[{type:u.Inject,args:[t.DOCUMENT]}]},{type:Xc}]},Tf.propDecorators={model:[{type:u.Input}],actionItems:[{type:u.Input,args:["actions"]}],gridTitle:[{type:u.Input,args:["header"]}],gridCaption:[{type:u.Input,args:["caption"]}],gridInteractionMode:[{type:u.Input,args:["interactionMode"]}],gridId:[{type:u.Input,args:["id"]}],dataColumns:[{type:u.Input,args:["columns"]}],dataPipe:[{type:u.Input,args:["pipe"]}],dataRows:[{type:u.Input,args:["rows"]}],editCancel:[{type:u.Input}],editCommit:[{type:u.Input}],editEnter:[{type:u.Input}],editMethod:[{type:u.Input}],editMode:[{type:u.Input}],editReset:[{type:u.Input}],filterFetch:[{type:u.Input}],filterUnit:[{type:u.Input}],groupBy:[{type:u.Input}],groupMode:[{type:u.Input}],groupSummary:[{type:u.Input}],pivotBy:[{type:u.Input}],selectionItems:[{type:u.Input,args:["selection"]}],selectionArea:[{type:u.Input}],selectionKey:[{type:u.Input}],selectionMode:[{type:u.Input}],selectionUnit:[{type:u.Input}],scrollMode:[{type:u.Input}],sortBy:[{type:u.Input}],sortMode:[{type:u.Input}],sortTrigger:[{type:u.Input}],styleCell:[{type:u.Input}],styleRow:[{type:u.Input}],selectionChanged:[{type:u.Output}]};var Df=function e(){g(this,e),this.key=$o};Df.decorators=[{type:u.Injectable}];var Nf=function(){function r(e,t,n){g(this,r),this.model=e,this.canCopy=t,this.parseFactory=n}return h(r,[{key:"generateKey",value:function(e){return sr(e.editor)?sr(e.type)?"$default":"$default."+e.type:"$default."+e.editor}},{key:"copy",value:function(l,u){var t=this.canCopy,s=this.parseFactory;Object.keys(u).filter(function(e){return t(e,u,l)}).forEach(function(e){var t=u[e],n=Yo(e),r=n(l),i=Ll(r),o=(Ll(t),t);if(null!==r&&!sr(r)){var a=s(i)(t,r);null!==a&&(o=a)}n(l,o)})}},{key:"add",value:function(e){var t=this.model.columnList;t({columns:t().columns.concat([e])},{source:"column.list.ctrl",behavior:"core"})}},{key:"register",value:function(e){var t=this.model.columnList,n=or(t().reference);n[e.type||"$default"]=e,t({reference:n},{source:"column.list.ctrl",behavior:"core"})}},{key:"extract",value:function(e,t){var n=this.model,r=Pl(n),i=su(n.columnList().line,e);return i?r(t,i):((i=r(t||"text").model).key=e,i.source="template"),i}},{key:"delete",value:function(e){var t=this.model,n=t.data,r=t.columnList,i=r().columns,o=cu(i,e);if(0<=o){var a=Array.from(i);a.splice(o,1),r({columns:a},{source:"column.list.ctrl",behavior:"core"})}var l=Array.from(n().columns),u=function e(t,n){for(var r=0,i=t.length;r<i;r++){var o=t[r];if(o.key===n)return{columns:t,index:r};var a=o.children;if(a.length){var l=e(a,n);if(l)return l}}return null}(l,e);u&&(u.columns.splice(u.index,1),n({columns:l},{source:"column.list.ctrl"}))}}]),r}(),Ff=function(){function t(e){g(this,t),this.root=e}return h(t,[{key:"add",value:function(e){this.ctrl.add(e)}},{key:"copy",value:function(e,t){this.ctrl.copy(e,t)}},{key:"generateKey",value:function(e){return this.ctrl.generateKey(e)}},{key:"extract",value:function(e,t){return this.ctrl.extract(e,t)}},{key:"register",value:function(e){this.ctrl.register(e)}},{key:"delete",value:function(e){this.ctrl.delete(e)}},{key:"ctrl",get:function(){if(this._ctrl)return this._ctrl;return this._ctrl=new Nf(this.root.model,function(e,t,n){return n.hasOwnProperty(e)&&!sr(t[e])},Al),this._ctrl}}]),t}();Ff.decorators=[{type:u.Injectable}],Ff.ctorParameters=function(){return[{type:ac}]};var Vf=function e(){g(this,e)};Vf.decorators=[{type:u.Injectable}];var $f=function(){function o(e,t,n,r,i){g(this,o),this.columnList=e,this.templateHost=t,this.parent=n,this.service=r,this.element=i}return h(o,[{key:"ngOnInit",value:function(){var n=this,r=!sr(this.key),i=!sr(this.type),e=this.element.nativeElement;e.children.length&&"Q-GRID-COLUMN"===e.children.item(0).tagName&&(this.type="cohort",r||(this.key="$cohort-"+(this.title||la())),i=r=!0),r||(this.key=this.columnList.generateKey(this));var o=this.columnList.extract(this.key,this.type);if(this.columnList.copy(o,this),this.templateHost.key=function(e){var t=[e,"cell"];return i&&t.push(n.type),r&&t.push("the-"+n.key),t.join("-")+".tpl.html"},r)this.parent?this.parent.column.children.push(o):this.columnList.add(o),this.service.column=o;else{var t=Object.keys(this).filter(function(e){return!sr(n[e])&&o.hasOwnProperty(e)}).reduce(function(e,t){return e[t]=o[t],e},{});this.columnList.register(t)}}},{key:"ngOnDestroy",value:function(){var e=this.service.column;e&&"template"===e.source&&this.columnList.delete(e.key)}}]),o}();$f.decorators=[{type:u.Component,args:[{selector:"q-grid-column",template:"<ng-content></ng-content>",providers:[Df,Vf],changeDetection:u.ChangeDetectionStrategy.OnPush}]}],$f.ctorParameters=function(){return[{type:Ff},{type:Df},{type:Vf,decorators:[{type:u.SkipSelf},{type:u.Optional}]},{type:Vf},{type:u.ElementRef}]},$f.propDecorators={type:[{type:u.Input}],key:[{type:u.Input}],class:[{type:u.Input}],title:[{type:u.Input}],pin:[{type:u.Input}],aggregation:[{type:u.Input}],aggregationOptions:[{type:u.Input}],editor:[{type:u.Input}],editorOptions:[{type:u.Input}],format:[{type:u.Input}],symbol:[{type:u.Input}],code:[{type:u.Input}],width:[{type:u.Input}],widthMode:[{type:u.Input}],minWidth:[{type:u.Input}],maxWidth:[{type:u.Input}],viewWidth:[{type:u.Input}],offset:[{type:u.Input}],canEdit:[{type:u.Input}],canResize:[{type:u.Input}],canSort:[{type:u.Input}],canMove:[{type:u.Input}],canFilter:[{type:u.Input}],canHighlight:[{type:u.Input}],canFocus:[{type:u.Input}],isVisible:[{type:u.Input}],index:[{type:u.Input}],label:[{type:u.Input}],labelPath:[{type:u.Input}],itemLabel:[{type:u.Input}],itemFormat:[{type:u.Input}],itemType:[{type:u.Input}],value:[{type:u.Input}],path:[{type:u.Input}],compare:[{type:u.Input}],trueValue:[{type:u.Input}],falseValue:[{type:u.Input}],maxLength:[{type:u.Input}]};var Bf=function(e){function n(e){g(this,n);var t=m(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.root=e,t.binder=new Ks(t),t.commit=No,t.models=[],t}return c(n,Ys),h(n,[{key:"setup",value:function(){return this.binder.bound(this.model,this.models,!1)}},{key:"ngOnInit",value:function(){this.commit=this.setup(),this.commit()}},{key:"ngOnChanges",value:function(e){this.commit()}},{key:"ngOnDestroy",value:function(){s(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ngOnDestroy",this).call(this),this.binder.dispose()}},{key:"model",get:function(){return this.root.model}}]),n}();var Uf=function(e){function n(e){g(this,n);var t=m(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.columnListGeneration=null,t.models=["columnList"],t}return c(n,Bf),n}();Uf.decorators=[{type:u.Component,args:[{selector:"q-grid-columns",template:"<ng-content></ng-content>",providers:[Ff],changeDetection:u.ChangeDetectionStrategy.OnPush}]}],Uf.ctorParameters=function(){return[{type:ac}]},Uf.propDecorators={columnListGeneration:[{type:u.Input,args:["generation"]}]};var Hf=function e(t,n){g(this,e),n.classList.add(_a),t.dragChanged.watch(function(e){e.hasChanges("isActive")&&(t.drag().isActive?n.classList.add(_a+"-drag"):n.classList.remove(_a+"-drag"))})},Wf=function(e){function i(e,t,n){g(this,i);var r=m(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return r.root=e,r.element=t,r.theme=n,r.boxModel=null,r}return c(i,Ys),h(i,[{key:"ngOnInit",value:function(){new Hf(this.model,this.element.nativeElement);this.initTheme()}},{key:"initTheme",value:function(){var t=this,n=this.element.nativeElement;this.using(this.theme.changed.watch(function(e){e&&n.classList.remove(_a+"-theme-"+e.oldValue),n.classList.add(_a+"-theme-"+t.theme.name)}))}},{key:"model",get:function(){var e=this.boxModel||this.root&&this.root.model;return ca.notNull(e,"model"),e}}]),i}();Wf.decorators=[{type:u.Component,args:[{selector:"q-grid-box",template:"<ng-content></ng-content>"}]}],Wf.ctorParameters=function(){return[{type:ac,decorators:[{type:u.Optional}]},{type:u.ElementRef},{type:Xc}]},Wf.propDecorators={boxModel:[{type:u.Input,args:["model"]}]};function Gf(e,t){return e.which===t}var Kf=_a+"-scroll-vertical",Yf=_a+"-scroll-horizontal",Zf=function(){function i(e,t,n,r){g(this,i),this.model=e,this.view=t,this.bag=r,this.table=n,this.rangeStartCell=null,this.scrollingJob=Hs(100)}return h(i,[{key:"onScroll",value:function(e){var t=this.model.scroll,n=t(),r={},i=!1;n.top!==e.scrollTop&&(this.table.view.addClass(Kf),r.top=e.scrollTop,i=!0),n.left!==e.scrollLeft&&(this.table.view.addClass(Yf),r.left=e.scrollLeft,i=!0),i&&t(r,{source:"body.core",behavior:"core"}),this.scrollingJob(this.onScrollEnd.bind(this))}},{key:"onScrollEnd",value:function(){this.table.view.removeClass(Kf),this.table.view.removeClass(Yf)}},{key:"onWheel",value:function(n){if(!n.shiftKey){var e=this.model,r=this.table;if("view"===e.edit().state){var i=e.scroll;qa.measure(function(){var e=r.view.scrollHeight()-r.view.height(),t=Math.min(e,Math.max(0,i().top+n.deltaY));i({top:t},{source:"body.core"})})}}}},{key:"onMouseDown",value:function(e){if(Gf(e,1)){var t=this.selection,n=t.area,r=t.mode;if("body"!==n)return;var i=new Hh(this.bag.body).cell(Yh(e));"range"===r&&(this.rangeStartCell=i,this.rangeStartCell&&this.view.selection.selectRange(this.rangeStartCell,null,"body"))}}},{key:"onMouseMove",value:function(e){var t=new Hh(this.bag.body),n=t.cell(Yh(e));if(n){var r=this.view.highlight,i=this.model.highlight(),o=i.rows,a=i.cell;a&&r.cell.execute(a,!1);var l={rowIndex:n.rowIndex,columnIndex:n.columnIndex};r.cell.canExecute(l)&&r.cell.execute(l,!0);var u=t.row(Yh(e));if(u){var s=u.index;r.row.canExecute(s)&&(o.filter(function(e){return e!==s}).forEach(function(e){return r.row.execute(e,!1)}),r.row.execute(s,!0))}}if("range"===this.selection.mode){var c=this.rangeStartCell,h=n;c&&h&&(this.navigate(h),this.view.selection.selectRange(c,h,"body"))}}},{key:"onMouseLeave",value:function(){var t=this.view.highlight,e=this.model.highlight(),n=e.rows,r=e.cell;n.forEach(function(e){return t.row.execute(e,!1)}),r&&t.cell.execute(null,!1)}},{key:"onMouseUp",value:function(e){var t=this.selection.mode,n=this.model.edit;if(Gf(e,1)){var r=new Hh(this.bag.body).cell(Yh(e));if("range"===t&&(this.rangeStartCell=null),"startBatch"===n().state)return void n({state:"endBatch"},{source:"body.ctrl"});if(r&&(this.select(r),this.navigate(r),this.view.edit.cell.enter.canExecute(r))){if(1<this.selection.items.length)return;this.view.edit.cell.enter.execute(r)}}}},{key:"select",value:function(e){var t=this.selection,n=t.area,r=t.mode,i=t.unit;if("select"===e.column.type||"body"===n&&"range"!==r){var o=this.model,a=o.edit().mode;switch(i){case"row":if("select"===e.column.type&&"focus"===e.column.editorOptions.trigger){var l=o.focus();l.rowIndex===e.rowIndex&&l.columnIndex===e.columnIndex||this.view.selection.toggleRow.execute(e.row,"body")}else a||"control"===e.column.class||this.view.selection.toggleRow.execute(e.row,"body");break;case"column":a||this.view.selection.toggleColumn.execute(e.column,"body");break;case"mix":"row-indicator"===e.column.type&&this.view.selection.toggleCell.execute(e,"body")}}}},{key:"navigate",value:function(e){var t=this.view.nav.focus;t.canExecute(e)&&t.execute(e)}},{key:"selection",get:function(){return this.model.selection()}}]),i}(),Jf=function e(){g(this,e)};Jf.decorators=[{type:u.Injectable}],Jf.ctorParameters=function(){return[]};var Qf=function(e){function l(e,t,n,r,i,o){g(this,l);var a=m(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return a.element=e,a.$view=t,a.$table=n,a.root=r,a.zone=i,a.cd=o,a.pin="body",a}return c(l,Ys),h(l,[{key:"ngOnInit",value:function(){var t=this,e=this.$view,n=this.element.nativeElement,r=this.root.model,i=this.$table,o=new Zf(r,e,this.root.table,this.root.bag),a=new Pf(n,new Af(this));this.zone.runOutsideAngular(function(){a.on("wheel",function(e){return o.onWheel(e)}),a.on("scroll",function(){return o.onScroll({scrollLeft:i.pin?r.scroll().left:n.scrollLeft,scrollTop:n.scrollTop})},{passive:!0}),a.on("mousemove",o.onMouseMove.bind(o)),a.on("mouseleave",o.onMouseLeave.bind(o))}),a.on("mousedown",o.onMouseDown.bind(o)),a.on("mouseup",o.onMouseUp.bind(o));var l=r.data().id;this.rowId=l.row,this.columnId=function(e,t){return l.column(e,t.model)},r.dataChanged.watch(function(e){if(e.hasChanges("id")){t.rowId=e.state.id.row;var n=e.state.id.column;t.columnId=function(e,t){return n(e,t.model)}}}),r.sceneChanged.watch(function(e){if("detached"===r.grid().interactionMode&&e.hasChanges("status"))switch(e.state.status){case"stop":t.cd.detach();break;case"start":t.cd.reattach()}})}},{key:"virtualRowId",value:function(e){return e}},{key:"selection",get:function(){return this.model.selection()}},{key:"model",get:function(){return this.root.model}}]),l}();Qf.decorators=[{type:u.Component,args:[{selector:"tbody[q-grid-core-body]",template:'<ng-container [ngSwitch]="$view.scroll.mode === \'virtual\' && pin === \'body\'"> <ng-container *ngSwitchCase="true"> <tr q-grid-vscroll-mark="top" class="q-grid-scroll-mark"> </tr> <tr class="q-grid-align"> <td *ngFor="let $column of $view.body.columns($table.pin); trackBy: columnId" [q-grid-core-td-align]="$column"> </td> </tr> <tr *ngFor="let $row of $view.body.render.rows[pin] | qGridVscroll: $view.scroll.y; index as $vscrollIndex; viewIndex as $rowIndex; trackBy: virtualRowId" [q-grid-core-tr]="$row" [q-grid-core-index]="$vscrollIndex" [q-grid-vscroll-row]="$vscrollIndex" q-grid-core-source="body"> <td *ngFor="let $column of $view.body.render.columns($row, $table.pin, $rowIndex); index as $columnIndex; trackBy: columnId" [attr.rowspan]="$view.body.render.rowspan($row, $column, $rowIndex, $columnIndex)" [attr.colspan]="$view.body.render.colspan($row, $column, $rowIndex, $columnIndex)"> <ng-container [q-grid-core-td]="$column"> </ng-container> </td> </tr> <tr q-grid-vscroll-mark="bottom" class="q-grid-scroll-mark"> </tr> </ng-container> <ng-container *ngSwitchDefault> <tr class="q-grid-align"> <td *ngFor="let $column of $view.body.columns($table.pin); trackBy: columnId" [q-grid-core-td-align]="$column"> </td> </tr> <tr *ngFor="let $row of $view.body.render.rows[pin]; index as $rowIndex; trackBy: rowId" [q-grid-core-tr]="$row" [q-grid-core-index]="$rowIndex" q-grid-core-source="body"> <td *ngFor="let $column of $view.body.render.columns($row, $table.pin, $rowIndex); index as $columnIndex; trackBy: columnId" [attr.rowspan]="$view.body.render.rowspan($row, $column, $rowIndex, $columnIndex)" [attr.colspan]="$view.body.render.colspan($row, $column, $rowIndex, $columnIndex)"> <ng-container [q-grid-core-td]="$column"> </ng-container> </td> </tr> </ng-container> </ng-container>'}]}],Qf.ctorParameters=function(){return[{type:u.ElementRef},{type:Sf},{type:Jf},{type:ac},{type:u.NgZone},{type:u.ChangeDetectorRef}]},Qf.propDecorators={pin:[{type:u.Input}]};var Xf=function(){function n(e,t){g(this,n),this.model=e,this.table=t}return h(n,[{key:"doBatch",value:function(e){for(var t=this.table,n=this.model,r=n.view(),i=r.rows,o=r.columns,a=n.selection().items,l=new Sh(n,t,{register:function(){return{}}}),u=this.table.body.cell(e.rowIndex,e.columnIndex).model(),s=u.label,c=u.value,h=u.column.type,f=0,d=a.length;f<d;f++){var g=a[f],m=g.row,p=g.column,v=i.indexOf(m),y=o.indexOf(p),x=t.body.cell(v,y).model();if(h===x.column.type){var w=new ph(x);w.label=s,w.value=c,l.editor=w,l.push.canExecute()&&l.push.execute()}}}}]),n}(),ed=function(){function n(e,t){g(this,n),this.element=e,this.root=t,this.startCell=null,this.initialSelectionMode=null,this.initialEditState=null,this.element.nativeElement.style.display="none"}return h(n,[{key:"ngOnInit",value:function(){var t=this.updateHandlerFactory(),n=this.updateMarkerFactory();this.root.model.navigationChanged.watch(function(e){t(e),n(e)})}},{key:"ngAfterViewInit",value:function(){this.element.nativeElement.style.display=""}},{key:"updateHandlerFactory",value:function(){var e=this.root,c=e.model,h=e.table,f=this.element.nativeElement,d=Hs(150),g=!1;return function(e){if(e.hasChanges("cell")){var t=e.state,a=t.cell,n=t.rowIndex,r=t.columnIndex;if(a){var i=e.changes.cell.oldValue||{},o=e.changes.cell.newValue||{},l=i.column||{},u=o.column||{};if(!!(c.drag().isActive||l.key!==u.key&&(l.viewWidth||u.viewWidth)))return void(g=!1);g=0<=i.rowIndex&&0<=i.columnIndex&&(o.rowIndex!==i.rowIndex||o.columnIndex!==i.columnIndex);var s=h.body.cell(n,r);g&&(s.addClass("q-grid-animate"),f.classList.add("q-grid-active"),d(function(){f.classList.remove("q-grid-active"),s.removeClass("q-grid-animate")}).catch(function(){qa.mutate(function(){s.removeClass("q-grid-animate")})})),qa.measure(function(){var e=s.element,t=c.scroll(),n=e.offsetTop-t.top+"px",r=e.offsetLeft-(a.column.pin?0:t.left)+"px",i=e.offsetWidth+"px",o=e.offsetHeight+"px";qa.mutate(function(){f.style.top=n,f.style.left=r,f.style.width=i,f.style.height=o})}),g=!0}}}}},{key:"updateMarkerFactory",value:function(){var u=this,e=this.root,s=e.model,c=e.table,t=new Xf(s,c),h=Hs(150),f=null;return s.editChanged.on(function(e){e.hasChanges("state")&&"endBatch"===e.state.state&&(s.edit({state:u.initialEditState}),t.doBatch(u.startCell),s.selection({mode:u.initialSelectionMode}),u.startCell=null)}),function(e){if(u.marker&&e.hasChanges("cell")){var t=e.state,n=t.rowIndex,r=t.columnIndex,i=s.edit(),o=i.method,a=i.state,l=c.body.cell(n,r).model();"batch"===o&&(f&&qa.mutate(function(){return u.marker.nativeElement.remove()}),l&&h(function(){return qa.mutate(function(){return l.element.appendChild(u.marker.nativeElement)})}),f=l),"startBatch"!==a||u.startCell||(u.startCell=l)}}}},{key:"startBatchEdit",value:function(e){var t=this.root.model;this.startCell=t.navigation().cell,this.startCell&&(this.initialEditState=t.edit().state,this.initialSelectionMode=t.selection().mode,t.selection({mode:"range"}),t.edit({state:"startBatch"}))}},{key:"isMarkerVisible",get:function(){var e=this.root.model,t=e.navigation().column;if(t){t.type;return"batch"===e.edit().method}return!1}}]),n}();ed.decorators=[{type:u.Component,args:[{selector:"q-grid-cell-handler",template:'<ng-container *ngIf="isMarkerVisible"> <i #marker class="material-icons q-grid-marker" (mousedown)="startBatchEdit($event)"> signal_cellular_4_bar </i> <i class="material-icons q-grid-marker"> signal_cellular_4_bar </i> </ng-container>'}]}],ed.ctorParameters=function(){return[{type:u.ElementRef},{type:ac}]},ed.propDecorators={marker:[{type:u.ViewChild,args:["marker"]}]};var td=function(){function t(e){g(this,t),this.element=e,this.type="click"}return h(t,[{key:"ngAfterViewInit",value:function(){var e=new Event(this.type),t=this.element.nativeElement,n=this.target?t.querySelector(this.target):t;if(!n)throw new Xo("raise.directive","raise target is not found");n.dispatchEvent(e)}}]),t}();td.decorators=[{type:u.Directive,args:[{selector:"[q-grid-raise]"}]}],td.ctorParameters=function(){return[{type:u.ElementRef}]},td.propDecorators={type:[{type:u.Input,args:["q-grid-raise"]}],target:[{type:u.Input,args:["q-grid-raise-target"]}]};var nd=function e(){g(this,e)};nd.decorators=[{type:u.NgModule,args:[{declarations:[td],exports:[td]}]}];var rd=function(){function e(){g(this,e)}return h(e,null,[{key:"decode",value:function(e){return JSON.parse(e)}},{key:"encode",value:function(e){return JSON.stringify(e)}},{key:"mimeType",get:function(){return"application/x-q-grid+json"}}]),e}();rd.element=null,rd.data=null,rd.area=null,rd.startPosition=null;var id=function(){function i(e,t){g(this,i),this.root=e;var n=(this.elementRef=t).nativeElement,r=new Pf(n,new Af(this));n.classList.add(_a+"-can-drag"),r.on("dragstart",this.onStart),r.on("dragend",this.onEnd)}return h(i,[{key:"onStart",value:function(e){var t=e.dataTransfer,n=this.data,r={data:n};if(!1===this.drag.canExecute(r))return e.preventDefault(),!(t.effectAllowed="none");var i=this.drag.execute(r);rd.element=i&&L(i.getBoundingClientRect)?i:e.srcElement,this.elementRef.nativeElement.classList.add(_a+"-drag"),t.setData(rd.mimeType,rd.encode(n)),t.effectAllowed=this.effect||"move",rd.data=n,rd.area=this.area;var o=rd.element.getBoundingClientRect();(rd.startPosition={x:e.clientX,y:e.clientY,rect:o},this.root)&&this.root.model.drag({isActive:!0},{source:"drag.directive"})}},{key:"onEnd",value:function(){this.root&&this.root.model.drag({isActive:!1},{source:"drag.directive"});this.elementRef.nativeElement.classList.remove(_a+"-drag"),rd.data=null,rd.area=null,rd.element=null,rd.startPosition=null}}]),i}();id.decorators=[{type:u.Directive,args:[{selector:"[q-grid-drag]"}]}],id.ctorParameters=function(){return[{type:ac,decorators:[{type:u.Optional}]},{type:u.ElementRef}]},id.propDecorators={data:[{type:u.Input,args:["q-grid-drag-data"]}],effect:[{type:u.Input,args:["q-grid-drag-effect"]}],drag:[{type:u.Input,args:["q-grid-drag"]}],area:[{type:u.Input,args:["q-grid-drop-area"]}]};var od=function(e){function a(e,t,n){g(this,a);var r=m(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));r.root=e,r.elementRef=t,r.zone=n,r.dragDirection="y";var i=t.nativeElement,o=new Pf(i,new Af(r));return i.classList.add(_a+"-can-drop"),n.runOutsideAngular(function(){o.on("dragenter",r.onEnter),o.on("dragover",r.onOver),o.on("dragleave",r.onLeave)}),o.on("drop",r.onDrop),r}return c(a,Ys),h(a,[{key:"ngOnInit",value:function(){var n=this;this.root&&this.using(this.root.model.dragChanged.on(function(e){if(e.hasChanges("isActive")&&!e.state.isActive){var t={path:[],dragData:rd.data,dropData:n.dropData,action:"end",inAreaX:Vo,inAreaY:Vo};n.drop.canExecute(t)&&n.drop.execute(t)}}))}},{key:"onDrop",value:function(e){e.stopPropagation(),this.elementRef.nativeElement.classList.remove(_a+"-dragover");var t={path:e.path,dragData:rd.data,dropData:this.dropData,action:"drop",inAreaX:this.inAreaFactory(e,"x"),inAreaY:this.inAreaFactory(e,"y")};return this.drop.canExecute(t)&&this.drop.execute(t),!1}},{key:"onEnter",value:function(e){return e.preventDefault(),this.elementRef.nativeElement.classList.add(_a+"-dragover"),!(e.dataTransfer.dropEffect="move")}},{key:"onOver",value:function(e){if(e.preventDefault(),this.root&&"stop"!==this.root.model.scene().status)return!1;if(this.area!==rd.area)return!(e.dataTransfer.dropEffect="none");var t=this.getPosition(e),n=this.getPath(t);if(0<=n.indexOf(rd.element))return!1;var r={path:n,dragData:rd.data,dropData:this.dropData,action:"over",inAreaX:this.inAreaFactory(e,"x"),inAreaY:this.inAreaFactory(e,"y")};return this.dragOver.canExecute(r)&&(this.dragOver.execute(r),rd.data!==r.dragData&&(rd.data=r.dragData),e.dataTransfer.dropEffect="move"),!1}},{key:"onLeave",value:function(){this.elementRef.nativeElement.classList.remove(_a+"-dragover")}},{key:"getPosition",value:function(e){var t=rd.startPosition,n=t.rect,r=t.x-(n.left+n.width/2),i=t.y-(n.top+n.height/2);return{x:e.clientX-r,y:e.clientY-i}}},{key:"getPath",value:function(e){for(var t=e.x,n=e.y,r=[],i=document.elementFromPoint(t,n);i;)r.push(i),i=i.parentElement;return r}},{key:"inAreaFactory",value:function(e,t){var n=rd.startPosition.rect,r=this.getPosition(e),i=r.x,o=r.y;return"y"===t?function(e){var t=e.getBoundingClientRect();return n.top<t.top?t.bottom>o&&o>t.bottom-n.height:t.top<o&&o<t.top+n.height}:function(e){var t=e.getBoundingClientRect();return n.left<t.left?t.right>i&&i>t.right-n.width:t.left<i&&i<t.left+n.width}}}]),a}();od.decorators=[{type:u.Directive,args:[{selector:"[q-grid-drop]"}]}],od.ctorParameters=function(){return[{type:ac,decorators:[{type:u.Optional}]},{type:u.ElementRef},{type:u.NgZone}]},od.propDecorators={area:[{type:u.Input,args:["q-grid-drop-area"]}],dropData:[{type:u.Input,args:["q-grid-drop-data"]}],drop:[{type:u.Input,args:["q-grid-drop"]}],dragOver:[{type:u.Input,args:["q-grid-drag-over"]}],dragDirection:[{type:u.Input,args:["q-grid-drag-direction"]}]};var ad=function e(){g(this,e)};ad.decorators=[{type:u.NgModule,args:[{declarations:[id,od],exports:[id,od]}]}];var ld=function(){function n(e,t){g(this,n),this.element=e,this.zone=t,this.disabled=!1}return h(n,[{key:"ngAfterViewInit",value:function(){if(!this.disabled){var e=this.selector,t=e?Ht(e)?this.element.nativeElement.querySelector(e):e:this.element.nativeElement;if(!t)throw new Xo("focus.directive","Element "+this.selector+" is not found");if(!L(t.focus))throw new Xo("focus.directive","Can't find focus method in "+t);this.zone.runOutsideAngular(function(){return setTimeout(function(){return t.focus()},10)})}}}]),n}();ld.decorators=[{type:u.Directive,args:[{selector:"[q-grid-focus]"}]}],ld.ctorParameters=function(){return[{type:u.ElementRef},{type:u.NgZone}]},ld.propDecorators={selector:[{type:u.Input,args:["q-grid-focus"]}],disabled:[{type:u.Input,args:["q-grid-focus-disabled"]}]};var ud=function(e){function t(h,f,d){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.using(h.sceneChanged.watch(function(e,t){if(e.hasChanges("status")&&("stop"===e.state.status&&f.body.rowCount(0))){t();var n=Object.keys(d).find(function(e){return e.startsWith("body")});if(n){var r=d[n];r&&r.focus()}var i=f.body,o=h.focus,a=o(),l=i.cell(a.rowIndex,a.columnIndex).model();if(!l||!l.column.canFocus)for(var u=0,s=i.rowCount(0);u<s;){var c=i.row(u).cells().findIndex(function(e){var t=e.model();return t&&t.column.canFocus});if(0<=c){o({rowIndex:u,columnIndex:c},{source:"autofocus.view"});break}u++}}})),e}return c(t,ya),t}(),sd=function(){function t(e){g(this,t),this.root=e}return h(t,[{key:"ngAfterViewInit",value:function(){if(!1!==this.enabled){var e=this.root,t=e.markup,n=e.model,r=e.table;this.view=new ud(n,r,t)}}},{key:"ngOnDestroy",value:function(){this.view&&this.view.dispose()}}]),t}();sd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-autofocus]"}]}],sd.ctorParameters=function(){return[{type:ac}]},sd.propDecorators={enabled:[{type:u.Input,args:["q-grid-autofocus"]}]};var cd=function(){function n(e,t){g(this,n),this.renderer=e,this.elementRef=t,this.onBlur=No,this.selector="input"}return h(n,[{key:"ngOnInit",value:function(){var e=this.renderer.selectRootElement(this.selector);this.renderer.listen(e,"blur",this.onBlur)}}]),n}();cd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-on-blur]"}]}],cd.ctorParameters=function(){return[{type:u.Renderer2},{type:u.ElementRef}]},cd.propDecorators={onBlur:[{type:u.Input,args:["q-grid-on-blur"]}],selector:[{type:u.Input,args:["q-grid-on-blur-selector"]}]};var hd=function e(){g(this,e)};hd.decorators=[{type:u.NgModule,args:[{declarations:[ld,sd,cd],exports:[ld,sd,cd]}]}];var fd=function(e){function o(e,t,n,r){g(this,o);var i=m(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return i.root=e,i.zone=r,i.context={x:0,y:0,height:0,width:0},i.element=t.nativeElement,i.divider=n.createElement("div"),i.listener={divider:new Pf(i.divider,new Af(i)),document:new Pf(n,new Af(i))},i}return c(o,Ys),h(o,[{key:"ngOnInit",value:function(){var e=this,t={data:this.key};this.canResize(t)&&(this.zone.runOutsideAngular(function(){e.listener.divider.on("mousedown",e.dragStart)}),this.divider.classList.add(_a+"-resize-handler"),this.element.appendChild(this.divider))}},{key:"ngOnDestroy",value:function(){s(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"ngOnDestroy",this).call(this),this.listener.divider.off(),this.listener.document.off()}},{key:"dragStart",value:function(e){var t=this;e.preventDefault();var n=this.context;n.width=this.element.clientWidth,n.height=this.element.clientHeight,n.x=e.screenX,n.y=e.screenY,this.zone.runOutsideAngular(function(){t.listener.document.on("mousemove",t.drag),t.listener.document.on("mouseup",t.dragEnd)}),this.model.drag({isActive:!0})}},{key:"drag",value:function(e){var t=this.model.layout,n=this.context,r=or(t()[this.path]);r.set(this.key,{width:n.width+e.screenX-n.x,height:n.height+e.screenY-n.y}),t(R({},this.path,r))}},{key:"dragEnd",value:function(){this.listener.document.off(),this.model.drag({isActive:!1})}},{key:"model",get:function(){return this.root.model}}]),o}();fd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-resize]"}]}],fd.ctorParameters=function(){return[{type:ac,decorators:[{type:u.Optional}]},{type:u.ElementRef},{type:void 0,decorators:[{type:u.Inject,args:[n.DOCUMENT]}]},{type:u.NgZone}]},fd.propDecorators={key:[{type:u.Input,args:["q-grid-resize"]}],path:[{type:u.Input,args:["q-grid-resize-path"]}],canResize:[{type:u.Input,args:["q-grid-can-resize"]}]};var dd=function(){function t(e){g(this,t),this.emptyWidth=75,this.host=e.nativeElement}return h(t,[{key:"ngOnInit",value:function(){this.element=this.selector?this.host.querySelector(this.selector):this.host}},{key:"autoWidth",value:function(t){var n=this;if(!t)return this.actualText=t,void qa.measure(function(){qa.mutate(function(){n.host.style.width=n.emptyWidth+"px"})});this.element&&this.actualText!==t&&(this.actualText=t,qa.measure(function(){var e=n.calculateWidth(n.element,t)+"px";qa.mutate(function(){return n.host.style.width=e})}))}},{key:"calculateWidth",value:function(e,t){var n=0;if(t){var r=e.ownerDocument,i=r.body,o=r.createElement("span");o.innerText=t,o.style.whiteSpace="pre",o.style.visibility="hidden",o.style.font=e.style.font,o.style.fontFamily=e.style.fontFamily,o.style.lineHeight=e.style.lineHeight,o.style.border=e.style.border,i.appendChild(o),n=o.offsetWidth,o.remove()}return n}},{key:"value",set:function(e){this.autoWidth(e)}}]),t}();dd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-autosize]"}]}],dd.ctorParameters=function(){return[{type:u.ElementRef}]},dd.propDecorators={selector:[{type:u.Input,args:["q-grid-autosize"]}],emptyWidth:[{type:u.Input,args:["q-grid-autosize-empty-width"]}],value:[{type:u.Input,args:["q-grid-autisize-value"]}]};var gd=function e(){g(this,e)};gd.decorators=[{type:u.NgModule,args:[{declarations:[fd,dd],exports:[fd,dd]}]}];var md=function(e){function i(e){g(this,i);var t=m(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));t.element=e.element,t.targetName=e.targetName;var n=new Pf(window,new Af(t)),r=Hs(400);return t.using(n.on("resize",function(){t.invalidate(),r(function(){return t.invalidate()})})),t}return c(i,ya),h(i,[{key:"invalidate",value:function(){for(var e=this.element.parentNode;e;){var t=(this.targetName||"").toLowerCase();if(e.nodeName.toLowerCase()===t)return this.layout(e,this.element),void(this.element.style.opacity=1);e=e.parentNode}}},{key:"layout",value:function(e,t){var n=e.getBoundingClientRect(),r=n.top,i=n.right,o=n.left,a=n.bottom,l=t.getBoundingClientRect(),u=l.width,s=l.height,c=this.boxRect(),h=[];h.push(this.intersection(c,{top:r,right:o+u,bottom:r+s,left:o})),h.push(this.intersection(c,{top:r,right:i,bottom:r+s,left:i-u})),h.push(this.intersection(c,{top:a-s,right:o+u,bottom:a,left:o})),h.push(this.intersection(c,{top:a-s,right:i,bottom:a,left:i-u}));var f=qo(h,function(e){return e.area}).b,d=f.left,g=f.top,m=this.fix({left:d-c.left,top:g-c.top,width:u,height:s});t.style.left=m.left+"px",t.style.top=m.top+"px"}},{key:"intersection",value:function(e,t){return{area:Math.max(0,Math.min(e.right,t.right)-Math.max(e.left,t.left))*Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top)),a:e,b:t}}},{key:"fix",value:function(e){var t=this.windowRect(),n=this.boxRect(),r=t.width,i=t.height,o=n.left-t.left,a=n.top-t.top,l=e.height,u=e.width,s=e.left+o,c=e.top+a,h=i<c+l,f=c<0;return{left:s<0||r<s+u?(r-u)/2-o:e.left,top:f||h?(i-l)/2-a:e.top}}},{key:"boxRect",value:function(){for(var e=this.element;e;){if(e.classList&&e.classList.contains("q-grid-box"))return e.getBoundingClientRect();e=e.parentNode}return this.windowRect()}},{key:"windowRect",value:function(){var e=window,t=e.innerHeight,n=e.innerWidth;return{top:0,left:0,bottom:t,right:n,height:t,width:n}}}]),i}(),pd=function(){function t(e){g(this,t),this.element=e,this.target=""}return h(t,[{key:"ngOnInit",value:function(){this.position=new md({element:this.element.nativeElement,targetName:this.target}),this.position.invalidate()}},{key:"ngOnDestroy",value:function(){this.position.dispose()}}]),t}();pd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-position]"}]}],pd.ctorParameters=function(){return[{type:u.ElementRef}]},pd.propDecorators={target:[{type:u.Input,args:["q-grid-position"]}]};var vd=function(){function t(e){g(this,t),this.element=e,this.key=""}return h(t,[{key:"ngOnInit",value:function(){this.element.nativeElement.addEventListener(this.key,function(e){return e.stopPropagation()})}}]),t}();vd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-stop-propagate]"}]}],vd.ctorParameters=function(){return[{type:u.ElementRef}]},vd.propDecorators={key:[{type:u.Input,args:["q-grid-stop-propagate"]}]};var yd=function e(){g(this,e)};yd.decorators=[{type:u.NgModule,args:[{declarations:[pd,vd],exports:[pd,vd]}]}];var xd=function(){function e(){g(this,e),this.isActive=!0}return h(e,[{key:"hide",value:function(){ca.notNull(this.element,"element"),this.isActive&&(this.element.nativeElement.classList.add("q-grid-backdrop-inactive"),this.isActive=!1)}},{key:"reveal",value:function(){ca.notNull(this.element,"element"),this.isActive||(this.element.nativeElement.classList.remove("q-grid-backdrop-inactive"),this.isActive=!0)}}]),e}();xd.decorators=[{type:u.Injectable}];var wd=function(e){function i(e,t){g(this,i);var n=m(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));n.backdropService=e,n.reader=new FileReader,n.valueChange=new u.EventEmitter,n.labelChange=new u.EventEmitter,n.isValid=Fo;var r=new Pf(t.nativeElement,new Af(n));return n.using(r.on("change",n.onUpload)),n.using(r.on("drop",n.onUpload)),n.using(r.on("click",n.hideBackdrop)),n.using(r.on("focus",n.revealBackdrop)),n.reader.onloadend=function(e){return n.onLoadEnd(e)},n}return c(i,Ys),h(i,[{key:"onUpload",value:function(e){var t=e.target.files[0];t&&this.isValid(t.name)&&(this.reader.readAsDataURL(t),this.label=t.name)}},{key:"onLoadEnd",value:function(e){e.target.readyState===this.reader.DONE&&(this.value=e.target.result)}},{key:"hideBackdrop",value:function(){this.backdropService&&this.backdropService.hide()}},{key:"revealBackdrop",value:function(){var e=this;this.backdropService&&(this.backdropService.isActive||setTimeout(function(){return e.backdropService.reveal()},300))}},{key:"value",get:function(){return this._value},set:function(e){e!==this._value&&(this._value=e,this.valueChange.emit(e))}},{key:"label",get:function(){return this._label},set:function(e){e!==this._label&&(this._label=e,this.labelChange.emit(e))}}]),i}();wd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-file]"}]}],wd.ctorParameters=function(){return[{type:xd,decorators:[{type:u.Optional}]},{type:u.ElementRef}]},wd.propDecorators={valueChange:[{type:u.Output,args:["q-grid-fileChange"]}],labelChange:[{type:u.Output,args:["q-grid-file-labelChange"]}],isValid:[{type:u.Input,args:["q-grid-file-is-valid"]}],value:[{type:u.Input,args:["q-grid-file"]}],label:[{type:u.Input,args:["q-grid-file-label"]}]};var bd=function e(){g(this,e)};bd.decorators=[{type:u.NgModule,args:[{declarations:[wd],exports:[wd]}]}];var kd=function(){function e(){g(this,e)}return h(e,[{key:"context",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=new Rf;return Object.assign(t.settings,e),t.container.update(0,!0),t}}]),e}();kd.decorators=[{type:u.Injectable}];var Cd=function e(t,n){g(this,e),this.view=t,this.markup={},n.tabIndex=0,n.style.outline="none",n.style.overflowAnchor="none"};function qd(e){return e[0].toUpperCase()+e.slice(1)}function Od(e,t){var n=Math.max(0,Math.round(e/t));return{index:n,offset:t*n,lastOffset:0,value:e,pad:0}}function _d(e,t){var n=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(o===t)return i;o<t?n=i+1:r=i-1}return n}(t,e),r=t.length;return 0<n?{index:n,offset:t[n-1],lastOffset:t[r-1],value:e,pad:0}:{index:0,offset:0,lastOffset:0,value:e,pad:0}}function Id(a){var l=new Array;return function(e,t){for(var n=l.length,r=a.length,i=r-(Math.min(t,r+e)-n);i<r;i++){var o=(0,a[i])();l[n]=0===n?o:l[n-1]+o,n++}return l}}var Ed=Number.MAX_SAFE_INTEGER;function zd(){return 0}var Rd=function(){function t(e){g(this,t),this.port=e,this.items=[],this.minArm=Ed,this.position=_d(0,[]),this.getOffsets=Id(this.items)}return h(t,[{key:"recycle",value:function(e,t,n){var r=this.port.getItemSize();return r?this.recycleItemSize(e,t,n,r):this.recycleOffsets(e,t,n)}},{key:"invalidate",value:function(e){var t=e.offset,n=Math.max(0,t),r=Math.max(0,e.pad-n);return this.port.move(n,r),e.index}},{key:"reset",value:function(){return this.minArm=Ed,this.getOffsets=this.port.recycleFactory(this.items),this.position=_d(0,[]),this.invalidate(this.position)}},{key:"setItem",value:function(e,t){this.items[e]=t}},{key:"removeItem",value:function(e){var t=this.items,n=t.length-1;if(0===e)t.shift();else if(e===n)for(t.pop();n--&&t[n]===zd;)t.pop();else t[e]=zd}},{key:"recycleOffsets",value:function(e,t,n){var r=this.position,i=this.port,o=this.settings.threshold,a=this.getOffsets(r.index,e),l=this.getArmUsingOffsets(a,t,r.index);this.minArm=Math.min(this.minArm,l);var u=i.getPositionUsingOffsets(a,t,this.minArm);if(n||r.index!==u.index){var s=Math.min(a.length-1,u.index+o-1),c=u.index-1,h=(a[s]||0)-(a[c]||0),f=(a[a.length-1]||0)-h;return u.pad=f,this.position=u}return null}},{key:"recycleItemSize",value:function(e,t,n,r){var i=this.position,o=this.port,a=this.getArmUsingItemSize(r,t),l=o.getPositionUsingItemSize(r,t,a);if(n||i.index!==l.index){var u=this.settings.threshold,s=Math.max(0,l.index+u-this.container.count);return l.pad=Math.max(0,r*(e+s-u)),this.position=l}return null}},{key:"getArmUsingItemSize",value:function(e,t){var n=this.settings.threshold,r=this.port.getSize(t),i=n*e;return Math.max(0,(i-r)/2)}},{key:"getArmUsingOffsets",value:function(e,t,n){if(e.length){var r=this.settings.threshold,i=this.port.getSize(t),o=Math.min(e.length,n+r)-1,a=o+1-r,l=e[o]-e[a];return Math.max(0,(l-i)/2)}return Ed}},{key:"container",get:function(){return this.port.context.container}},{key:"settings",get:function(){return this.port.context.settings}}]),t}();var jd=function(){function i(e,t,n){var r=this;g(this,i),this.elementRef=e,this.scrollEvent=new u.EventEmitter,this.resetEvent=new u.EventEmitter,t.runOutsideAngular(function(){e.nativeElement.addEventListener("scroll",function(){return r.onScroll()},{passive:!0}),n.listen(window,"resize",function(){return r.onResize()})})}return h(i,[{key:"drawPlaceholder",value:function(e,t){var n=this.elementRef.nativeElement,r=n.style,i=function(e,t){var n=Math.max(e,1),r=Math.max(t,1),i=document.createElement("canvas");i.width=Math.max(2*e,1),i.height=Math.max(2*t,1);var o=i.getContext("2d");return o.fillStyle="rgba(0, 0, 0, 0.04)",o.fillRect(0,0,n,r),o.fillStyle="rgba(0, 0, 0, 0.08)",o.fillRect(e,t,n,r),i.toDataURL()}(e||n.clientWidth,t||n.clientHeight);r.backgroundImage="url("+i+")",r.backgroundRepeat="repeat"}},{key:"resetX",value:function(){this.elementRef.nativeElement.scrollLeft=0}},{key:"resetY",value:function(){this.elementRef.nativeElement.scrollTop=0}},{key:"onScroll",value:function(){this.scrollEvent.emit()}},{key:"onResize",value:function(){this.resetEvent.emit({handled:!1,source:"resize"})}},{key:"element",get:function(){return this.elementRef.nativeElement}}]),i}();jd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-vscroll]"}]}],jd.ctorParameters=function(){return[{type:u.ElementRef},{type:u.NgZone},{type:u.Renderer2}]};var Sd=function e(){g(this,e),this.scrollWidth=0,this.scrollHeight=0,this.scrollTop=0,this.scrollLeft=0,this.portWidth=0,this.portHeight=0};var Pd=function(){function u(t){var n=this;g(this,u),this.port=t,this.box=new Sd,this.ticking=!1;var e=t.view,r=t.layout,i=this.settings,o=this.container;if(0<i.placeholderHeight||0<i.placeholderWidth){var a=i.placeholderWidth||Yt(i.columnWidth)&&i.columnWidth,l=i.placeholderHeight||Yt(i.rowHeight)&&i.rowHeight;e.drawPlaceholder(a,l)}e.scrollEvent.subscribe(function(){return n.update(!1)}),e.resetEvent.subscribe(function(e){e.handled||(e.handled=i.resetTriggers.indexOf(e.source)<0,o.resetEvent.emit(e))}),o.resetEvent.subscribe(function(e){e.handled||(o.cursor=r.reset(),t.reset())}),o.updateEvent.subscribe(function(e){e.force&&n.update(!0)})}return h(u,[{key:"tick",value:function(e){var t=this;this.ticking=!1;var n=this.port,r=this.container.count,i=n.layout.recycle(r,this.box,e);i&&this.container.apply(function(){t.container.cursor=n.layout.invalidate(i),t.container.drawEvent.emit({position:t.container.cursor})},function(e){return n.emit(e)})}},{key:"update",value:function(){var n=this,r=0<arguments.length&&void 0!==arguments[0]&&arguments[0],i=this.port.view;this.container.read(function(){var e=i.element,t={scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,portWidth:e.clientWidth,portHeight:e.clientHeight};(r||n.port.hasChanges(t,n.box))&&(n.box=t,n.container.count&&!n.ticking&&(n.ticking=!0,n.container.tick(function(){return n.tick(r)})))})}},{key:"settings",get:function(){return this.port.context.settings}},{key:"container",get:function(){return this.port.context.container}}]),u}();var Ad=function(e){function i(e,t,n){g(this,i);var r=m(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,n,t.nativeElement));return r.zone=e,r.elementRef=t,r.markup={},r}return c(i,Cd),h(i,[{key:"ngOnInit",value:function(){return ca.notNull(this.context,"context"),this.layout=new Rd(this),new Pd(this)}},{key:"reset",value:function(){this.view.resetY()}},{key:"emit",value:function(e){this.zone.run(e)}},{key:"getPositionUsingItemSize",value:function(e,t,n){var r=t.scrollTop-n,i=t.scrollHeight-(t.portHeight+n);return Od(Math.min(i,Math.max(0,r)),e)}},{key:"getPositionUsingOffsets",value:function(e,t,n){var r=t.scrollTop-n,i=t.scrollHeight-(t.portHeight+n);return _d(Math.min(i,Math.max(0,r)),e)}},{key:"move",value:function(e,t){this.pad("top",e),this.pad("bottom",t)}},{key:"getItemSize",value:function(){var e=this.context.settings.rowHeight;return Yt(e)?e:0}},{key:"getScrollSize",value:function(e){return e.scrollHeight}},{key:"getSize",value:function(e){return e.portHeight}},{key:"recycleFactory",value:function(e){var n=this,r=Id(e);return function(e,t){return n.getItemSize()?[]:r(e,t)}}},{key:"hasChanges",value:function(e,t){return!t.portHeight||e.scrollTop!==t.scrollTop}},{key:"pad",value:function(e,t){this.markup.hasOwnProperty(e)?this.markup[e].style.height=t+"px":this.elementRef.nativeElement.style["padding"+qd(e)]=t+"px"}}]),i}();Ad.decorators=[{type:u.Directive,args:[{selector:"[q-grid-vscroll-port-y]"}]}],Ad.ctorParameters=function(){return[{type:u.NgZone},{type:u.ElementRef},{type:jd}]},Ad.propDecorators={context:[{type:u.Input,args:["q-grid-vscroll-port-y"]}]};var Ld=function(){function n(e,t){g(this,n),this.port=t,this.column=e.nativeElement}return h(n,[{key:"ngOnChanges",value:function(e){if(e.index){if(this.port.getItemSize())return void(this.ngOnChanges=null);var o=this.layout,t=this.settings,a=this.container,l=this.column,u=t.rowHeight;this.ngOnChanges=function(e){if(e.index){var t=e.index,n=t.currentValue,r=t.previousValue;o.removeItem(r);var i=Ef(u,a,l,n);o.setItem(n,i)}};var n=e.index.currentValue,r=Ef(u,a,l,n);o.setItem(n,r)}}},{key:"ngOnDestroy",value:function(){this.port.layout.removeItem(this.index)}},{key:"layout",get:function(){return this.port.layout}},{key:"settings",get:function(){return this.port.context.settings}},{key:"container",get:function(){return this.port.context.container}}]),n}();Ld.decorators=[{type:u.Directive,args:[{selector:"[q-grid-vscroll-column]"}]}],Ld.ctorParameters=function(){return[{type:u.ElementRef},{type:Ad}]},Ld.propDecorators={index:[{type:u.Input,args:["q-grid-vscroll-column"]}]};var Md=function(){function n(e,t){g(this,n),this.port=t,this.row=e.nativeElement}return h(n,[{key:"ngOnChanges",value:function(e){if(e.index){if(this.port.getItemSize())return void(this.ngOnChanges=null);var o=this.layout,t=this.settings,a=this.container,l=this.row,u=t.rowHeight;this.ngOnChanges=function(e){if(e.index){var t=e.index,n=t.currentValue,r=t.previousValue;o.removeItem(r);var i=Ef(u,a,l,n);o.setItem(n,i)}};var n=e.index.currentValue,r=Ef(u,a,l,n);o.setItem(n,r)}}},{key:"ngOnDestroy",value:function(){this.port.layout.removeItem(this.index)}},{key:"layout",get:function(){return this.port.layout}},{key:"settings",get:function(){return this.port.context.settings}},{key:"container",get:function(){return this.port.context.container}}]),n}();Md.decorators=[{type:u.Directive,args:[{selector:"[q-grid-vscroll-row]"}]}],Md.ctorParameters=function(){return[{type:u.ElementRef},{type:Ad}]},Md.propDecorators={index:[{type:u.Input,args:["q-grid-vscroll-row"]}]};var Td=[],Dd=function(){function e(){g(this,e)}return h(e,[{key:"transform",value:function(e,t){if(ca.notNull(t,"context"),!e)return Td;var n=e.length,r=t.container,i=t.settings;if(r.update(n),n){var o=r.items,a=r.cursor,l=i.threshold,u=a;if(r.force||u!==r.position){var s=Math.min(a+l,n);r.position=u,o.length=s-u;for(var c=u,h=0;c<s;c++,h++)o[h]=e[c];r.force=!1}return o}return Td}}]),e}();Dd.decorators=[{type:u.Pipe,args:[{name:"qGridVscroll",pure:!1}]}];var Nd=function(e){function i(e,t,n){g(this,i);var r=m(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,n,t.nativeElement));return r.zone=e,r.elementRef=t,r.markup={},r}return c(i,Cd),h(i,[{key:"ngOnInit",value:function(){return ca.notNull(this.context,"context"),this.layout=new Rd(this),new Pd(this)}},{key:"reset",value:function(){this.view.resetX()}},{key:"emit",value:function(e){this.zone.run(e)}},{key:"getPositionUsingItemSize",value:function(e,t,n){var r=t.scrollLeft-n,i=t.scrollWidth-(t.portWidth+n);return Od(Math.min(i,Math.max(0,r)),e)}},{key:"getPositionUsingOffsets",value:function(e,t,n){var r=t.scrollLeft-n,i=t.scrollHeight-(t.portWidth+n);return _d(Math.min(i,Math.max(0,r)),e)}},{key:"move",value:function(e,t){this.pad("left",e),this.pad("right",t)}},{key:"getItemSize",value:function(){var e=this.context.settings.columnWidth;return Yt(e)?e:0}},{key:"getScrollSize",value:function(e){return e.scrollWidth}},{key:"getSize",value:function(e){return e.portWidth}},{key:"recycleFactory",value:function(e){var n=this,r=Id(e);return function(e,t){return n.getItemSize()?[]:r(e,t)}}},{key:"hasChanges",value:function(e,t){return!t.portWidth||e.scrollWidth!==t.scrollWidth}},{key:"pad",value:function(e,t){this.markup.hasOwnProperty(e)?this.markup[e].style.width=t+"px":this.elementRef.nativeElement.style["padding"+qd(e)]=t+"px"}}]),i}();Nd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-vscroll-port-x]"}]}],Nd.ctorParameters=function(){return[{type:u.NgZone},{type:u.ElementRef},{type:jd}]},Nd.propDecorators={context:[{type:u.Input,args:["q-grid-vscroll-port-x"]}]};var Fd=function(){function r(e,t,n){g(this,r),this.elementRef=e,this.ports=[],t&&this.ports.push(t),n&&this.ports.push(n)}return h(r,[{key:"ngOnInit",value:function(){var t=this.elementRef.nativeElement,n=this.key;this.ports.forEach(function(e){return e.markup[n]=t})}},{key:"ngOnDestroy",value:function(){var t=this.key;this.ports.forEach(function(e){return delete e.markup[t]})}}]),r}();Fd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-vscroll-mark]"}]}],Fd.ctorParameters=function(){return[{type:u.ElementRef},{type:Nd,decorators:[{type:u.Optional}]},{type:Ad,decorators:[{type:u.Optional}]}]},Fd.propDecorators={key:[{type:u.Input,args:["q-grid-vscroll-mark"]}]};var Vd=function e(){g(this,e)};Vd.decorators=[{type:u.NgModule,args:[{declarations:[jd,Ld,Md,Fd,Nd,Ad,Dd],exports:[jd,Ld,Md,Fd,Nd,Ad,Dd],providers:[kd]}]}];var $d=function e(){g(this,e)};$d.decorators=[{type:u.NgModule,args:[{declarations:[],exports:[]}]}];var Bd=function(){function n(e,t){g(this,n),t.createEmbeddedView(e,this)}return h(n,[{key:"time",value:function(e,t){var n=new Date("string"==typeof t?Date.now():e),r=t.split(":"),i=j(r,3),o=i[0],a=i[1],l=i[2];if(o&&a)return n.setHours(+o),n.setMinutes(+a),l&&n.setSeconds(+l),n}}]),n}();Bd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-time]"}]}],Bd.ctorParameters=function(){return[{type:u.TemplateRef},{type:u.ViewContainerRef}]};var Ud=function e(){g(this,e)};Ud.decorators=[{type:u.NgModule,args:[{declarations:[Bd],exports:[Bd]}]}];var Hd=/^\d{1,2}[\/|\-|\.|_]\d{1,2}[\/|\-|\.|_]\d{4}$/g,Wd=/^\d{4}[\/|\-|\.|_]\d{1,2}[\/|\-|\.|_]\d{1,2}$/g,Gd=function(){function n(e,t){g(this,n),t.createEmbeddedView(e,this)}return h(n,[{key:"isValid",value:function(e){return 0===e.search(Hd)||0===e.search(Wd)}}]),n}();Gd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-date]"}]}],Gd.ctorParameters=function(){return[{type:u.TemplateRef},{type:u.ViewContainerRef}]};var Kd=function e(){g(this,e)};Kd.decorators=[{type:u.NgModule,args:[{declarations:[Gd],exports:[Gd]}]}];var Yd=function(){function e(){g(this,e),this.shortcut=new As(new Ls),this.execute=new u.EventEmitter}return h(e,[{key:"ngOnInit",value:function(){var t=this,e=this.command;if(e&&e.shortcut){var n=new Ms(function(e){e(),t.execute.emit()},this.commandContext);this.shortcutOff=this.shortcut.register(n,[e])}}},{key:"onKeyDown",value:function(e){this.shortcutOff&&this.shortcut.keyDown(e,"command")}},{key:"ngOnDestroy",value:function(){this.shortcutOff&&(this.shortcutOff(),this.shortcutOff=null)}}]),e}();Yd.decorators=[{type:u.Directive,args:[{selector:"[q-grid-command]"}]}],Yd.ctorParameters=function(){return[]},Yd.propDecorators={command:[{type:u.Input,args:["q-grid-command"]}],commandContext:[{type:u.Input,args:["q-grid-command-context"]}],execute:[{type:u.Output,args:["q-grid-command-execute"]}],onKeyDown:[{type:u.HostListener,args:["keydown",["$event"]]}]};var Zd=function e(){g(this,e)};Zd.decorators=[{type:u.NgModule,args:[{declarations:[Yd],exports:[Yd]}]}];var Jd=function e(){g(this,e)};Jd.decorators=[{type:u.NgModule,args:[{declarations:[],exports:[ad,hd,gd,yd,$d,nd,bd,Vd,Ud,Kd,Zd]}]}];var Qd=function(){function n(e,t){g(this,n),this.$view=e,this.$table=t}return h(n,[{key:"columnId",value:function(e,t){return t.model.key}},{key:"rowId",value:function(e){return e}}]),n}();Qd.decorators=[{type:u.Component,args:[{selector:"tfoot[q-grid-core-foot]",template:'<tr *ngFor="let $row of $view.foot.rows; trackBy: rowId; index as $rowIndex" [q-grid-core-trh]="$row" [q-grid-core-index]="$rowIndex" q-grid-core-source="foot"> <td *ngFor="let $column of $view.foot.columns($row, $table.pin); trackBy: columnId; index as $columnIndex" [attr.rowspan]="$column.rowspan" [attr.colspan]="$column.colspan"> <ng-container [q-grid-core-tf]="$column"> </ng-container> </td> </tr>'}]}],Qd.ctorParameters=function(){return[{type:Sf},{type:Jf}]};var Xd=function(){function r(e,t,n){var i=this;g(this,r),this.model=e,this.view=t,this.bag=n,this.column=null,this.pathFinder=new Hh(this.bag.head),this.x=-1,this.y=-1,e.sceneChanged.watch(function(e){if(e.hasChanges("status"))switch(e.state.status){case"start":i.highlight(null);break;case"stop":if(0<=i.x&&0<=i.y){var t=document.elementFromPoint(i.x,i.y);if(t){var n=Kh(t),r=i.pathFinder.cell(n);if(r)return void i.highlight(r.column)}i.highlight(null)}}})}return h(r,[{key:"onMouseMove",value:function(e){if(this.x=e.clientX,this.y=e.clientY,"stop"===this.model.scene().status){var t=this.pathFinder.cell(Yh(e));t&&this.highlight(t.column)}}},{key:"onMouseLeave",value:function(){this.x=-1,this.y=-1,this.highlight(null)}},{key:"highlight",value:function(e){var t=this.view.highlight;t.column.canExecute(e)&&this.column!==e&&(this.column&&t.column.execute(this.column,!1),(this.column=e)&&t.column.execute(this.column,!0))}}]),r}(),eg=function(e){function a(e,t,n,r,i){g(this,a);var o=m(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return o.$view=e,o.$table=t,o.root=n,o.element=r,o.zone=i,o}return c(a,Ys),h(a,[{key:"ngOnInit",value:function(){var e=this.element.nativeElement,t=new Xd(this.root.model,this.$view,this.root.bag),n=new Pf(e,new Af(this));this.zone.runOutsideAngular(function(){n.on("mousemove",function(e){return t.onMouseMove(e)}),n.on("mouseleave",function(e){return t.onMouseLeave(e)})})}},{key:"columnId",value:function(e,t){return t.model.key}},{key:"rowId",value:function(e){return e}}]),a}();eg.decorators=[{type:u.Component,args:[{selector:"thead[q-grid-core-head]",template:'<tr *ngFor="let $row of $view.head.rows; trackBy: rowId; index as $rowIndex" [q-grid-core-trh]="$row" [q-grid-core-index]="$rowIndex" q-grid-core-source="head"> <th *ngFor="let $column of $view.head.columns($row, $table.pin); trackBy: columnId; index as $columnIndex" [attr.rowspan]="$column.rowspan" [attr.colspan]="$column.colspan" [q-grid-drag]="$view.head.drag" [q-grid-drag-data]="$column.model.key" q-grid-drop-area="head" q-grid-resize-path="columns" [q-grid-resize]="$column.model.key" [q-grid-can-resize]="$view.head.resize.canExecute"> <ng-container [q-grid-core-th]="$column"> </ng-container> </th> </tr>'}]}],eg.ctorParameters=function(){return[{type:Sf},{type:Jf},{type:ac},{type:u.ElementRef},{type:u.NgZone}]};var tg=function(){function t(e){g(this,t),this.layerService=e}return h(t,[{key:"isActive",get:function(){return 0<this.layerService.count}}]),t}();tg.decorators=[{type:u.Component,args:[{selector:"q-grid-core-layer",template:'<div *ngIf="isActive" class="q-grid-layer"> <ng-container q-grid-core-layer></ng-container> </div>'}]}],tg.ctorParameters=function(){return[{type:hc}]};var ng=function e(t,n){g(this,e),t.init(n)};ng.decorators=[{type:u.Directive,args:[{selector:"[q-grid-core-layer]"}]}],ng.ctorParameters=function(){return[{type:hc},{type:u.ViewContainerRef}]};var rg=function(){function r(e,t,n){g(this,r),this.root=e,this.element=t,this.table=n,this.name=""}return h(r,[{key:"ngOnInit",value:function(){this.root.markup[this.getName()]=this.element.nativeElement}},{key:"ngOnDestroy",value:function(){delete this.root.markup[this.getName()]}},{key:"getName",value:function(){return this.table&&this.table.pin?this.name+"-"+this.table.pin:this.name}}]),r}();rg.decorators=[{type:u.Directive,args:[{selector:"[q-grid-markup]"}]}],rg.ctorParameters=function(){return[{type:ac},{type:u.ElementRef},{type:Jf}]},rg.propDecorators={name:[{type:u.Input,args:["q-grid-markup"]}]};var ig=function(){function r(e,t,n){g(this,r),this.root=e,this.table=t,this.$view=n,this.pin=null}return h(r,[{key:"ngOnInit",value:function(){this.pin||(this.pin=null),this.table.pin=this.pin}},{key:"visibility",get:function(){return this.model.visibility()}},{key:"model",get:function(){return this.root.model}}]),r}();ig.decorators=[{type:u.Component,args:[{selector:"q-grid-core-table",template:'<table q-grid-markup="table"> <thead *ngIf="visibility.head" q-grid-core-head q-grid-markup="head" q-grid-animate="false" q-grid-drop-area="head" [q-grid-drop]="$view.head.drop" q-grid-drag-direction="x" [q-grid-drag-over]="$view.head.drop"> </thead> <tbody *ngIf="visibility.pin.top" class="q-grid-body-top" pin="top" q-grid-core-body q-grid-markup="body-top" q-grid-animate="false" tabindex="0" q-grid-drop-area="body" [q-grid-drop]="$view.row.drop" q-grid-drag-direction="y" [q-grid-drag-over]="$view.row.drop"> </tbody> <tbody *ngIf="visibility.body" q-grid-core-body q-grid-markup="body" q-grid-animate="false" tabindex="0" q-grid-drop-area="body" [q-grid-drop]="$view.row.drop" q-grid-drag-direction="y" q-grid-vscroll [q-grid-vscroll-port-y]="$view.scroll.y" [q-grid-drag-over]="$view.row.drop"> </tbody> <tbody *ngIf="visibility.pin.bottom" class="q-grid-body-bottom" pin="bottom" q-grid-core-body q-grid-markup="body-bottom" q-grid-animate="false" tabindex="0" q-grid-drop-area="body" [q-grid-drop]="$view.row.drop" q-grid-drag-direction="y" [q-grid-drag-over]="$view.row.drop"> </tbody> <tfoot *ngIf="visibility.foot" q-grid-core-foot q-grid-markup="foot" q-grid-animate="false"> </tfoot> </table>',providers:[Jf]}]}],ig.ctorParameters=function(){return[{type:ac},{type:Jf},{type:Sf}]},ig.propDecorators={pin:[{type:u.Input}]};var og=JSON.stringify,ag=Object.prototype.toString,lg=function(){function e(){g(this,e)}return h(e,null,[{key:"classify",value:function(e,t){e.classList.add(ec(_a+"-"+t.key)),e.classList.add(ec(_a+"-the-"+t.key)),e.classList.add(ec(_a+"-"+t.type)),t.editor&&e.classList.add(ec(_a+"-"+t.editor))}},{key:"viewMode",value:function(e){e.classList.remove(_a+"-edit")}},{key:"editMode",value:function(e){e.classList.add(_a+"-edit")}},{key:"stringify",value:function(e){if(null==e)return"";switch(void 0===e?"undefined":f(e)){case"string":break;case"number":e=""+e;break;default:e=!L((t=e).toString)||t.toString===ag||M(e)||Jt(e)?og(e):e.toString()}var t;return e}}]),e}(),ug=lg.classify,sg=function(){function t(e){g(this,t),this.element=e}return h(t,[{key:"ngOnInit",value:function(){ug(this.element.nativeElement,this.columnView.model)}}]),t}();sg.decorators=[{type:u.Directive,args:[{selector:"[q-grid-core-td-align]"}]}],sg.ctorParameters=function(){return[{type:u.ElementRef}]},sg.propDecorators={columnView:[{type:u.Input,args:["q-grid-core-td-align"]}]};var cg=function(){function r(e,t,n){g(this,r),this.$view=e,this.root=t,this.element=n.nativeElement}return h(r,[{key:"ngOnInit",value:function(){this.root.bag[this.source].addRow(this)}},{key:"ngOnDestroy",value:function(){this.root.bag[this.source].deleteRow(this)}},{key:"index",get:function(){return this.$view.scroll.y.container.position+this.viewIndex}}]),r}();cg.decorators=[{type:u.Directive,args:[{selector:"[q-grid-core-tr]"}]}],cg.ctorParameters=function(){return[{type:Sf},{type:ac},{type:u.ElementRef}]},cg.propDecorators={viewIndex:[{type:u.Input,args:["q-grid-core-index"]}],model:[{type:u.Input,args:["q-grid-core-tr"]}],source:[{type:u.Input,args:["q-grid-core-source"]}]};var hg=function(){function t(e){g(this,t),this.templateService=e,this.commits=new Map}return h(t,[{key:"build",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"view";if("pad"===t.type)return No;var r=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"view",r=t.key;return e+"-"+n+"-cell-"+t.type+"-of-"+t.itemType+"-the-"+r+".tpl.html"}(e,t,n),i=this.commits,o=i.get(t.key);if(o)return o;var a=this.templateService,l=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"view",r=t.key,i=t.type,o=t.itemType;switch(n){case"view":var a=[e+"-cell-"+i+"-the-"+r+".tpl.html",e+"-cell-the-"+r+".tpl.html",e+"-cell-"+i+".tpl.html",e+"-cell.tpl.html",e+"-cell-text.tpl.html"];return o&&a.splice.apply(a,[0,0].concat([e+"-cell-"+i+"-of-"+o+"-the-"+r+".tpl.html",e+"-cell-"+i+"-of-"+o+".tpl.html"])),a;case"edit":var l=[n+"-cell-"+(i=t.editor||i)+"-the-"+r+".tpl.html",n+"-cell-the-"+r+".tpl.html",n+"-cell-"+i+".tpl.html",n+"-cell.tpl.html",n+"-cell-text.tpl.html"];return o&&l.splice.apply(l,[0,0].concat([n+"-cell-"+i+"-of-"+o+"-the-"+r+".tpl.html",n+"-cell-"+i+"-of-"+o+".tpl.html"])),l;default:throw new Xo("cell.service","Invalid mode '"+n+"'")}}(e,t,n),u=a.find(l);if(!u)throw new Xo("cell.service","Can't find template for "+l[0]);return o=function(e,t){e.clear(),a.viewFactory(t)(u,e)},i.set(r,o),o}}]),t}();hg.decorators=[{type:u.Injectable}],hg.ctorParameters=function(){return[{type:cc}]};var fg=lg.classify,dg=function(){function a(e,t,n,r,i,o){g(this,a),this.$view=e,this.root=t,this.viewContainerRef=n,this.cellService=r,this.tr=i,(this.$implicit=this).element=null,this.element=o.nativeElement.parentNode}return h(a,[{key:"ngOnInit",value:function(){this.root.bag.body.addCell(this),fg(this.element,this.column),this.mode("init")}},{key:"mode",value:function(e){switch(e){case"view":case"init":this.cellService.build("body",this.column,"view")(this.viewContainerRef,this),"init"!==e&&this.element.classList.remove(_a+"-edit");break;case"edit":this.cellService.build("body",this.column,"edit")(this.viewContainerRef,this),this.element.classList.add(_a+"-edit");break;default:throw new Xo("td.core","Invalid mode "+e)}}},{key:"ngOnDestroy",value:function(){this.root.bag.body.deleteCell(this)}},{key:"value",get:function(){var e=this.column,t=this.row,n=this.rowIndex,r=this.columnIndex;return this.$view.body.render.getValue(t,e,n,r)},set:function(e){var t=this.column,n=this.row,r=this.rowIndex,i=this.columnIndex;this.$view.body.render.setValue(n,t,e,r,i)}},{key:"label",get:function(){var e=this.column,t=this.row,n=this.rowIndex,r=this.columnIndex;return this.$view.body.render.getLabel(t,e,n,r)},set:function(e){var t=this.column,n=this.row,r=this.rowIndex,i=this.columnIndex;this.$view.body.render.setLabel(n,t,e,r,i)}},{key:"column",get:function(){return this.columnView.model}},{key:"columnIndex",get:function(){return this.columnView.columnIndex}},{key:"row",get:function(){return this.tr.model}},{key:"rowIndex",get:function(){return this.tr.index}}]),a}();dg.decorators=[{type:u.Directive,args:[{selector:"[q-grid-core-td]"}]}],dg.ctorParameters=function(){return[{type:Sf},{type:ac},{type:u.ViewContainerRef},{type:hg},{type:cg},{type:u.ElementRef}]},dg.propDecorators={columnView:[{type:u.Input,args:["q-grid-core-td"]}]};var gg=function(){function n(e,t){g(this,n),this.templateService=e,this.viewContainerRef=t,this.key="",this.context=null}return h(n,[{key:"ngDoCheck",value:function(){if(!this.viewRef){var e=this.templateService.find(this.key);if(e){var t=this.templateService.viewFactory(this.context);this.viewRef=t(e,this.viewContainerRef)}}}}]),n}();gg.decorators=[{type:u.Directive,args:[{selector:"ng-container[key]"}]}],gg.ctorParameters=function(){return[{type:cc},{type:u.ViewContainerRef}]},gg.propDecorators={key:[{type:u.Input}],context:[{type:u.Input}]};var mg=function e(t,n){g(this,e),this.template=t,this.context=n};var pg=function(){function n(e,t){g(this,n),this.templateLink=e,this.templateRef=t,this.key="",this.context={}}return h(n,[{key:"ngOnInit",value:function(){var e=new mg(this.templateRef,this.context);this.templateLink.put(this.key,e)}}]),n}();pg.decorators=[{type:u.Directive,args:[{selector:"ng-template[key]"}]}],pg.ctorParameters=function(){return[{type:uc},{type:u.TemplateRef}]},pg.propDecorators={key:[{type:u.Input}],context:[{type:u.Input}]};var vg=function(){function r(e,t,n){g(this,r),this.templateCache=e,this.templateRef=t,this.templateHost=n,this.key="",this.context={}}return h(r,[{key:"ngOnInit",value:function(){var e=new mg(this.templateRef,this.context);this.templateHost?this.templateCache.put(this.templateHost.key(this.key),e):this.templateCache.put(this.key,e)}}]),r}();vg.decorators=[{type:u.Directive,args:[{selector:"ng-template[for]"}]}],vg.ctorParameters=function(){return[{type:sc},{type:u.TemplateRef},{type:Df,decorators:[{type:u.Optional}]}]},vg.propDecorators={key:[{type:u.Input,args:["for"]}],context:[{type:u.Input}]};var yg=function e(){g(this,e)};yg.decorators=[{type:u.NgModule,args:[{declarations:[gg,pg,vg],exports:[gg,pg,vg]}]}];var xg=function(){function r(e,t,n){g(this,r),this.$view=e,this.root=t,this.element=n.nativeElement}return h(r,[{key:"ngOnInit",value:function(){this.root.bag[this.source].addRow(this)}},{key:"ngOnDestroy",value:function(){this.root.bag[this.source].deleteRow(this)}}]),r}();xg.decorators=[{type:u.Directive,args:[{selector:"[q-grid-core-trh]"}]}],xg.ctorParameters=function(){return[{type:Sf},{type:ac},{type:u.ElementRef}]},xg.propDecorators={index:[{type:u.Input,args:["q-grid-core-index"]}],model:[{type:u.Input,args:["q-grid-core-trh"]}],source:[{type:u.Input,args:["q-grid-core-source"]}]};var wg=lg.classify,bg=function(){function a(e,t,n,r,i,o){g(this,a),this.$view=e,this.root=t,this.cellService=n,this.viewContainerRef=r,this.tr=i,this.element=null,(this.$implicit=this).element=o.nativeElement.parentNode}return h(a,[{key:"ngOnInit",value:function(){var e=this.column,t=this.element;this.root.bag.foot.addCell(this),wg(t,e),this.cellService.build("foot",this.column)(this.viewContainerRef,this)}},{key:"mode",value:function(e){throw new Xo("tf-core.directive",e+" mode is not supported")}},{key:"ngOnDestroy",value:function(){this.root.bag.foot.deleteCell(this)}},{key:"value",get:function(){var e=this.column;return this.$view.foot.value(e)}},{key:"label",get:function(){return this.label}},{key:"column",get:function(){return this.columnView.model}},{key:"columnIndex",get:function(){return this.columnView.columnIndex}},{key:"row",get:function(){return this.tr.model}},{key:"rowIndex",get:function(){return this.tr.index}}]),a}();bg.decorators=[{type:u.Directive,args:[{selector:"[q-grid-core-tf]"}]}],bg.ctorParameters=function(){return[{type:Sf},{type:ac},{type:hg},{type:u.ViewContainerRef},{type:xg},{type:u.ElementRef}]},bg.propDecorators={columnView:[{type:u.Input,args:["q-grid-core-tf"]}]};var kg=function(){function e(){g(this,e)}return h(e,null,[{key:"classify",value:function(e,t){t.canEdit&&e.classList.add(ec(_a+"-can-edit")),t.canResize&&e.classList.add(ec(_a+"-can-resize")),t.canSort&&e.classList.add(ec(_a+"-can-sort")),t.canMove&&e.classList.add(ec(_a+"-can-move")),t.canFilter&&e.classList.add(ec(_a+"-can-filter")),t.canHighlight&&e.classList.add(ec(_a+"-can-highlight"))}}]),e}(),Cg=lg.classify,qg=kg.classify,Og=function(){function a(e,t,n,r,i,o){g(this,a),this.$view=e,this.root=t,this.viewContainerRef=n,this.cellService=r,this.tr=i,this.element=null,(this.$implicit=this).element=o.nativeElement.parentNode}return h(a,[{key:"ngOnInit",value:function(){var e=this.column,t=this.element;this.root.bag.head.addCell(this),Cg(t,e),qg(t,e);var n=e,r="head";if("filter-row"===e.type){var i=e.model;Cg(t,i),r="filter",n=i}this.cellService.build(r,n,"view")(this.viewContainerRef,this)}},{key:"mode",value:function(e){throw new Xo("th-core.directive",e+" mode is not supported")}},{key:"ngOnDestroy",value:function(){this.root.bag.head.deleteCell(this)}},{key:"column",get:function(){return this.columnView.model}},{key:"columnIndex",get:function(){return this.columnView.columnIndex}},{key:"row",get:function(){return this.tr.model}},{key:"rowIndex",get:function(){return this.tr.index}}]),a}();Og.decorators=[{type:u.Directive,args:[{selector:"[q-grid-core-th]"}]}],Og.ctorParameters=function(){return[{type:Sf},{type:ac},{type:u.ViewContainerRef},{type:hg},{type:xg},{type:u.ElementRef}]},Og.propDecorators={columnView:[{type:u.Input,args:["q-grid-core-th"]}]};var _g=function(){function e(){g(this,e)}return h(e,[{key:"ngOnInit",value:function(){}}]),e}();_g.decorators=[{type:u.Component,args:[{selector:"q-grid-core-toolbar",template:'<ng-container key="toolbar-{{position}}.tpl.html"></ng-container>'}]}],_g.ctorParameters=function(){return[]},_g.propDecorators={position:[{type:u.Input}]};var Ig=function(){function r(e,t,n){g(this,r),this.model=e,this.view=t,this.watch(n),this.ticking=!1}return h(r,[{key:"invalidate",value:function(){var n=this;if(!this.ticking){var r=this.view.style;if(r.needInvalidate()){this.ticking=!0;var i=r.monitor.row,o=r.monitor.cell;qa.mutate(function(){qa.mutate(function(){var e=o.enter(),t=i.enter();try{r.invalidate(e,t)}finally{n.ticking=!1,i.exit(),o.exit()}})})}}}},{key:"triggerLine",value:function(i,e){var o=Hs(e),a=this.model,l=a.pipe().reduce,u=[];return function(t,n,e){var r;a.scene({status:"start"},{source:t}),(r=u).push.apply(r,b(e)),o(function(){var e=l(u,a);u=[],e.forEach(function(e){return i.invalidate({source:t,changes:n,pipe:e,why:e.why||"refresh"})})})}}},{key:"watch",value:function(e){var a=this.triggerLine(e,10),t=this.model,l=t.pipe().triggers,n=t.data().pipe;n!==Vu.default&&a("grid",{},[n]),Object.keys(l).forEach(function(o){return t[o+"Changed"].watch(function(e){if("core"!==e.tag.behavior){var t=[],n=l[o];for(var r in e.changes){var i=n[r];i&&t.push(i)}0<t.length&&a(e.tag.source||o,e.changes,t)}})})}}]),r}(),Eg=function(e){function l(e,t,n,r,i,o){g(this,l);var a=m(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return a.root=e,a.view=t,a.grid=n,a.zone=r,a.elementRef=i,a.cd=o,r.onStable.subscribe(function(){if(a.root.isReady){var e=a.model.scene;"push"===e().status&&(e({status:"stop"},{source:"grid.component",behavior:"core"}),a.ctrl.invalidate())}}),a}return c(l,Ys),h(l,[{key:"ngDoCheck",value:function(){"stop"===this.model.scene().status&&this.ctrl.invalidate()}},{key:"ngOnInit",value:function(){var t=this,n=this.model,e=this.root,r=this.view;e.markup.view=this.elementRef.nativeElement,r.init(n,e.table,e.commandManager);var i=this.grid.service(n);this.ctrl=new Ig(n,r,i),n.sceneChanged.watch(function(e){e.hasChanges("status")&&"pull"===e.state.status&&(t.cd.markForCheck(),t.zone.run(function(){return n.scene({status:"push"},{source:"view-core.component",behavior:"core"})}))});var o=this.root.table.body;o.requestInvalidate&&o.requestInvalidate.on(function(){return t.ctrl.invalidate()})}},{key:"model",get:function(){return this.root.model}},{key:"visibility",get:function(){return this.model.visibility()}}]),l}();Eg.decorators=[{type:u.Component,args:[{selector:"q-grid-core-view",template:'<q-grid-core-layer></q-grid-core-layer> <q-grid-core-table *ngIf="visibility.pin.left" pin="left" class="q-grid-table q-grid-table-left layout-column"> </q-grid-core-table> <q-grid-core-table class="q-grid-table q-grid-table-center layout-column flex"> </q-grid-core-table> <q-grid-core-table *ngIf="visibility.pin.right" pin="right" class="q-grid-table q-grid-table-right layout-column"> </q-grid-core-table> <q-grid-cell-handler class="q-grid-cell-handler"></q-grid-cell-handler>',providers:[hg]}]}],Eg.ctorParameters=function(){return[{type:ac},{type:Sf},{type:Qc},{type:u.NgZone},{type:u.ElementRef},{type:u.ChangeDetectorRef}]};var zg=function e(){g(this,e)};zg.decorators=[{type:u.NgModule,args:[{declarations:[Qf,ed,Qd,eg,tg,ng,rg,ig,sg,dg,bg,Og,_g,cg,xg,Eg],exports:[Eg,_g],imports:[yg,n.CommonModule,Jd],providers:[jf,sc,cc]}]}];var Rg=function e(t){g(this,e),(this.templateHost=t).key=function(e){return"toolbar-"+e+".tpl.html"}};Rg.decorators=[{type:u.Component,args:[{selector:"q-grid-toolbar",template:"<ng-content></ng-content>",providers:[Df],changeDetection:u.ChangeDetectionStrategy.OnPush}]}],Rg.ctorParameters=function(){return[{type:Df}]};var jg=function(e){function r(e,t){g(this,r);var n=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return n.models=["row"],t.key=function(e){return"body-cell-row-"+e+".tpl.html"},n}return c(r,Bf),r}();jg.decorators=[{type:u.Component,args:[{selector:"q-grid-row",template:"<ng-content></ng-content>",providers:[Df],changeDetection:u.ChangeDetectionStrategy.OnPush}]}],jg.ctorParameters=function(){return[{type:ac},{type:Df}]},jg.propDecorators={rowMode:[{type:u.Input,args:["mode"]}],rowUnit:[{type:u.Input,args:["unit"]}],rowCanMove:[{type:u.Input,args:["canMove"]}],rowCanResize:[{type:u.Input,args:["canResize"]}],rowHeight:[{type:u.Input,args:["height"]}]};var Sg=function e(t){g(this,e),(this.templateHost=t).key=function(e){return"layer-"+e+".tpl.html"}};Sg.decorators=[{type:u.Component,args:[{selector:"q-grid-layer",template:"<ng-content></ng-content>",providers:[Df],changeDetection:u.ChangeDetectionStrategy.OnPush}]}],Sg.ctorParameters=function(){return[{type:Df}]};var Pg=function(){function n(e,t){g(this,n),this.root=e,this.element=t,this.name=""}return h(n,[{key:"ngOnInit",value:function(){this.root.markup[this.name]=this.element.nativeElement}},{key:"ngOnDestroy",value:function(){delete this.root.markup[this.name]}}]),n}();Pg.decorators=[{type:u.Directive,args:[{selector:"[q-grid-markup]"}]}],Pg.ctorParameters=function(){return[{type:ac},{type:u.ElementRef}]},Pg.propDecorators={name:[{type:u.Input,args:["q-grid-markup"]}]};var Ag=function e(){g(this,e)};Ag.decorators=[{type:u.NgModule,args:[{declarations:[Tf,Wf,Uf,$f,Rg,jg,Sg,Pg],exports:[Tf,Uf,$f,Wf,Rg,jg,Sg,Jd],imports:[zg,n.CommonModule,Jd],providers:[Qc]}]}],Ag.ctorParameters=function(){return[]};var Lg=function(){function t(e){g(this,t),this.plugin=e,this.shortcutOff=null,this.context={$implicit:this}}return h(t,[{key:"ngOnInit",value:function(){var i=this,o=this.plugin.model;o.actionChanged.watch(function(e){if(e.hasChanges("items")){i.shortcutOff&&(i.shortcutOff(),i.shortcutOff=null);var t=o.action(),n=t.shortcut,r=t.manager;i.shortcutOff=n.register(r,e.state.items.map(function(e){return e.command}))}})}},{key:"ngOnDestroy",value:function(){this.shortcutOff&&(this.shortcutOff(),this.shortcutOff=null)}},{key:"actions",get:function(){return this.plugin.model.action().items}}]),t}();Lg.decorators=[{type:u.Component,args:[{selector:"q-grid-action-bar",template:'<ng-container key="plugin-action-bar.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],Lg.ctorParameters=function(){return[{type:Jc}]};var Mg=function e(t){g(this,e),this.plugin=t};Mg.decorators=[{type:u.Component,args:[{selector:"q-grid-actions",template:"",providers:[Jc],changeDetection:u.ChangeDetectionStrategy.OnPush}]}],Mg.ctorParameters=function(){return[{type:Jc}]};var Tg=function(){function t(e){g(this,t),this.plugin=e,this.action=null,this.context={$implicit:this}}return h(t,[{key:"execute",value:function(){var e=this.action;if(!e)throw new Xo("action-core.component","Action shoud be setup");return e.command.execute()}},{key:"canExecute",value:function(){var e=this.action;if(!e)throw new Xo("action-core.component","Action should be setup");return e.command.canExecute()}},{key:"model",get:function(){return this.plugin.model}},{key:"shortcut",get:function(){var e=this.action;if(!e)throw new Xo("action-core.component","Action should be setup");return e.command.shortcut}},{key:"title",get:function(){var e=this.action;if(!e)throw new Xo("action-core.component","Action should be setup");var t=this.shortcut;return e.title+(t?" ("+t.toUpperCase()+")":"")}},{key:"icon",get:function(){var e=this.action;if(!e)throw new Xo("action-core.component","Action shoud be setup");return e.icon}},{key:"templateUrl",get:function(){var e=this.action;if(!e)throw new Xo("action-core.component","Action should be setup");return e.templateUrl}}]),t}();Tg.decorators=[{type:u.Component,args:[{selector:"q-grid-action-core",template:'<ng-container key="plugin-action-core.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],Tg.ctorParameters=function(){return[{type:Jc}]},Tg.propDecorators={action:[{type:u.Input}]};var Dg=function(){function r(e,t){var n=this;g(this,r),this.plugin=e,this.id=null,this.title=null,this.icon=null,this.command=null,t.key=function(e){return"action-"+e+"-"+n.id+".tpl.html"}}return h(r,[{key:"execute",value:function(){return this.command&&this.command.execute()}},{key:"canExecute",value:function(){return this.command&&this.command.canExecute()}},{key:"ngOnInit",value:function(){var e=this.model,t=!!this.command,n=t?this.command:new Ea,r=new fc(n,this.title,this.icon);r.id=this.id;var i=Array.from(e.action().items);if(i.push(r),e.action({items:i},{source:"action.component"}),!t){if(!this.id)throw new Xo("action.component","Command or id property is missed");r.templateUrl="action-trigger-"+this.id+".tpl.html"}}},{key:"model",get:function(){return this.plugin.model}}]),r}();Dg.decorators=[{type:u.Component,args:[{selector:"q-grid-action",template:"",changeDetection:u.ChangeDetectionStrategy.OnPush,providers:[Df]}]}],Dg.ctorParameters=function(){return[{type:Jc},{type:Df}]},Dg.propDecorators={id:[{type:u.Input}],title:[{type:u.Input}],icon:[{type:u.Input}],command:[{type:u.Input}]};var Ng=function e(){g(this,e)};function Fg(r){if(I(r)){var e=Object.keys(r).map(function(e){return{key:e,value:Zo(e)}});switch(e.length){case 0:return Fo;case 1:var t=e[0],n=r[t.key];if(!n)return Fo;var i=new RegExp(n,"gi");return function(e){return i.test(t.value(e))};default:return function(n){return e.reduce(function(e,t){return e&&new RegExp(r[t.key],"gi").test(t.value(n))||""===r[t.key]},!0)}}}var o=Go(r),a=new RegExp(o,"gi");return function(e){return a.lastIndex=0,a.test(e)}}Ng.decorators=[{type:u.NgModule,args:[{declarations:[Lg,Mg,Dg,Tg],exports:[Lg,Mg,Dg,Tg],imports:[yg]}]}];var Vg=function(){function n(e,t){g(this,n),this.plugin=e,this.view=t,this.options=[],this.context={$implicit:this}}return h(n,[{key:"filter",value:function(e){var t=Fg(e);this.options=this.items.filter(function(e){return t(e)})}},{key:"reset",value:function(){this.options=[]}},{key:"items",get:function(){return this.cell.fetch.result}},{key:"title",get:function(){return this.cell.column.title}},{key:"value",get:function(){return this.cell.value},set:function(e){this.cell.value=e}},{key:"cell",get:function(){return this.view.edit.cell}}]),n}();Vg.decorators=[{type:u.Component,args:[{selector:"q-grid-autocomplete-editor",template:'<ng-container key="plugin-autocomplete-editor.tpl.html" [context]="context"></ng-container>',providers:[Jc]}]}],Vg.ctorParameters=function(){return[{type:Jc},{type:Sf}]};var $g=function e(){g(this,e)};$g.decorators=[{type:u.NgModule,args:[{declarations:[Vg],exports:[Vg],imports:[yg]}]}];var Bg=function e(r){var i=this;g(this,e),this.closeEvent=new ua;var o=r.element,t=new Pf(o,new Af(this));t.on("mouseup",function(e){if(Gf(e,1)||Gf(e,2)){if(e.stopPropagation(),o.remove(),!1!==r.propagate){var t=document.elementFromPoint(e.clientX,e.clientY),n=document.createEvent("MouseEvents");n.initEvent("mouseup",!0,!0),t.dispatchEvent(n)}i.closeEvent.emit(e)}}),t.on("keydown",function(e){return r.onKeyDown({$event:e})})},Ug=function(){function i(e,t){var n=this;g(this,i),this.backdropService=e,this.closeEvent=new u.EventEmitter,this.context={$implicit:this};var r={element:(e.element=t).nativeElement,onKeyDown:function(){},propagate:!1};new Bg(r).closeEvent.on(function(){return n.closeEvent.emit()})}return h(i,[{key:"ngOnDestroy",value:function(){this.backdropService.element=null}}]),i}();Ug.decorators=[{type:u.Component,args:[{selector:"q-grid-backdrop",template:'<ng-container key="plugin-backdrop.tpl.html" [context]="context"></ng-container> ',changeDetection:u.ChangeDetectionStrategy.OnPush}]}],Ug.ctorParameters=function(){return[{type:xd},{type:u.ElementRef}]},Ug.propDecorators={template:[{type:u.ContentChild,args:[u.TemplateRef]}],closeEvent:[{type:u.Output,args:["close"]}]};var Hg=function(){function n(e,t){g(this,n),this.zone=e,this.document=t,this.selector="",this.close=new u.EventEmitter}return h(n,[{key:"backdropHost",set:function(e){var t=this;e?(this.backdrop=this.document.createElement("div"),this.backdrop.classList.add("q-grid-backdrop"),this.backdrop.style.zIndex="1000",this.backdrop.addEventListener("click",function(){t.zone.runOutsideAngular(function(){t.close.emit(),t.backdrop.remove(),t.backdrop=null})}),this.zone.runOutsideAngular(function(){var e=document.querySelector(t.selector);e.style.zIndex="1001",e.parentElement.appendChild(t.backdrop)})):this.backdrop&&(this.backdrop.remove(),this.backdrop=null)}}]),n}();Hg.decorators=[{type:u.Directive,args:[{selector:"[q-grid-backdrop]"}]}],Hg.ctorParameters=function(){return[{type:u.NgZone},{type:void 0,decorators:[{type:u.Inject,args:[n.DOCUMENT]}]}]},Hg.propDecorators={selector:[{type:u.Input,args:["q-grid-backdrop-selector"]}],close:[{type:u.Output,args:["q-grid-backdrop"]}],backdropHost:[{type:u.Input,args:["q-grid-backdrop-active"]}]};var Wg=function e(){g(this,e)};Wg.decorators=[{type:u.NgModule,args:[{declarations:[Ug,Hg],exports:[Ug,Hg],imports:[yg]}]}];var Gg=function(){function e(){g(this,e),this.autofocus=!1,this.valueChange=new u.EventEmitter,this.context={$implicit:this}}return h(e,[{key:"ngOnInit",value:function(){var e=this;this.autofocus&&"click"===this.column.editorOptions.trigger&&Promise.resolve(null).then(function(){return e.value=e.value===e.trueValue?e.falseValue:e.trueValue})}},{key:"isIndeterminate",value:function(){return this.column.isIndeterminate(this.value)}},{key:"value",get:function(){return this.state},set:function(e){e!==this.value&&(this.state=e,this.valueChange.emit(e))}},{key:"isChecked",get:function(){return this.column.isChecked(this.value)},set:function(e){this.value=e?this.trueValue:this.falseValue}},{key:"trueValue",get:function(){return this.column.trueValue}},{key:"falseValue",get:function(){return this.column.falseValue}}]),e}();Gg.decorators=[{type:u.Component,args:[{selector:"q-grid-bool-editor",template:'<ng-container key="plugin-bool-editor.tpl.html" [context]="context"></ng-container> '}]}],Gg.ctorParameters=function(){return[]},Gg.propDecorators={autofocus:[{type:u.Input}],column:[{type:u.Input}],label:[{type:u.Input}],valueChange:[{type:u.Output}],value:[{type:u.Input}]};var Kg=function e(){g(this,e)};Kg.decorators=[{type:u.NgModule,args:[{declarations:[Gg],exports:[Gg],imports:[yg]}]}];var Yg=function(){function t(e){g(this,t),this.plugin=e,this.context={$implicit:this}}return h(t,[{key:"value",get:function(){var e=this.plugin.model.grid(),t=e.caption,n=e.title;return t||n}}]),t}();Yg.decorators=[{type:u.Component,args:[{selector:"q-grid-caption",template:'<ng-container key="plugin-caption.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],Yg.ctorParameters=function(){return[{type:Jc}]};var Zg=function e(){g(this,e)};Zg.decorators=[{type:u.NgModule,args:[{declarations:[Yg],exports:[Yg],imports:[yg]}]}];var Jg=function(){function e(){g(this,e),this.closeEvent=new u.EventEmitter,this.context={$implicit:this}}return h(e,[{key:"close",value:function(){this.closeEvent.emit()}}]),e}();Jg.decorators=[{type:u.Component,args:[{selector:"q-grid-cell-editor",template:'<ng-container key="plugin-cell-editor.tpl.html" [context]="context"></ng-container> '}]}],Jg.propDecorators={template:[{type:u.ContentChild,args:[u.TemplateRef]}],closeEvent:[{type:u.Output,args:["close"]}]};var Qg=function e(){g(this,e)};Qg.decorators=[{type:u.NgModule,args:[{declarations:[Jg],exports:[Jg],imports:[yg]}]}];var Xg=function(){function o(t,e){var h=this;g(this,o),this.model=t,this.context=e,this.cancelEvent=new ua,this.submitEvent=new ua,this.dropEvent=new ua;var n=function(){var e=t.columnList().index;h.tree=Yl([e],function(e,t,n){var r=e.key.model,i={key:r.key,title:r.title,isVisible:r.isVisible,canMove:r.canMove,aggregation:r.aggregation};if(n){var o=Xl(e);return o.value={column:i,isVisible:"data"===r.class||"cohort"===r.class},t.children.push(o),o}return t.value={column:i,isVisible:!0},t},Xl(e)),i()},r=$o,i=function(){h.listView=[],h.treeView=r(h.tree),Yl([h.treeView],function(e){e.value.isVisible&&h.listView.push(e.value.column)})};this.search=function(e){var t=(""+e).toLowerCase();r=t?function(e){return Zl(e,function(e){return 0<=e.value.column.title.toLowerCase().indexOf(t)})}:$o,i()},n();this.toggle=new Ea({source:"column.chooser",canExecute:function(e){return e.value.isVisible},execute:function(e){return function t(e,n){var r=e.children;e.value.column.isVisible=n,r.length&&r.forEach(function(e){return t(e,n)})}(e,!h.state(e))}}),this.toggleAll=new Ea({source:"column.chooser",execute:function(){var e=!h.stateAll(),t=!0,n=!1,r=void 0;try{for(var i,o=h.listView[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.isVisible=e}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}}),this.defaults=new Ea({source:"column.chooser",execute:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=h.listView[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var o=r.value;o.isVisible=!1!==o.isDefault}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}}}),this.toggleAggregation=new Ea({source:"column.chooser"}),this.drop=new Ea({source:"column.chooser",canExecute:function(e){var t=e.dropData;return t&&t.value.column.canMove},execute:function(e){switch(e.action){case"over":var t=e.dragData,n=e.dropData;if(t!==n){var r=h.tree,i=Ql(r,function(e){return e===t}),o=Ql(r,function(e){return e===n});if(i&&o&&o.path.indexOf(i.node)<0){var a=i.path.reverse(),l=a.findIndex(function(e){return 1<e.children.length});if(0<=l){var u=a[l],s=a[l-1]||i.node,c=u.children.indexOf(s);u.children.splice(c,1),o.parent.children.splice(o.index,0,s),s.level=o.parent.level+1,Yl(s.children,function(e,t,n){e.level=(t||n).level+1},s),h.dropEvent.emit()}}}}}}),this.drag=new Ea({source:"column.chooser",canExecute:function(e){var t=e.data;return t&&t.value.column.canMove}}),this.submit=new Ea({source:"column.chooser",execute:function(){var e=h.model,t=Yl([h.tree],function(e,t,n){if(n){var r=Xl(e);t.children.push(r);var i=e.value,o=i.isVisible,a=i.column;if(o){var l=r.key.model;l.isVisible=a.isVisible,l.aggregation=a.aggregation}return r.value=null,r}return t.value=null,t},Xl(h.tree));e.columnList({index:t},{source:"column.chooser.view"}),h.submitEvent.emit()}}),this.cancel=new Ea({source:"column.chooser",execute:function(){return h.cancelEvent.emit()}}),this.reset=new Ea({source:"column.chooser",execute:function(){return n()}}),this.aggregations=Object.getOwnPropertyNames(ah).filter(function(e){return L(ah[e])}),t.dataChanged.on(function(e){"column.chooser"!==e.tag.source&&e.hasChanges("columns")&&n()}),t.columnListChanged.on(function(e){"column.chooser"!==e.tag.source&&e.hasChanges("index")&&n()})}return h(o,[{key:"state",value:function(e){var t=e.children,n=e.value.column;return t.length?t.some(function(e){return e.value.column.isVisible}):!1!==n.isVisible}},{key:"stateAll",value:function(){return this.listView.every(function(e){return e.isVisible})}},{key:"stateDefault",value:function(){return this.listView.every(function(e){return!1!==e.isDefault&&!1!==e.isVisible||!1===e.isDefault&&!1===e.isVisible})}},{key:"isIndeterminate",value:function(){return!this.stateAll()&&this.listView.some(function(e){return e.isVisible})}},{key:"canAggregate",get:function(){return this.columnChooserCanAggregate}},{key:"resource",get:function(){return this.model.columnChooser().resource}}]),o}(),em=function(){function i(e,t){g(this,i);var n=e&&e.model||t&&t.model,r=e&&e.table||t&&t.table;n&&r&&(this.focus=new wa(n,r))}return h(i,[{key:"ngOnDestroy",value:function(){this.focus&&(this.focus.dispose(),this.focus=null)}}]),i}();em.decorators=[{type:u.Injectable}],em.ctorParameters=function(){return[{type:Jc,decorators:[{type:u.Optional}]},{type:ac,decorators:[{type:u.Optional}]}]};var tm=function(){function t(e){g(this,t),this.ctrl=e}return h(t,[{key:"node",get:function(){return this.ctrl.treeView}}]),t}();var nm=function(){function i(e,t,n,r){g(this,i),this.plugin=e,this.zone=t,this.cd=n,this.submitEvent=new u.EventEmitter,this.cancelEvent=new u.EventEmitter}return h(i,[{key:"root",value:function(){return{$implicit:new tm(this.context.$implicit)}}},{key:"ngOnChanges",value:function(e){this.plugin.keep(e,["columnChooser"])}},{key:"ngOnInit",value:function(){var e=this,t={name:"qGridColumnChooser"},n=new Xg(this.plugin.model,t);n.submitEvent.on(function(){return e.submitEvent.emit()}),n.cancelEvent.on(function(){return e.cancelEvent.emit()}),n.dropEvent.on(function(){e.cd.markForCheck(),e.zone.run(No)}),this.context={$implicit:n,plugin:this}}}]),i}();nm.decorators=[{type:u.Component,args:[{selector:"q-grid-column-chooser",template:'<ng-container key="column-chooser.tpl.html" [context]="context"></ng-container> ',providers:[em,Jc]}]}],nm.ctorParameters=function(){return[{type:Jc},{type:u.NgZone},{type:u.ChangeDetectorRef},{type:em}]},nm.propDecorators={columnChooserCanAggregate:[{type:u.Input,args:["canAggregate"]}],submitEvent:[{type:u.Output,args:["submit"]}],cancelEvent:[{type:u.Output,args:["cancel"]}]};var rm=function e(){g(this,e)};rm.decorators=[{type:u.NgModule,args:[{imports:[r.FormsModule,yg],exports:[nm],declarations:[nm]}]}];var im=function(){function r(e,t){g(this,r),this.model=e,this.key=t.key,this.cancelEvent=new ua,this.submitEvent=new ua,this.resetEvent=new ua;var n=this.model.filter().by[this.key];this.by=new Set(n&&n.items||[]),this.byBlanks=!(!n||!n.blanks),this.items=[],Object.assign(this,this.commands),this.column=su(this.model.columnList().line,this.key),this.title=this.column.title,this.getValue=ia(this.column)}return h(r,[{key:"state",value:function(e){return this.by.has(e)}},{key:"stateAll",value:function(){return this.items.every(this.state.bind(this))&&(!this.hasBlanks||this.byBlanks)}},{key:"isIndeterminate",value:function(){return!this.stateAll()&&(this.items.some(this.state.bind(this))||this.byBlanks)}},{key:"isEmpty",value:function(){return!!this.by.size||this.byBlanks}},{key:"commands",get:function(){var g=this;return{toggle:new Ea({source:"column.filter.view",execute:function(e){g.by.has(e)?g.by.delete(e):g.by.add(e)}}),toggleAll:new Ea({source:"column.filter.view",execute:function(e){var t=!g.stateAll();if(t){var n=!0,r=!1,i=void 0;try{for(var o,a=g.items[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;g.by.add(l)}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}else if(e){var u=!0,s=!1,c=void 0;try{for(var h,f=g.by[Symbol.iterator]();!(u=(h=f.next()).done);u=!0){var d=h.value;0<=g.items.indexOf(d)&&g.by.delete(d)}}catch(e){s=!0,c=e}finally{try{!u&&f.return&&f.return()}finally{if(s)throw c}}}else g.by.clear();g.byBlanks=g.hasBlanks&&t}}),submit:new Ea({source:"column.filter.view",execute:function(){var e=g.model,t=or(e.filter().by),n=t[g.key]||{};n.items=Array.from(g.by),n.blanks=g.byBlanks,n.items.length||n.blanks||n.expression?t[g.key]=n:delete t[g.key],e.filter({by:t},{source:"column.filter.view"}),g.submitEvent.emit()}}),cancel:new Ea({source:"column.filter.view",execute:function(){return g.cancelEvent.emit()}}),reset:new Ea({source:"column.filter.view",execute:function(){g.by=new Set,g.byBlanks=!1,g.resetEvent.emit()}})}}}]),r}(),om=function(){function i(e,t,n,r){g(this,i),this.plugin=e,this.vscroll=t,this.qgrid=n,this.search="",this.submitEvent=new u.EventEmitter,this.cancelEvent=new u.EventEmitter}return h(i,[{key:"ngOnInit",value:function(){var p=this,v=this.plugin.model,y=this.column.key,x=new im(v,{key:y});x.submitEvent.on(function(){return p.submitEvent.emit()}),x.cancelEvent.on(function(){return p.cancelEvent.emit()});var e=this.vscroll.context({threshold:v.columnFilter().threshold,fetch:function(e,t,n){var r=v.filter(),i=p.qgrid.service(v),o=x.items;if(r.fetch!==p.qgrid.noop){var a=i.busy(),l=r.fetch(y,{skip:e,take:t,value:x.getValue,search:""+p.search,filter:""+p.search}),u=new dh(l);u.run(),u.busy.then(function(e){o.push.apply(o,b(e)),n.resolve(o.length+(e.length===t?t:0)),a()}).catch(a)}else{var s=i.busy(),c=v.filter().assertFactory().isNull;try{if(!o.length){var h=(0,v[v.columnFilter().source])().rows.map(x.getValue);"array"===x.column.type&&(h=Tr(h));var f=Wi(h),d=f.filter(function(e){return!c(e)}),g=(""+p.search).toLowerCase(),m=g?d.filter(function(e){return 0<=(""+e).toLowerCase().indexOf(g)}):d;m.sort(x.column.compare),x.items=m,x.hasBlanks=d.length!==f.length&&(!g||0<="blanks".indexOf(g.toLowerCase()))}n.resolve(x.items.length)}finally{s()}}}});this.vscrollContext=e,this.context={$implicit:x,plugin:this,vscroll:e}}},{key:"reset",value:function(){this.context.$implicit.items=[],this.vscrollContext.container.reset()}},{key:"rowId",value:function(e){return e}}]),i}();om.decorators=[{type:u.Component,args:[{selector:"q-grid-column-filter",template:'<ng-container key="plugin-column-filter.tpl.html" [context]="context"></ng-container>',providers:[em,Jc]}]}],om.ctorParameters=function(){return[{type:Jc},{type:kd},{type:Qc},{type:em}]},om.propDecorators={column:[{type:u.Input}],search:[{type:u.Input}],submitEvent:[{type:u.Output,args:["submit"]}],cancelEvent:[{type:u.Output,args:["cancel"]}]};var am=function(){function r(e,t,n){g(this,r),this.plugin=e,this.view=t,this.element=n,this.context={$implicit:this}}return h(r,[{key:"ngOnInit",value:function(){var t=this;this.plugin.model.filterChanged.watch(function(e){e.hasChanges("by")&&(t.view.filter.has(t.column)?t.element.nativeElement.classList.add(_a+"-active"):t.element.nativeElement.classList.remove(_a+"-active"))})}}]),r}();am.decorators=[{type:u.Component,args:[{selector:"q-grid-column-filter-trigger",template:'<ng-container key="plugin-column-filter-trigger.tpl.html" [context]="context"></ng-container>',providers:[Jc]}]}],am.ctorParameters=function(){return[{type:Jc},{type:Sf},{type:u.ElementRef}]},am.propDecorators={column:[{type:u.Input}]};var lm=function(){function e(){g(this,e),this.byBlanksChange=new u.EventEmitter,this.context={$implicit:this}}return h(e,[{key:"remove",value:function(e){this.by.delete(e)}},{key:"removeByBlanks",value:function(){this.byBlanksChange.emit(!1)}},{key:"isBlanks",get:function(){return this.byBlanks}}]),e}();lm.decorators=[{type:u.Component,args:[{selector:"q-grid-column-filter-by",template:'<ng-container key="plugin-column-filter-by.tpl.html" [context]="context"></ng-container> '}]}],lm.ctorParameters=function(){return[]},lm.propDecorators={by:[{type:u.Input}],column:[{type:u.Input}],byBlanks:[{type:u.Input}],byBlanksChange:[{type:u.Output}]};var um=function e(t){g(this,e),this.cellService=t};um.decorators=[{type:u.Directive,args:[{selector:"[q-grid-column-filter-item-list]",providers:[hg]}]}],um.ctorParameters=function(){return[{type:hg}]},um.propDecorators={column:[{type:u.Input,args:["q-grid-column-filter-item-list"]}],search:[{type:u.Input,args:["q-grid-column-filter-search"]}]};var sm=function(){function n(e,t){g(this,n),this.viewContainerRef=e,this.itemList=t,this.$implicit=this}return h(n,[{key:"ngOnInit",value:function(){var e=this.itemList;e.cellService.build("column-filter",e.column)(this.viewContainerRef,this)}}]),n}();sm.decorators=[{type:u.Directive,args:[{selector:"[q-grid-column-filter-item]"}]}],sm.ctorParameters=function(){return[{type:u.ViewContainerRef},{type:um}]},sm.propDecorators={value:[{type:u.Input,args:["q-grid-column-filter-item"]}]};var cm=function e(){g(this,e)};cm.decorators=[{type:u.NgModule,args:[{declarations:[om,am,lm,um,sm],exports:[om,am,lm,um,sm],imports:[yg]}]}];var hm=_a+"-active",fm=_a+"-hide",dm=function(){function n(e,t){g(this,n),this.model=e;var i=t.column,o=t.view,a=this.element=t.element,l=t.iconDesc,u=t.iconAsc;e.sortChanged.watch(function(e){if(e.hasChanges("by"))if(o.sort.order(i)<0)qa.mutate(function(){a.classList.add(fm),a.classList.remove(hm),u.classList.remove(hm),l.classList.remove(hm)});else{var t=o.sort.direction(i),n="asc"===t?l:u,r="asc"===t?u:l;qa.mutate(function(){a.classList.add(hm),a.classList.remove(fm),n.classList.remove(hm),r.classList.add(hm)})}}),this.toggle=new Ea({canExecute:function(){return i.canSort},execute:function(){return o.sort.toggle.execute(i)}})}return h(n,[{key:"onClick",value:function(){return!!this.toggle.canExecute()&&(this.toggle.execute(),!0)}},{key:"onMouseLeave",value:function(){var e=this;qa.mutate(function(){e.element.classList.remove(fm)})}}]),n}(),gm=function(){function i(e,t,n,r){g(this,i),this.plugin=e,this.view=t,this.element=n,this.zone=r,this.context={$implicit:this}}return h(i,[{key:"ngAfterViewInit",value:function(){var e=this,t=this.element.nativeElement,n=t.querySelector(".q-grid-asc"),r=t.querySelector(".q-grid-desc"),i=new dm(this.plugin.model,{element:t,view:this.view,column:this.column,iconAsc:n,iconDesc:r}),o=new Pf(t,new Af(this));o.on("click",function(){if(i.onClick())new em(e.plugin,null)}),this.zone.runOutsideAngular(function(){return o.on("mouseleave",function(){return i.onMouseLeave()})})}}]),i}();gm.decorators=[{type:u.Component,args:[{selector:"q-grid-column-sort",template:'<ng-container key="plugin-column-sort.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],gm.ctorParameters=function(){return[{type:Jc},{type:Sf},{type:u.ElementRef},{type:u.NgZone}]},gm.propDecorators={column:[{type:u.Input}],template:[{type:u.ContentChild,args:[u.TemplateRef]}]};var mm=function e(){g(this,e)};mm.decorators=[{type:u.NgModule,args:[{declarations:[gm],exports:[gm],imports:[yg]}]}];var pm=function(){function i(e){var h=this;g(this,i),this.model=e,this.commitCommand=new Ea({execute:function(e){if("data"===e.column.class){var t=h.rowId(e.rowIndex,e.row),n=h.columnId(e.columnIndex,e.column),r=h.changes.edited,i=r.get(t);i||(i=[],r.set(t,i));var o=i.findIndex(function(e){return e.column===n}),a=i[o];a||(a={column:n,oldValue:e.oldValue,oldLabel:e.oldLabel},o=i.length,i.push(a)),a.newValue=e.newValue,a.newLabel=e.newLabel,h.hasChanges(a.newValue,a.oldValue)||(i.splice(o,1),i.length||r.delete(t))}}}),this.actions=[new fc(new Ea({source:"data.manipulation",execute:function(){var e=h.rowFactory(h.model.data().rows[0]);if(sr(e))throw new Xo("data.manipulation","Setup rowFactory property to add new rows");var t=h.rowId(0,e),n=h.model.data;h.changes.added.add(t),n({rows:[e].concat(n().rows)},{source:"data.manipulation"})},shortcut:"F7"}),"Add New Row","add")],this.rowActions=[new fc(new Ea({source:"data.manipulation",canExecute:function(e){var t=h.rowId(e.rowIndex,e.row);return!h.changes.deleted.has(t)},execute:function(e){var n=h.rowId(e.rowIndex,e.row),t=h.changes;if(t.added.has(n)){t.added.delete(n);var r=h.model.data;r({rows:r().rows.filter(function(e,t){return h.rowId(t,e)!==n})},{source:"data.manipulation"})}else t.deleted.add(n)}}),"Delete Row","delete"),new fc(new Ea({source:"data.manipulation",execute:function(e){var t=h.rowId(e.rowIndex,e.row);if(h.changes.deleted.has(t)&&h.changes.deleted.delete(t),h.changes.edited.has(t))try{var n=h.changes.edited.get(t),r=uu(h.model.columnList().line),i=!0,o=!1,a=void 0;try{for(var l,u=n[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var s=l.value,c=r[s.column];if(!c)throw new Xo("data.manipulation","Column "+s.column+" is not found");na(e.row,c,s.oldValue),oa(e.row,c,s.oldLabel)}}catch(e){o=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}}finally{h.changes.edited.delete(t)}},canExecute:function(e){var t=h.rowId(e.rowIndex,e.row);return h.changes.deleted.has(t)||h.changes.edited.has(t)}}),"Revert Row","restore")],this.rowId=e.data().id.row,this.columnId=e.data().id.column,this.rowFactory=e.dataManipulation().rowFactory;var t=e.style(),n=Array.from(t.rows),r=Array.from(t.cells);n.push(this.styleRow.bind(this)),r.push(this.styleCell.bind(this)),e.edit({mode:"cell",commit:Cf.command([this.commitCommand,e.edit().commit])}).style({rows:n,cells:r}).action({items:Cf.list([this.actions,e.action().items])}),e.columnListChanged.watch(function(e,t){if(e.hasChanges("line")){var n,r=e.state.line.find(function(e){return"row-options"===e.type});if(r)(n=r.editorOptions.actions).push.apply(n,b(h.rowActions)),t()}})}return h(i,[{key:"hasChanges",value:function(e,t){return e!==t}},{key:"styleRow",value:function(e,t){var n=this.rowId(t.row,e);this.changes.deleted.has(n)&&t.class("deleted",{opacity:.3})}},{key:"styleCell",value:function(e,t,n){var r=this,i=this.rowId(n.row,e),o=this.changes;"row-indicator"!==t.type?o.edited.has(i)&&0<=o.edited.get(i).findIndex(function(e){return e.column===r.columnId(n.column,t)})&&n.class("edited",{background:"#E3F2FD"}):o.deleted.has(i)?n.class("delete-indicator",{background:"#EF5350"}):o.added.has(i)?n.class("add-indicator",{background:"#C8E6C9"}):o.edited.has(i)&&n.class("edit-indicator",{background:"#E3F2FD"})}},{key:"changes",get:function(){return this.model.dataManipulation()}},{key:"resource",get:function(){return this.model.dataManipulation().resource}}]),i}(),vm=function(){function t(e){g(this,t),this.plugin=e}return h(t,[{key:"ngOnChanges",value:function(e){this.plugin.keep(e,["dataManipulation"])}},{key:"ngOnInit",value:function(){var e=new pm(this.plugin.model);this.context={$implicit:e}}}]),t}();vm.decorators=[{type:u.Component,args:[{selector:"q-grid-data-manipulation",template:"",providers:[Jc]}]}],vm.ctorParameters=function(){return[{type:Jc}]},vm.propDecorators={dataManipulationRowFactory:[{type:u.Input,args:["rowFactory"]}]};var ym=function e(){g(this,e)};ym.decorators=[{type:u.NgModule,args:[{declarations:[vm],exports:[vm]}]}];var xm=function e(){g(this,e),this.context={$implicit:this}};xm.decorators=[{type:u.Component,args:[{selector:"q-grid-edit-form-trigger",template:'<ng-container key="plugin-edit-form-trigger.tpl.html" [context]="context"></ng-container> '}]}],xm.propDecorators={caption:[{type:u.Input}],cell:[{type:u.Input}]};var wm=function(e){function r(e,t){g(this,r);var n=m(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.model=e,n.editor=new Mh(t.row,e.columnList().line),n.caption=t.caption,n.submitEvent=new ua,n.cancelEvent=new ua,n.resetEvent=new ua,n.submit=n.commands.submit,n.cancel=n.commands.cancel,n.reset=n.commands.reset,sr(t.shortcut)||n.using(t.shortcut.register(new Map(Object.entries(n.commands)))),n}return c(r,ya),h(r,[{key:"shortcutFactory",value:function(t){var n=this.model.edit;return function(){var e=n()[t+"Shortcuts"];return e.reference||e.$default}}},{key:"editors",get:function(){return this.editor.editors}},{key:"commands",get:function(){var e=this;return{submit:new Ea({source:"edit.form.panel",shortcut:this.shortcutFactory("commit"),execute:function(){e.editor.commit(),e.submitEvent.emit()}}),cancel:new Ea({source:"edit.form.panel",shortcut:this.shortcutFactory("cancel"),execute:function(){return e.cancelEvent.emit()}}),reset:new Ea({source:"edit.form.panel",execute:function(){e.editor.editors.forEach(function(e){return e.reset()}),e.resetEvent.emit()}})}}}]),r}(),bm=function(){function t(e){g(this,t),this.plugin=e,this.cancel=new u.EventEmitter,this.reset=new u.EventEmitter,this.submit=new u.EventEmitter}return h(t,[{key:"ngOnInit",value:function(){var e=this,t=new wm(this.plugin.model,{row:this.cell.row,caption:this.caption});t.submitEvent.on(function(){return e.submit.emit()}),t.cancelEvent.on(function(){return e.cancel.emit()}),t.resetEvent.on(function(){return e.reset.emit()}),this.context={$implicit:t}}},{key:"ngOnDestroy",value:function(){this.context.$implicit.dispose()}}]),t}();bm.decorators=[{type:u.Component,args:[{selector:"q-grid-edit-form",template:'<ng-container key="plugin-edit-form.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],bm.ctorParameters=function(){return[{type:Jc}]},bm.propDecorators={caption:[{type:u.Input}],cell:[{type:u.Input}],cancel:[{type:u.Output}],reset:[{type:u.Output}],submit:[{type:u.Output}]};var km=function(){function e(){g(this,e)}return h(e,[{key:"key",get:function(){if(this.editor){var e=this.editor.cell.column;return"edit-form-"+(e.editor||e.type)+".tpl.html"}return"edit-form-text.tpl.html"}}]),e}();km.decorators=[{type:u.Component,args:[{selector:"q-grid-edit-form-control",template:'<ng-container key="{{key}}" [context]="{$implicit: editor}"> </ng-container>'}]}],km.propDecorators={editor:[{type:u.Input}]};var Cm=function e(){g(this,e)};Cm.decorators=[{type:u.NgModule,args:[{declarations:[xm,bm,km],exports:[xm,bm,km],imports:[n.CommonModule,yg]}]}];var qm=function(){function r(e,t,n){g(this,r),this.id=e,this.schema=t,this.parent=n,this.attributes={},this.children=[],this.level=n?n.level+1:0}return h(r,[{key:"attr",value:function(e,t){if(2!==arguments.length)return this.attributes[e];this.attributes[e]=t}},{key:"classes",value:function(){}},{key:"addChildAfter",value:function(e,t){var n=t?this.children.indexOf(t):this.children.length-1;this.children.splice(n+1,0,e),e.parent=this,e.level=this.level+1}},{key:"addChildBefore",value:function(e,t){var n=t?this.children.indexOf(t):0;this.children.splice(n,0,e),e.parent=this,e.level=this.level+1}},{key:"addAfter",value:function(e){if(!this.parent)throw new Xo("node","Can't add after root");this.parent.addChildAfter(e,this)}},{key:"addBefore",value:function(e){if(!this.parent)throw new Xo("node","Can't add after root");this.parent.addChildBefore(e,this)}},{key:"clone",value:function(){return this.schema.apply(new r(this.id,this.schema))}},{key:"remove",value:function(){if(!this.parent)throw new Xo("node","Root element can't be removed");var e=this.parent.children.indexOf(this);this.parent.children.splice(e,1)}},{key:"clear",value:function(){this.children.forEach(function(e){return e.parent=null}),this.children=[]}},{key:"toString",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;return Array(t).join("-")+" "+this.level+"\n"+this.children.map(function(e){return e.toString(t+1)}).join("\n")}},{key:"toTraceString",value:function(){if(null!=this.parent){for(var e=this.parent;null!==e.parent;)e=e.parent;return e.toString()}return this.toString()}}]),r}();function Om(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=or(t[0]),i=1,o=t.length;i<o;i++){var a=t[i];if(a)for(var l=Object.keys(a),u=0,s=l.length;u<s;u++){var c=l[u];r.hasOwnProperty(c)||(r[c]=a[c])}}return r}function _m(e,t){for(var n=Object.keys(t),r=n.length,i=0;i<r;i++){var o=n[i];e[o]=t[o]}return e}var Im=function(){function e(){g(this,e)}return h(e,[{key:"serialize",value:function(e){return new zm(e).serialize()}},{key:"deserialize",value:function(e,t){return new Rm(e).deserialize(t)}}]),e}();function Em(e,t){t.hasOwnProperty(e.id)||(t[e.id]=e);for(var n=0,r=e.children.length;n<r;n++){Em(e.children[0],t)}}var zm=function(){function n(e){g(this,n),this.node=e}return h(n,[{key:"serialize",value:function(){var t=this,e=this.node.line.expressions.map(function(e){return t.serializeGroup(e)});return{id:this.node.id,attributes:this.serializeAttributes(this.node),children:this.node.children.map(function(e){return new n(e).serialize()}),line:e.filter(function(e){return e.expressions.length})}}},{key:"serializeGroup",value:function(e){var t=this;return{id:e.id,expressions:e.expressions.filter(function(e){return t.canSerialize(e)}).map(function(e){return t.serializeExpression(e)})}}},{key:"serializeExpression",value:function(e){for(var t={},n=this.node.attr("serialize")[e.id],r=0,i=n.length;r<i;r++){var o=n[r];t[o]=e[o]}return t.id=e.id,t.type=e.type,t.method=e.method,t}},{key:"serializeAttributes",value:function(e){var n=this,t=this.node.attr("serialize");return t&&t["@attr"]?t["@attr"].reduce(function(e,t){return e[t]=n.node.attr(t),e},{}):{}}},{key:"canSerialize",value:function(e){var t=this.node.attr("serialize");if(!t)return!1;var n=t[e.id];return!(!n||!n.length)}}]),n}();var Rm=function(){function u(e){g(this,u),this.schema=e}return h(u,[{key:"deserialize",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2];n=n||{};var r=void 0;t?(r=n[e.id].clone(),t.addChildAfter(r),Em(t,n)):(r=new qm(e.id,this.schema),this.schema.apply(r),Em(r,n)),r.clear(),_m(r.attributes,e.attributes),this.deserializeLine(r,r.line,e.line);for(var i=e.children,o=i.length,a=0;a<o;a++){var l=i[a];new u(this.schema.schemaMap[l.id]).deserialize(l,r,n)}return r}},{key:"deserializeLine",value:function(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r],a=t.get(o.id);this.deserializeGroup(e,t,a,o)}}},{key:"deserializeGroup",value:function(n,r,i,e){for(var o=e.expressions,t=o.length,a=void 0,l=function(e){var t=o[e];a=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return n;return-1}(i.expressions,function(e){return e.id===t.id}),_m(i.expressions[a],t)},u=0;u<t;u++)l(u);var s=function(t){var e=o[t];e.method&&e.method.forEach(function(e){i.expressions[a][e](n,r),i.expressions[a].method=o[t].method})};for(u=0;u<t;u++)s(u)}}]),u}();var jm=function(){function e(){g(this,e),this.node=null,this.currentChange=new u.EventEmitter}return h(e,[{key:"current",get:function(){return this.node},set:function(e){var t=this.node;e!==t&&(this.node=e,this.currentChange.emit({oldValue:t,newValue:e}))}}]),e}();jm.decorators=[{type:u.Injectable}];var Sm=function(){function t(e){g(this,t),this.service=e}return h(t,[{key:"select",value:function(e){e.stopPropagation(),this.model.parent&&(this.service.current=this.model)}}]),t}();Sm.decorators=[{type:u.Component,args:[{selector:"q-grid-eb-node",template:'<ul class="q-grid-eb-node" [q-grid-eb-class]="model.attr(\'class\')" [ngClass]="{\'q-grid-eb-active\': service.current === model}" (click)="select($event)"> <li class="q-grid-eb-line"> <ul> <li *ngFor="let expr of model.line.expressions" class="q-grid-eb-expression"> <q-grid-eb-expression [model]="expr" [node]="model" [line]="model.line"> </q-grid-eb-expression> </li> </ul> </li> <li class="q-grid-eb-children"> <ul> <li *ngFor="let child of model.children" class="q-grid-eb-child"> <q-grid-eb-node [model]="child"> </q-grid-eb-node> </li> </ul> </li> </ul> <ng-template key="eb-group.tpl.html" let-$group let-$node="node" let-$line="line"> <ul class="q-grid-eb-group"> <li *ngFor="let expr of $group.expressions" class="q-grid-eb-expression"> <q-grid-eb-expression [model]="expr" [node]="$node" [line]="$line"> </q-grid-eb-expression> </li> </ul> </ng-template> '}]}],Sm.ctorParameters=function(){return[{type:jm}]},Sm.propDecorators={model:[{type:u.Input}]};var Pm=function e(){g(this,e),this.templateUrl="",this.method=[]};var Am=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.expressions=[],e.type="group",e.templateUrl="eb-group.tpl.html",e}return c(t,Pm),t}();var Lm=function(){function t(e){g(this,t),this.GroupSchemaT=e,this.immutable=!0,this.expressions=[]}return h(t,[{key:"getIndex",value:function(t){var e=this.expressions.findIndex(function(e){return e.id===t});if(e<0)throw new Xo("line","Expression "+t+" not found");return e}},{key:"findById",value:function(e,t){for(var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=0,i=e.length;r<i;r++){var o=e[r];if(o.id===t)return{index:r,expression:o,parent:n};if(o instanceof Am){var a=o,l=this.findById(a.expressions,t,a);if(l)return l}}return null}},{key:"add",value:function(e){this.expressions.push(e)}},{key:"clone",value:function(e){return ur(this.get(e))}},{key:"get",value:function(e){var t=this.findById(this.expressions,e);if(!t)throw new Xo("line","Expression "+e+" not found");return t.expression}},{key:"put",value:function(e,t,n){var r=this.getIndex(e),i=new this.GroupSchemaT(t,this),o=new Am;if(!(this.findById(this.expressions,e).expression instanceof Am))throw new Xo("line","Unsupported operation: put to expression, that is not a group");n(i),i.apply(o),o.id=e,this.expressions.splice(r,1,o),this.immutable=!1}},{key:"remove",value:function(e){var t=this.findById(this.expressions,e);t.parent?t.parent.expressions:this.expressions;if(!(t.expression instanceof Am))throw new Xo("line","Unsupported operation: remove expression, that is not a group");t.expression.expressions=[]}}]),t}();function Mm(t,n){return a;function a(e){return M(e)?function(e){for(var t=[],n=0,r=e.length;n<r;n++)t[n]=a(e[n]);return t}(e):L(e)?e.apply(t,n):I(e)?function(e){for(var t=Object.keys(e),n=t.length,r={},i=0;i<n;i++){var o=t[i];r[o]=a(e[o])}return r}(e):e}}var Tm=function(){function i(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:[];g(this,i),this.expression=e,this.key=t,this.handler=n,this.args=r,this.isFirstRun=!0,this.evaluate=Mm(e,r),this.oldValue=this.evaluate(e[t])}return h(i,[{key:"detect",value:function(){var e=this.expression[this.key],t=this.evaluate(e);(this.isFirstRun||this.oldValue!==t)&&(this.isFirstRun=!1,this.handler.apply(this.expression,[t,this.oldValue].concat(this.args)),this.oldValue=t)}}]),i}();var Dm=function(){function e(){g(this,e)}return h(e,[{key:"ngOnInit",value:function(){var t=this;this.context={$implicit:this.model,node:this.node,line:this.line};var n=this.model.$watch;n&&(this.watchers=Object.keys(n).map(function(e){return new Tm(t.model,e,n[e],[t.node,t.line])}))}},{key:"ngDoCheck",value:function(){var e=this.watchers;if(e)for(var t=0,n=e.length;t<n;t++)e[t].detect()}}]),e}();Dm.decorators=[{type:u.Component,args:[{selector:"q-grid-eb-expression",template:'<ng-container [key]="model.templateUrl" [context]="context"> </ng-container> '}]}],Dm.propDecorators={node:[{type:u.Input}],line:[{type:u.Input}],model:[{type:u.Input}]};var Nm=function(){function n(e,t){g(this,n),this.element=e,this.node=t,this.oldClassList=[]}return h(n,[{key:"ngOnInit",value:function(){this.evaluate=Mm(this.model,[this.node?this.node.model:null])}},{key:"ngDoCheck",value:function(){var e=this.evaluate(this.klass);if(e){var t=this.fetchClasses(e);if(this.oldClassList.length!==t.length||this.oldClassList.join(" ")!==t.join(" ")){var n,r,i=this.element.nativeElement;(n=i.classList).remove.apply(n,b(this.oldClassList)),(r=i.classList).add.apply(r,b(t)),this.oldClassList=t}}else if(this.oldClassList.length){var o;(o=this.element.nativeElement.classList).remove.apply(o,b(this.oldClassList)),this.oldClassList=[]}}},{key:"fetchClasses",value:function(e){if(M(e))return e;for(var t=Object.keys(e),n=[],r=0,i=t.length;r<i;r++){var o=t[r];e[o]&&n.push(o)}return n}}]),n}();Nm.decorators=[{type:u.Directive,args:[{selector:"[q-grid-eb-class]"}]}],Nm.ctorParameters=function(){return[{type:u.ElementRef},{type:Sm,decorators:[{type:u.Optional}]}]},Nm.propDecorators={klass:[{type:u.Input,args:["q-grid-eb-class"]}],model:[{type:u.Input,args:["q-grid-eb-class-model"]}]};var Fm=function e(){g(this,e)};Fm.decorators=[{type:u.NgModule,args:[{imports:[n.CommonModule,yg],exports:[Sm,Nm],declarations:[Sm,Dm,Nm],providers:[Im,jm]}]}];var Vm=function e(t){g(this,e),this.context={$implicit:this},t.key=function(){return"plugin-legend-core.tpl.html"}};Vm.decorators=[{type:u.Component,args:[{selector:"q-grid-legend",template:'<ng-container key="plugin-legend-core.tpl.html" [context]="context"></ng-container> ',changeDetection:u.ChangeDetectionStrategy.OnPush,providers:[Df]}]}],Vm.ctorParameters=function(){return[{type:Df}]};var $m=function e(){g(this,e)};$m.decorators=[{type:u.NgModule,args:[{declarations:[Vm],exports:[Vm],imports:[yg]}]}];var Bm=function(){function n(e,t){g(this,n),this.model=e,this.table=t,this.next=new Ea({source:"pager",execute:function(){new wa(e,t),e.pagination({current:e.pagination().current+1},{source:"pager.view"})},canExecute:function(){return(e.pagination().current+1)*e.pagination().size<e.pagination().count}}),this.prev=new Ea({source:"pager",execute:function(){new wa(e,t),e.pagination({current:e.pagination().current-1},{source:"pager.view"})},canExecute:function(){return 0<e.pagination().current}})}return h(n,[{key:"theme",get:function(){return this.model.style().classList}},{key:"resource",get:function(){return this.model.pagination().resource}},{key:"size",get:function(){return this.model.pagination().size},set:function(e){this.model.pagination({size:e,current:0},{source:"pager.view"})}},{key:"sizeList",get:function(){return this.model.pagination().sizeList}},{key:"current",get:function(){return this.model.pagination().current},set:function(e){return this.model.pagination({current:e},{source:"pager.view"})}},{key:"from",get:function(){return Math.min(this.total,this.current*this.size+1)}},{key:"to",get:function(){return Math.min(this.total,(this.current+1)*this.size)}},{key:"total",get:function(){return this.model.pagination().count}},{key:"totalPages",get:function(){return 0===this.size?0:Math.max(1,Math.ceil(this.total/this.size))}},{key:"scroll",get:function(){return this.model.scroll()}}]),n}(),Um=function(){function t(e){g(this,t),this.plugin=e}return h(t,[{key:"ngOnChanges",value:function(e){this.plugin.keep(e,["pagination"])}},{key:"ngOnInit",value:function(){var e=new Bm(this.plugin.model,this.plugin.table);this.context={$implicit:e}}}]),t}();Um.decorators=[{type:u.Component,args:[{selector:"q-grid-pager",template:'<ng-container key="plugin-pager.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],Um.ctorParameters=function(){return[{type:Jc}]},Um.propDecorators={paginationSize:[{type:u.Input,args:["size"]}],paginationSizeList:[{type:u.Input,args:["sizeList"]}]};var Hm=function(){function t(e){g(this,t),this.plugin=e,this.context={$implicit:this}}return h(t,[{key:"ngOnInit",value:function(){this.value=this.current}},{key:"keyDown",value:function(e){var t=As.translate(e);t.startsWith("numpad")&&(t=t.slice(6));var n=this.value||0;switch(t){case"enter":n&&this.plugin.model.pagination({current:n-1},{source:"pager-target.component"});break;case"up":n<this.total&&(this.value=n+1);break;case"down":1<n&&(this.value=n-1);break;case"left":case"right":case"backspace":break;default:var r=Number.parseInt(t),i=Number.parseInt(""+n+r),o=this.total;1<=i&&i<=o&&!isNaN(r)||(i>this.total?this.value=o:this.value=1,e.preventDefault())}}},{key:"current",get:function(){return this.plugin.model.pagination().current+1}},{key:"total",get:function(){var e=this.plugin.model.pagination(),t=e.count,n=e.size;return 0===n?0:Math.max(1,Math.ceil(t/n))}}]),t}();Hm.decorators=[{type:u.Component,args:[{selector:"q-grid-pager-target",template:'<ng-container key="plugin-pager-target.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],Hm.ctorParameters=function(){return[{type:Jc}]};var Wm=function e(){g(this,e)};Wm.decorators=[{type:u.NgModule,args:[{declarations:[Um,Hm],exports:[Um,Hm],imports:[yg]}]}];var Gm=function(){function t(e){g(this,t),this.plugin=e}return h(t,[{key:"ngOnChanges",value:function(e){this.plugin.keep(e,["persistence"])}},{key:"ngOnInit",value:function(){var n=this.plugin.model,e="q-grid:"+n.grid().id+":persistence-list";n.persistence({id:e}),n.persistence().storage.getItem(e).then(function(e){if(e&&0!==e.length){var t=e.find(function(e){return e.isDefault});if(t)new ga(n).load(t.model)}});var t=new fc(new Ea,"Save/Load","history");t.templateUrl="plugin-persistence.tpl.html",this.plugin.model.action({items:Cf.list([[t],this.plugin.model.action().items])},{source:"persistence.component"})}}]),t}();function Km(e){switch(e){case"filter":return Ym;case"sort":return Zm;case"group":case"pivot":return r=e,function(e){var t=e.by;if(0===t.length)return"";var n=t.join(", ");return r+" "+n};default:return function(){return""}}var r}function Ym(e){var t=Object.values(e.by).map(function(e){return e.items});return 0===t.length?"":"filter "+Tr(t).join(", ")}function Zm(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,a=e.by[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;for(var u in l)t.push(u)}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return 0===t.length?"":"sort "+t.join(", ")}Gm.decorators=[{type:u.Component,args:[{selector:"q-grid-persistence",template:"",providers:[Jc]}]}],Gm.ctorParameters=function(){return[{type:Jc}]};var Jm=function(){function o(e){var n=this;g(this,o),this.model=e,this.service=new ga(e),this.items=[],this.state={editItem:null,oldValue:null},this.closeEvent=new ua;var r=e.persistence;this.id=r().id,this.title=this.stringify(),r().storage.getItem(this.id).then(function(e){n.items=e||[],n.groups=n.buildGroups(n.items)}),this.model.gridChanged.watch(function(e){e.hasChanges("status")&&"unbound"===e.state.status&&n.closeEvent.emit()}),this.create=new Ea({source:"persistence.view",execute:function(){var e={title:n.title,modified:Date.now(),model:n.service.save(),isDefault:!1,group:r().defaultGroup,canEdit:!0};return!1!==r().create.execute(e)&&(n.items.push(e),n.persist(),!(n.title=""))},canExecute:function(){if(n.title&&n.isUniqueTitle(n.title)){var e={title:n.title,modified:Date.now(),model:n.service.save(),isDefault:!1,group:r().defaultGroup,canEdit:!0};return r().create.canExecute(e)}return!1}}),this.edit={enter:new Ea({source:"persistence.view",execute:function(e){return!!(e=e||n.items.find(n.isActive))&&(n.state={editItem:e,oldValue:or(e)},!0)},canExecute:function(e){return null===n.state.editItem&&e.canEdit}}),commit:new Ea({source:"persistence.view",shortcut:"enter",execute:function(e){if(e=e||n.state.editItem,!1!==r().modify.execute(e)){var t=e.title;return t&&n.isUniqueTitle(t)?(e.modified=Date.now(),n.persist(),!(n.state.editItem=null)):(n.edit.cancel.execute(),!1)}return!1},canExecute:function(){return null!==n.state.editItem&&r().modify.canExecute(n.state.editItem)}}),cancel:new Ea({source:"persistence.view",shortcut:"escape",execute:function(){if(null!==n.state.editItem){var e=n.items.indexOf(n.state.editItem);n.items.splice(e,1,n.state.oldValue),n.state.oldValue=null,n.state.editItem=null}else n.closeEvent.emit();return!0}})},this.load=new Ea({source:"persistence.view",canExecute:function(e){return r().load.canExecute(e)},execute:function(e){return!1!==r().load.execute(e)&&(n.service.load(e.model),!0)}}),this.reset=new Ea({source:"persistence.view",execute:function(){return!1!==r().reset.execute()&&n.service.reset(),!1},canExecute:function(){return r().reset.canExecute()}}),this.remove=new Ea({source:"persistence.view",execute:function(e){var t=n.items.indexOf(e);return 0<=t&&!1!==r().remove.execute(e)&&(n.items.splice(t,1),n.persist(),!0)},canExecute:function(e){return e.canEdit&&r().remove.canExecute(e)}}),this.setDefault=new Ea({source:"persistence.view",canExecute:function(e){return r().setDefault.canExecute(e)},execute:function(e){if(!1!==r().setDefault.execute(e)){var t=n.items.indexOf(e);return-1!==t&&(e.isDefault?e.isDefault=!1:(n.items.forEach(function(e){return e.isDefault=!1}),e.isDefault=!0),n.items.splice(t,1,e),n.persist(),!0)}return!1}});var t=new Ms,i=new As(new Ls);this.keyDown=function(e){return i.keyDown(e)},i.register(t,[this.edit.enter,this.edit.commit,this.edit.cancel])}return h(o,[{key:"buildGroups",value:function(e){return e.reduce(function(e,t){var n=e.find(function(e){return e.key===t.group});return n?n.items.push(t):e.push({key:t.group,items:[t]}),e},[])}},{key:"isActive",value:function(e){return JSON.stringify(e.model)===JSON.stringify(this.service.save())}},{key:"persist",value:function(){this.model.persistence().storage.setItem(this.id,this.items.filter(function(e){return e.canEdit})),this.groups=this.buildGroups(this.items)}},{key:"stringify",value:function(e){var t=e?e.model:this.service.save(),n=[],r=this.model.persistence().settings;for(var i in r)if(t[i]){var o=Km(i),a=o(t[i]);""!==a&&n.push(a)}return n.join("; ")||"No settings"}},{key:"isUniqueTitle",value:function(t){var n=this;return!this.items.some(function(e){return e!==n.state.editItem&&e.title.toLowerCase()===t.trim().toLowerCase()})}},{key:"blank",get:function(){return{title:"Blank",modified:Date.now(),model:{},isDefault:!1,group:"blank",canEdit:!1}}},{key:"sortedItems",get:function(){return this.items.sort(function(e,t){return t.modified-e.modified})}}]),o}(),Qm=function(){function t(e){g(this,t),this.plugin=e}return h(t,[{key:"ngOnInit",value:function(){var e=new Jm(this.plugin.model);this.context={$implicit:e}}}]),t}();Qm.decorators=[{type:u.Component,args:[{selector:"q-grid-persistence-panel",template:'<ng-container key="plugin-persistence-panel.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],Qm.ctorParameters=function(){return[{type:Jc}]};var Xm=function e(){g(this,e)};Xm.decorators=[{type:u.NgModule,args:[{imports:[r.FormsModule,yg],exports:[Gm,Qm],declarations:[Gm,Qm],entryComponents:[Qm]}]}];var ep=function(){function n(e,t){g(this,n),this.plugin=e,this.cd=t,this.context={$implicit:this}}return h(n,[{key:"ngOnChanges",value:function(e){this.plugin.keep(e,["progress"])}},{key:"ngOnInit",value:function(){var e=this;this.plugin.model.progressChanged.watch(function(){return e.cd.detectChanges()})}},{key:"isBusy",get:function(){var e=this.plugin.model.progress(),t=e.isBusy,n=e.queue;return t||n.length}}]),n}();ep.decorators=[{type:u.Component,args:[{selector:"q-grid-progress",template:'<ng-container key="plugin-progress.tpl.html" [context]="context"></ng-container> ',changeDetection:u.ChangeDetectionStrategy.OnPush,providers:[Jc]}]}],ep.ctorParameters=function(){return[{type:Jc},{type:u.ChangeDetectorRef}]};var tp=function e(){g(this,e)};tp.decorators=[{type:u.NgModule,args:[{declarations:[ep],exports:[ep],imports:[yg]}]}];var np=function e(){g(this,e),this.node=null};var rp=function(){function t(e){g(this,t),this.plugin=e,this.context={$implicit:this}}return h(t,[{key:"ngOnInit",value:function(){var e=new fc(new Ea,"Query Builder","filter");e.templateUrl="plugin-query-builder.tpl.html",this.plugin.model.action({items:Cf.list([[e],this.plugin.model.action().items])},{source:"query-builder.component"})}}]),t}();rp.decorators=[{type:u.Component,args:[{selector:"q-grid-query-builder",template:'<ng-container key="plugin-query-builder.tpl.html" [context]="context"></ng-container>',providers:[Jc]}]}],rp.ctorParameters=function(){return[{type:Jc}]};var ip=function(){function n(e,t){g(this,n),this.node=e,this.line=t,this.plan=[]}return h(n,[{key:"apply",value:function(t){var n=this;this.plan.forEach(function(e){return e(n.node,n.line,t)})}}]),n}();function op(e,t){var i,o,a,n,r=e[t];return{with:(i=e,o=t,a=r,n=function(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return i[o]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.apply(i,r.concat(t))}},n.decorator=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];t=t.slice(1),i[o]=function(){return r.apply(i,[a,i,o].concat(t))}},n)}}function ap(l){for(var e=Object.keys(l),t=e.length,u={},n=0;n<t;n++){var r=e[n];L(l[r])&&(u[r]=op(l,r))}return{with:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=Object.keys(u),i=r.length,o=0;o<i;o++){var a=r[o];l.action=a,u[a].with.apply(l,t)}}}}var lp=function e(){g(this,e),this.type="empty",this.templateKey="eb-empty.tpl.html"};var up=function(){function t(e){g(this,t),this.settings=e}return h(t,[{key:"build",value:function(e){var a,t=(a=ip,function(){function l(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,l),this.schemaMap=e,this.plan=[],this.planMap={}}return h(l,[{key:"clone",value:function(){var e=new l(Object.assign({},this.schemaMap));return e.plan=[].concat(b(this.plan)),e.planMap=Object.assign({},this.planMap),e}},{key:"attr",value:function(t,n){return this.plan.push(function(e){return e.attr(t,n)}),this}},{key:"apply",value:function(t){t=t||new qm("#root",this);var n=new Lm(a);return t.line=n,this.plan.forEach(function(e){return e(t,n)}),t}},{key:"node",value:function(i,o){var a=this;if(!o)throw new Xo("node.schema","Build function is not defined");return this.plan.push(function(e,t){var n=new l(a.schemaMap);o(n);var r=new qm(i,n,e);return n.apply(r),e.addChildAfter(r),a.schemaMap[i]=n,e}),this}},{key:"group",value:function(i,o){if(!o)throw new Xo("node.schema","Build function is not defined");var e=function(e,t){var n=new Am;n.id=i;var r=new a(e,t);return o(r),r.apply(n),t.add(n),e};return this.plan.push(e),this.planMap[i]=e,this}},{key:"get",value:function(e){var t=this.schemaMap[e];if(!t)throw new Xo("node.schema","Schema "+e+" is not found");return t}},{key:"materialize",value:function(e){var t=this.get(e);return t.apply(new qm(e,t))}}]),l}()),s=this.settings;return e.concat([new lp]).forEach(function(u){t.prototype[u.type]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=la(),i=void 0;1<t.length?(r=t[0],i=t[1]):1===t.length&&(i=t[0]);var o=function(e,a){var l=Om(i,u.defaults,s.defaults);l.id=r,l.type=u.type,l.templateUrl=u.templateKey;var t=new Am;return t.id=r,t.expressions.push(l),a.add(t),ap(l).with(e,a),Object.keys(l).forEach(function(i){var o=l[i];L(o)&&(l[i]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.apply(l,t);return a.immutable||(l.method=l.method||[],l.method.indexOf(i)<0&&l.method.push(i),a.immutable=!0),r})}),e};return this.plan.push(o),this.planMap[r]=o,this},ip.prototype[u.type]=function(){var i=la(),o=void 0;1<arguments.length?(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1]):1===arguments.length&&(o=arguments.length<=0?void 0:arguments[0]);return this.plan.push(function(e,t,n){var r=Om(o,u.defaults,s.defaults);return r.id=i,r.type=u.type,r.templateUrl=u.templateKey,n.expressions.push(r),ap(r).with(e,t),e}),this}}),new t}}]),t}();var sp=["EQUALS","NOT EQUALS","IN","IS EMPTY","IS NOT EMPTY"],cp=["EQUALS","NOT EQUALS"],hp=["LIKE","NOT LIKE","STARTS WITH","ENDS WITH"],fp=["BETWEEN","GREATER THAN","LESS THAN","GREATER OR EQ. TO","LESS OR EQ. TO"],dp=["GREATER THAN","LESS THAN","GREATER OR EQ. TO","LESS OR EQ. TO"],gp={"IS EMPTY":"isNull","IS NOT EMPTY":"isNotNull",EQUALS:"equals","NOT EQUALS":"notEquals","GREATER OR EQ. TO":"greaterThanOrEquals","LESS OR EQ. TO":"lessThanOrEquals","GREATER THAN":"greaterThan","LESS THAN":"lessThan",LIKE:"like","NOT LIKE":"notLike","STARTS WITH":"startsWith","ENDS WITH":"endsWith",IN:"in",BETWEEN:"between"},mp={bool:cp,id:sp.concat(hp),text:sp.concat(hp),email:sp.concat(hp),url:sp.concat(hp),password:sp.concat(hp),number:sp.concat(fp),date:sp.concat(fp),time:sp.concat(fp),currency:sp.concat(fp)};cp.concat(hp),cp.concat(hp),cp.concat(hp),cp.concat(hp),cp.concat(hp),cp.concat(dp),cp.concat(dp),cp.concat(dp),cp.concat(dp),function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n)}(gp);var pp=function(){function t(e){g(this,t),this.model=e}return h(t,[{key:"columns",value:function(){return this.model.columnList().line.filter(function(e){return mp.hasOwnProperty(e.type)}).map(function(e){return{key:e.key,title:e.title,type:e.type}})}},{key:"columnMap",value:function(){return this.columns().reduce(function(e,t){return e[t.key]=t,e},{})}},{key:"submit",value:function(e){this.model.filter({by:e},{source:"query-builder.service"})}},{key:"suggest",value:function(e,i,o,a,l){l=(l||[]).map(function(e){return(""+e).toLowerCase()});var u=this.model,t=uu(u.columnList().line)[e];if(!t)throw new Xo("query-builder.service","Column "+e+" is not found");var s=ta(t);return new Promise(function(e){var t=Wi(u.data().rows.map(s).filter(function(e){return!sr(e)&&""!==e&&null!==e&&l.indexOf((""+e).toLowerCase())<0})).sort(),n=(""+a).toLowerCase(),r=n?t.filter(function(e){return 0<=(""+e).toLowerCase().indexOf(n)}):t;e((r.length?r:t).slice(i,o))})}},{key:"build",value:function(){return new up({defaults:{isValid:function(){return!this.validate||!(this.state=this.validate()).length}}}).build([{type:"label",templateKey:"plugin-eb-label.tpl.html"},{type:"input",templateKey:"plugin-eb-input.tpl.html"},{type:"select",templateKey:"plugin-eb-select.tpl.html"},{type:"button",templateKey:"plugin-eb-button.tpl.html"},{type:"iconButton",templateKey:"plugin-eb-icon-button.tpl.html"},{type:"autocomplete",templateKey:"plugin-eb-autocomplete.tpl.html"},{type:"multiselect",templateKey:"plugin-eb-multiselect.tpl.html"}])}}]),t}();var vp=function(){function t(e){g(this,t),this.trueResult=[],this.validators={},this.rules={bool:["required"],currency:["required","decimal"],date:["required","iso_date"],email:["required"],file:["required"],id:["required"],image:["required"],number:["required","decimal"],password:["required"],url:["required"],reference:["required"],text:["required","string"],time:["required"]},this.columnMap=e.columnMap()}return h(t,[{key:"for",value:function(e){var t=this.validators;if(t.hasOwnProperty("key"))return t[e];var n=this.columnMap[e];if(!n)throw new Xo("validator","Can't find column "+e);var f=this.trueResult,d=n.type,r=this.rules[d],i=function(e){return f};if(r){var g=R({},d,r);i=function e(t){if(M(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;n.push.apply(n,b(e(u)))}}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}var s=R({},d,t),c=jh(g);if(c.validate(s))return f;var h=c.getErrors()[d];return M(h)?h:[h]}}return t[e]=i}}]),t}();var yp=function(){function t(e){g(this,t),this.service=e}return h(t,[{key:"factory",value:function(){var i,o,a,l,u=this.service,r=(i=u,o="#field",function(e,t){var n=null==this.value?"":(""+this.value).toLowerCase(),r=t.get(o).expressions[0].value;return i.suggest(r,0,10,n)}),s=(a=u,l="#field",function(e,t){var n=this.search,r=t.get(l).expressions[0].value,i=(this.values||[]).map(function(e){return(""+e).toLowerCase()});return new Promise(function(e,t){return a.suggest(r,0,10,n,i).then(function(e){i.length&&e.filter(function(e){return i.indexOf((""+e).toLowerCase())<0})}).catch(function(e){return t(e)})})}),c=new vp(u);return this.service.build().node("#logical",function(e){e.attr("serialize",{"#logical-op":["value"]}).attr("class",{"qb-logical":!0,"qb-and":function(e){return"AND"===e.line.get("#logical-op").expressions[0].value},"qb-or":function(e){return"OR"===e.line.get("#logical-op").expressions[0].value}}).select("#logical-op",{classes:["qb-operation"],options:["AND","OR"],value:"AND"}).node("#condition",function(e){e.attr("serialize",{"#field":["value"],"#operator":["value"],"#value":["value"],"#from":["value"],"#to":["value"],"#in-operand":["values"]}).select("#field",{classes:["qb-field"],options:u.columns().map(function(e){return e.key}),value:u.columns().length?u.columns()[0].key:"",getLabel:function(e,t,n){var r=u.columns().filter(function(e){return e.key===n})[0];return r&&r.title||null},getType:function(e,t,n){var r=u.columns().filter(function(e){return e.key===n})[0];return r&&r.type||null},change:function(e,t){var n=this.value,r=this.getType(n),i=mp[r]||[],o=t.get("#operator").expressions[0];if(i.indexOf(o.value)<0)o.value=i.length?i[0]:null,o.change();else{var a=t.get("#operand").expressions[0];if(a.validate)a.validate().length&&(a.value=null);else a.value=null}}}).select("#operator",{classes:["qb-operator"],getOptions:function(e,t){var n=t.get("#field").expressions[0],r=n.value,i=n.getType(r);return i?mp[i]:[]},value:"EQUALS",change:function(e,t){switch(this.value.toLowerCase()){case"equals":case"not equals":case"greater than":case"less than":case"greater or eq. to":case"less or eq. to":case"like":case"not like":case"starts with":case"ends with":var n=function(e,t,n){var r=e.get(t);if(r&&1===r.expressions.length){var i=r.expressions[0],o=n.filter(function(e){return i.hasOwnProperty(e)})[0];if(o){var a=i[o];return M(a)&&a.length?a[0]:a}}return null}(t,"#operand",["value","values"]);t.put("#operand",e,function(e){e.input("#value",{classes:{"qb-operand":!0,"qb-has-value":function(){return!!this.value},"qb-invalid":function(e){return!this.isValid(e)}},value:n,validate:function(){var e=t.get("#field").expressions[0].value;return c.for(e)(this.value)},placeholderText:"Select value",suggest:r,options:null,refresh:function(e,t){this.options=this.suggest(e,t)}})});break;case"between":t.put("#operand",e,function(e){e.input("#from",{classes:{"qb-operand":!0,"qb-has-value":function(){return!!this.value},"qb-invalid":function(e){return!this.isValid(e)}},validate:function(){var e=t.get("#field").expressions[0].value;return c.for(e)(this.value)},options:r,value:null,placeholderText:"Select value"}).label("#and",{classes:["qb-operand","qb-operand-and-label"],text:"AND"}).input("#to",{classes:{"qb-operand":!0,"qb-has-value":function(){return!!this.value},"qb-invalid":function(e){return!this.isValid(e)}},value:null,validate:function(){var e=t.get("#field").expressions[0].value;return c.for(e)(this.value)},placeholderText:"Select value",suggest:r,options:null,refresh:function(e,t){this.options=this.suggest(e,t)}})});break;case"in":t.put("#operand",e,function(e){e.label("#in-open",{text:"("}).multiselect("#in-operand",{classes:{"qb-operand":!0,"qb-has-value":function(){return!!this.values.length},"qb-invalid":function(e){return!this.isValid(e)}},validate:function(){var e=t.get("#field").expressions[0].value;return c.for(e)(this.values)},values:[],options:s,placeholderText:"Select value",add:function(e,t,n){n&&this.values.indexOf(n)<0&&this.values.push(n)}}).label("#in-close",{text:")"})});break;case"is empty":case"is not empty":t.put("#operand",e,No)}}}).group("#operand",function(e){e.autocomplete("#value",{classes:{"qb-operand":!0,"qb-has-value":function(){return!!this.value},"qb-invalid":function(e){return!this.isValid(e)}},value:null,validate:function(e,t){var n=t.get("#field").expressions[0].value;return c.for(n)(this.value)},placeholderText:"Select value",suggest:r,options:null,refresh:function(e,t){this.options=this.suggest(e,t)}})})})})}}]),t}();function xp(e){switch(e.id){case"#root":return xp(e.children[0]);case"#logical":var t=function(e){var n=kp(e.line,"#logical-op","#logical-op"),t=e.children.filter(bp).map(xp);if(0===t.length)return null;if(1===t.length)return{kind:"group",op:n.value.toLowerCase(),left:t[0],right:null};return t.slice(1).reduce(function(e,t){return{kind:"group",op:n.value.toLowerCase(),left:e,right:t}},t[0])}(e);return!t||t.left||t.right?t:null;case"#condition":return function(e){var t=e.line,n=kp(t,"#operator","#operator"),r=n.value.toUpperCase(),i=void 0;switch(r){case"IS NOT EMPTY":case"IS EMPTY":p=t,v=n.value,i={left:wp(p).value,op:gp[v.toUpperCase()]};break;case"EQUALS":case"NOT EQUALS":case"GREATER OR EQ. TO":case"GREATER THAN":case"LESS OR EQ. TO":case"LESS THAN":case"LIKE":case"NOT LIKE":case"STARTS WITH":case"ENDS WITH":f=t,d=n.value,g=wp(f),m=kp(f,"#operand","#value")||kp(f,"#fieldRight"),i={left:g.value,op:gp[d.toUpperCase()],right:m.value};break;case"BETWEEN":s=wp(u=t),c=kp(u,"#operand","#from")||kp(u,"#fieldFrom"),h=kp(u,"#operand","#to")||kp(u,"#fieldTo"),i={left:s.value,op:"between",right:[c.value,h.value]};break;case"IN":a=wp(o=t),l=kp(o,"#operand","#in-operand")||kp(o,"#fieldRight"),i={left:a.value,op:"in",right:ur(l.values)||l.value};break;default:throw new Xo("converter","Invalid operation "+r)}var o,a,l;var u,s,c,h;var f,d,g,m;var p,v;return i.kind="condition",i}(e);default:throw new Xo("converter","Invalid kind "+e.kind)}}function wp(e){return kp(e,"#field")||kp(e,"#fieldLeft")}function bp(e){return!e.attributes.placeholder}function kp(e,t,n){var r=Cp(e,t);return r?Cp(r.expressions,n||t):null}function Cp(e,t){var n=e.filter(function(e){return e.id===t}),r=n.length;if(1===r)return n[0];if(1<r)throw new Xo("converter","Ambiguous id "+t);return null}var qp=function(){function e(){g(this,e)}return h(e,[{key:"findUp",value:function(e,t){for(;e;){if(t(e))return e;e=e.parent}return null}},{key:"findUpSibling",value:function(e){if(e.parent){var t=e.parent.children,n=t.indexOf(e);if(0<=n)return 0<n?t[n-1]:e.parent}return null}},{key:"depth",value:function(o){var a=this;return function(e,t){t=a.visitLine(e,t,o,o.line);for(var n=o.children,r=n.length,i=0;i<r;i++)t=a.depth(n[i])(e,t);return t}}},{key:"visitLine",value:function(e,t,n,r){for(var i=r.expressions,o=i.length,a=0;a<o;a++)t=this.visitGroup(e,t,n,r,i[a]);return t}},{key:"visitGroup",value:function(e,t,n,r,i){for(var o=i.expressions,a=o.length,l=0;l<a;l++)t=e(t,o[l],r,n);return t}}]),e}(),Op=function(){function i(e,t,n){var r=this;g(this,i),this.plugin=e,this.nodeService=t,this.close=new u.EventEmitter,this.context={$implicit:this},this.traverse=new qp,this.addGroup=new Ea({execute:function(){var e=r.nodeService.current,t=r.findLogicalNode(e),n=t.clone();t.addChildAfter(n,"#condition"===e.id&&e),"#condition"===e.id&&(r.nodeService.current=n)},canExecute:function(){return!!r.findLogicalNode(r.nodeService.current)}}),this.addRule=new Ea({execute:function(){var e=r.nodeService.current,t=r.findLogicalNode(e),n=r.plan.materialize("#condition");t.addChildAfter(n,"#condition"===e.id&&e),"#condition"===e.id&&(r.nodeService.current=n)},canExecute:function(){return!!r.findLogicalNode(r.nodeService.current)}}),this.remove=new Ea({execute:function(){var e=r.nodeService.current;if("#logical"===e.id&&1===e.level)e.clear();else{var t=r.traverse.findUpSibling(e);r.nodeService.current=t,e.remove()}},canExecute:function(){var e=r.nodeService.current;return e&&("#condition"===e.id||1<e.level||0<e.children.length)}}),this.submit=new Ea({source:"query-builder.component",execute:function(){var e=(new Im).serialize(r.node),t=or(r.plugin.model.filter().by);t.$expression=xp(e),r.plugin.model.filter({by:t}),r.plugin.model.queryBuilder({node:t.$expression?e:null}),r.close.emit()},canExecute:function(){return r.traverse.depth(r.node)(function(e,t,n,r){return r.attr("placeholder")?e:e&&t.isValid()},!0)}}),this.cancel=new Ea({source:"query-builder.component",execute:function(){r.close.emit()}}),this.reset=new Ea({source:"query-builder.component",execute:function(){var e=new yp(r.queryService).factory();r.node=e.apply(),r.node.children[0].clear(),r.nodeService.current=r.node.children[0]}})}return h(i,[{key:"ngOnInit",value:function(){this.queryService=new pp(this.plugin.model);var e=new yp(this.queryService);this.plan=e.factory(),this.node=this.plan.apply();var t=new Im,n=this.plugin.model.queryBuilder().node;n&&(this.node=t.deserialize(this.plan,n)),this.nodeService.current=this.node.children[0]}},{key:"findLogicalNode",value:function(e){return this.traverse.findUp(e,function(e){return"#logical"===e.id})}}]),i}();function _p(e,t,n){if(!n)return'<span class="q-grid-markup-condition-value-invalid"></span>';switch(t){case"text":return'<span class="q-grid-markup-condition-quote">\'</span>\n                <span class="q-grid-markup-condition-value q-grid-markup-condition-value-text">'+e+'</span>\n            <span class="q-grid-markup-condition-quote">\'</span>';case"number":return function(e){var t=parseFloat(e);if(!isNaN(t)&&isFinite(t))return'<span class="q-grid-markup-condition-value q-grid-markup-condition-number">'+e+"</span>";return'<span class="q-grid-markup-condition-value q-grid-markup-condition-number q-grid-markup-condition-error">'+e+"</span>"}(e);case"date":return function(e){var t=new Date(e);if("Invalid Date"!==t&&!isNaN(t))return'<span class="q-grid-markup-condition-quote">\'</span>\n                    <span class="q-grid-markup-condition-value q-grid-markup-condition-value-date">'+e+'</span>\n                <span class="q-grid-markup-condition-quote">\'</span>';return'<span class="q-grid-markup-condition-quote">\'</span>\n                <span class="q-grid-markup-condition-value q-grid-markup-condition-value-date q-grid-markup-condition-error">'+e+'</span>\n            <span class="q-grid-markup-condition-quote">\'</span>'}(e);default:return""+e}}Op.decorators=[{type:u.Component,args:[{selector:"q-grid-query-builder-panel",template:'<ng-container key="plugin-query-builder-panel.tpl.html" [context]="context"></ng-container>',providers:[em,Jc]}]}],Op.ctorParameters=function(){return[{type:Jc},{type:jm},{type:em}]},Op.propDecorators={close:[{type:u.Output}]};var Ip=function(e){function i(e,t,n){g(this,i);var r=m(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return r.label=e,r.type=t,r.isValid=n,r}return c(i,xs),h(i,[{key:"visitGroup",value:function(e,t){if(e.right){var n=this.visit(e.left,t),r=this.visit(e.right,t),i='<div class="q-grid-markup-node-left">'+n+'</div><span class="q-grid-markup-group-op">'+e.op+'</span><div class="q-grid-markup-node-right">'+r+"</div>";return'<div class="q-grid-markup-node">'+(1<t?'<span class="q-grid-markup-group-open">(</span>'+i+'<span class="q-grid-markup-group-close">)</span>':i)+"</div>"}return'<div class="q-grid-markup-node">'+this.visit(e.left,t)+'<div class="q-grid-markup-node">'}},{key:"visitUnary",value:function(e){switch(e.op){case"isNotNull":return'<span class="q-grid-markup-condition-left">'+this.label(e.left)+'</span><span class="q-grid-markup-condition-right q-grid-markup-condition-unary">is not empty</span>';case"isNull":return'<span class="q-grid-markup-condition-left">'+this.label(e.left)+'</span><span class="q-grid-markup-condition-right q-grid-markup-condition-unary">is empty</span>';default:throw new Xo("markup.visitor","Invalid operation "+e.op)}}},{key:"visitBinary",value:function(e){var t=void 0;switch(e.op){case"equals":t="=";break;case"notEquals":t="&lt;&gt;";break;case"greaterThanOrEquals":t="&gt;=";break;case"greaterThan":t="&gt;";break;case"lessThanOrEquals":t="&lt;=";break;case"lessThan":t="&lt;";break;case"like":t="like";break;case"notLike":t="not like";break;case"startsWith":t="starts with";break;case"endsWith":t="ends with";break;default:throw new Xo("markup.visitor","Invalid operation "+e.op)}var n=this.isValid(e.left,e.right);return'<span class="q-grid-markup-condition-left">'+this.label(e.left)+'</span>\n                <span class="q-grid-markup-condition-op">'+t+'</span>\n                <span class="q-grid-markup-condition-right">'+_p(e.right,this.type(e.left),n)+"</span>"}},{key:"visitBetween",value:function(e){var t=this.isValid(e.left,e.right);return'<span class="q-grid-markup-condition-left">'+this.label(e.left)+'</span>\n                <span class="q-grid-markup-condition-op">between</span>\n                <span class="q-grid-markup-condition-right">'+_p(e.right[0],this.type(e.left),t)+'</span>\n                <span class="q-grid-markup-condition-op">and</span>\n                <span class="q-grid-markup-condition-right">'+_p(e.right[1],this.type(e.left),t)+"</span>"}},{key:"visitIn",value:function(t){var n=this,r=this.isValid(t.left,t.right);return'<span class="q-grid-markup-condition-left">'+this.label(t.left)+'</span>\n                <span class="q-grid-markup-condition-op">in</span>\n                <span class="q-grid-markup-condition-open">(</span>\n                <span class="q-grid-markup-condition-right">'+t.right.map(function(e){return _p(e,n.type(t.left),r)}).join(", ")+'</span>\n                <span class="q-grid-markup-condition-close">)</span>'}}]),i}(),Ep=function(){function e(){g(this,e)}return h(e,[{key:"transform",value:function(e,t){var n=e;if(n){if(!this.visitor){var r=new vp(t),i=t.columnMap();this.visitor=new Ip(function(e){return i[e].title},function(e){return i[e].type},function(e,t){return 0===r.for(e)(t).length})}var o=xp((new Im).serialize(n));if(o)return this.visitor.visit(o)}return"Please, select a query"}}]),e}();Ep.decorators=[{type:u.Pipe,args:[{name:"qGridQueryBuilderMarkup",pure:!1}]}];var zp=function e(){g(this,e)};zp.decorators=[{type:u.NgModule,args:[{imports:[yg],exports:[rp,Op,Ep],declarations:[rp,Op,Ep]}]}];var Rp=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.valueChange=new u.EventEmitter,e.afterSubmit=new u.EventEmitter,e.afterCancel=new u.EventEmitter,e.context={$implicit:e},e.submit=new Ea,e.cancel=new Ea,e}return c(t,Ys),h(t,[{key:"ngAfterViewInit",value:function(){var r=this,i=this.model,e=this.reference,o=e.commit,a=e.cancel,t=i.edit(),l=t.commitShortcuts,u=t.cancelShortcuts,s=new tf(i);setTimeout(function(){r.submit=new Ea({shortcut:l.form,canExecute:function(){var e=i.selection().items,t={items:e,entries:s.lookup(e)};return o.canExecute(t)},execute:function(){var e=i.selection().items,t={items:e,entries:s.lookup(e)};return!1!==o.execute(t)?r.afterSubmit.emit():r.afterCancel.emit(),!1}}),r.cancel=new Ea({shortcut:u.form||u.$default,canExecute:function(){return a.canExecute()},execute:function(){return!1!==a.execute()&&r.afterCancel.emit(),!1}});var e=i.action(),t=e.shortcut,n=e.manager;r.using(t.register(n,[r.submit,r.cancel]))},0)}},{key:"value",get:function(){return this.state},set:function(e){e!==this.state&&(this.state=e,this.valueChange.emit(e))}}]),t}();Rp.decorators=[{type:u.Component,args:[{selector:"q-grid-reference-editor",template:'<ng-container key="plugin-reference-editor.tpl.html" [context]="context"></ng-container> '}]}],Rp.ctorParameters=function(){return[]},Rp.propDecorators={caption:[{type:u.Input}],cell:[{type:u.Input}],valueChange:[{type:u.Output}],afterSubmit:[{type:u.Output}],afterCancel:[{type:u.Output}],value:[{type:u.Input}]};var jp=function(e){function t(){g(this,t);var e=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.autofocus=!1,e.valueChange=new u.EventEmitter,e.modelChange=new u.EventEmitter,e.referenceChange=new u.EventEmitter,e.context={$implicit:e},e}return c(t,Ys),h(t,[{key:"ngOnInit",value:function(){var o=this;this.reference={commit:new Ea({execute:function(e){return o.value=e.entries}}),cancel:new Ea,value:this.value},this.model=this.cell.column.editorOptions.modelFactory({reference:this.reference,row:this.cell.row,column:this.cell.column,getValue:ta(this.cell.column)});var a=new tf(this.model);this.using(this.model.dataChanged.watch(function(e,t){if(e.hasChanges("rows")&&0<e.state.rows.length&&(t(),!o.model.selection().items.length)){var n=o.reference.value;if(!sr(n)){var r=M(n)?n:[n],i=a.map(r);o.model.selection({items:i},{source:"reference.component"})}}})),this.using(this.model.selectionChanged.watch(function(e){if("reference.component"!==e.tag.source&&e.hasChanges("items")){var t=a.lookup(e.state.items);o.value=t}}))}},{key:"value",get:function(){return this._value},set:function(e){e!==this._value&&(this._value=e,this.valueChange.emit(e))}},{key:"model",get:function(){return this._model},set:function(e){e!==this._model&&(this._model=e,this.modelChange.emit(e))}},{key:"reference",get:function(){return this._reference},set:function(e){e!==this._reference&&(this._reference=e,this.referenceChange.emit(e))}}]),t}();jp.decorators=[{type:u.Component,args:[{selector:"q-grid-reference",template:'<ng-container key="plugin-reference.tpl.html" [context]="context"></ng-container> '}]}],jp.ctorParameters=function(){return[]},jp.propDecorators={autofocus:[{type:u.Input}],cell:[{type:u.Input}],valueChange:[{type:u.Output}],value:[{type:u.Input}],modelChange:[{type:u.Output}],model:[{type:u.Input}],referenceChange:[{type:u.Output}],reference:[{type:u.Input}]};var Sp=function e(){g(this,e)};function Pp(e){var t=e.pagination(),n=e.sort();return{filter:e.filter().by,order:n.by.map(function(e){var t=Object.keys(e)[0];return("asc"===e[t]?"+":"-")+t}),skip:t.current*t.size,take:t.size}}Sp.decorators=[{type:u.NgModule,args:[{declarations:[Rp,jp],exports:[Rp,jp],imports:[yg]}]}];var Ap=function(){function c(r,e){var t=e.get,n=e.post;g(this,c),this.model=r;var i=this.model.rest(),o=i.method,a=i.url,l=i.serialize;if(!a)throw new Xo("rest","REST endpoint URL is required");var u=this.fetchFactory(o,t,n),s=this.serializeFactory(o,l);r.data({pipe:[function(e,t,n){u(a,s(r)).then(function(e){return n(e)})}].concat(b(Vu.view))},{source:"rest.view"})}return h(c,[{key:"fetchFactory",value:function(e,t,n){switch(e.toLowerCase()){case"get":return t;case"post":return n;default:throw new Xo("rest",'"'+e+'" is incorrect REST method')}}},{key:"serializeFactory",value:function(e,t){return L(t)?t:"get"===e?Bs:"post"===e?Pp:void 0}}]),c}(),Lp=function(){function n(e,t){g(this,n),this.http=e,this.plugin=t}return h(n,[{key:"ngOnChanges",value:function(e){this.plugin.keep(e,["rest"])}},{key:"ngOnInit",value:function(){var n=this,e=new Ap(this.plugin.model,{get:function(e,t){return n.http.get(e,{params:t}).toPromise()},post:function(e,t){return n.http.post(e,{data:t}).toPromise()}});this.context={$implicit:e}}}]),n}();Lp.decorators=[{type:u.Component,args:[{selector:"q-grid-rest",template:"",providers:[Jc]}]}],Lp.ctorParameters=function(){return[{type:i.HttpClient},{type:Jc}]},Lp.propDecorators={restUrl:[{type:u.Input,args:["url"]}],restMethod:[{type:u.Input,args:["method"]}],restSerialize:[{type:u.Input,args:["serialize"]}]};var Mp=function e(){g(this,e)};Mp.decorators=[{type:u.NgModule,args:[{imports:[i.HttpClientModule],declarations:[Lp],exports:[Lp]}]}];var Tp=function(){function n(e,t){g(this,n),this.plugin=e,this.context={$implicit:this},t.key=function(){return"plugin-status-bar.tpl.html"}}return h(n,[{key:"rowIndex",get:function(){return this.plugin.model.focus().rowIndex}},{key:"columnIndex",get:function(){return this.plugin.model.focus().columnIndex}}]),n}();Tp.decorators=[{type:u.Component,args:[{selector:"q-grid-status-bar",template:'<ng-container key="plugin-status-bar.tpl.html" [context]="context"></ng-container> ',providers:[Df,Jc]}]}],Tp.ctorParameters=function(){return[{type:Jc},{type:Df}]};var Dp=function e(){g(this,e)};Dp.decorators=[{type:u.NgModule,args:[{declarations:[Tp],exports:[Tp],imports:[yg]}]}];var Np=function(){function n(e,t){g(this,n),this.plugin=e,this.roundTrip=!1,this.context={$implicit:this},this.traps=new Map,this.isActivating=!1,new Pf(t.nativeElement,new Af(this)).on("keydown",function(e){var t=As.translate(e);"tab"!==t&&"shift+tab"!==t||e.stopPropagation()})}return h(n,[{key:"activate",value:function(e){if(!this.isActivating){this.isActivating=!0;try{this.roundTrip?this.goRound(e):this.exit(e)}finally{this.isActivating=!1}}}},{key:"exit",value:function(e){var t={key:"Tab",keyCode:9,shiftKey:"start"===e};this.plugin.model.action().shortcut.keyDown(t,"tab-trap")}},{key:"goRound",value:function(e){switch(e){case"start":this.traps.get("end").focus();break;case"end":this.traps.get("start").focus();break;default:throw new Xo("tab.trap","Invalid target "+e)}}}]),n}();Np.decorators=[{type:u.Component,args:[{selector:"q-grid-tab-trap",template:'<ng-container key="plugin-tab-trap.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],Np.ctorParameters=function(){return[{type:Jc},{type:u.ElementRef}]},Np.propDecorators={template:[{type:u.ContentChild,args:[u.TemplateRef]}],roundTrip:[{type:u.Input}]};var Fp=function(){function n(e){var t=this;g(this,n),(this.element=e).nativeElement.tabIndex=0,new Pf(e.nativeElement,new Af(this)).on("focus",function(){return t.host.activate(t.target)})}return h(n,[{key:"ngOnInit",value:function(){this.host.traps.set(this.target,this)}},{key:"focus",value:function(){this.element.nativeElement.focus()}}]),n}();Fp.decorators=[{type:u.Directive,args:[{selector:"[q-grid-tab-trap-in]"}]}],Fp.ctorParameters=function(){return[{type:u.ElementRef}]},Fp.propDecorators={target:[{type:u.Input,args:["q-grid-tab-trap-in"]}],host:[{type:u.Input,args:["q-grid-tab-trap-host"]}]};var Vp=function e(){g(this,e)};Vp.decorators=[{type:u.NgModule,args:[{declarations:[Np,Fp],exports:[Np,Fp],imports:[yg]}]}];var $p=function(){function t(e){g(this,t),this.plugin=e,this.context={$implicit:this}}return h(t,[{key:"value",get:function(){return this.plugin.model.grid().title}}]),t}();$p.decorators=[{type:u.Component,args:[{selector:"q-grid-title",template:'<ng-container key="plugin-title.tpl.html" [context]="context"></ng-container> ',providers:[Jc]}]}],$p.ctorParameters=function(){return[{type:Jc}]};var Bp=function e(){g(this,e)};Bp.decorators=[{type:u.NgModule,args:[{declarations:[$p],exports:[$p],imports:[yg]}]}];var Up=function(){function t(e){g(this,t),this.model=e}return h(t,[{key:"resolve",value:function(e){var t=this.model.plugin().imports[e];if(!t)switch(e){case"xlsx":throw new Xo("plugin.service","To use export plugin for xlsx format please add http://github.com/SheetJS/js-xlsx library to your project");case"fileSaver":throw new Xo("plugin.service","To use export plugin for file saving please add https://github.com/eligrey/FileSaver.js library to your project");case"pdf":throw new Xo("plugin.service","To use export plugin for pdf format please add https://github.com/MrRio/jsPDF and https://github.com/simonbengtsson/jsPDF-AutoTable libraries to your project");default:throw new Xo("import library","Can't find "+e+" library in imports")}return t}}]),t}();function Hp(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:", ",n={},r=!0,i=!1,o=void 0;try{for(var a,l=Object.entries(e)[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=j(a.value,2),s=u[0],c=u[1];if(M(c)){var h=[],f=!0,d=!1,g=void 0;try{for(var m,p=c[Symbol.iterator]();!(f=(m=p.next()).done);f=!0){var v=m.value;h.push(v)}}catch(e){d=!0,g=e}finally{try{!f&&p.return&&p.return()}finally{if(d)throw g}}n[s]=h.join(t)}else if(I(c)){var y=Hp(c,t),x=!0,w=!1,b=void 0;try{for(var k,C=Object.entries(y)[Symbol.iterator]();!(x=(k=C.next()).done);x=!0){var q=j(k.value,2),O=q[0],_=q[1];n[s+"."+O]=_}}catch(e){w=!0,b=e}finally{try{!x&&C.return&&C.return()}finally{if(w)throw b}}}else n[s]=c}}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}var Wp=function(){function e(){g(this,e)}return h(e,[{key:"write",value:function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=Hp(a.value),s={},c=!0,h=!1,f=void 0;try{for(var d,g=t[Symbol.iterator]();!(c=(d=g.next()).done);c=!0){var m=d.value;s[m.title]=u[m.key]}}catch(e){h=!0,f=e}finally{try{!c&&g.return&&g.return()}finally{if(h)throw f}}n.push(s)}}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return JSON.stringify(n,"",2)}}]),e}();function Gp(e){for(var t=""+e,n=[/</g,/>/g,/&/g,/'/g,/"/g,/\s\s+/g,/\n/g],r=["&lt;","&gt;","&amp;","&apos;","&quot;"," ","&#xA;"],i=0;i<n.length;i++)t=t.replace(n[i],r[i]);return t}function Kp(e){var t="",n=!0,r=!1,i=void 0;try{for(var o,a=Object.entries(e)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=j(o.value,2),u=l[0],s=l[1];if(e.hasOwnProperty(u))if(!I(s)||M(s)||Ht(s))if(M(s)){var c=!0,h=!1,f=void 0;try{for(var d,g=s[Symbol.iterator]();!(c=(d=g.next()).done);c=!0){var m=d.value;Ht(m)?t+="<"+u+">"+Gp(m)+"</"+u+">":t+="<"+u+">"+Kp(m)+"</"+u+">"}}catch(e){h=!0,f=e}finally{try{!c&&g.return&&g.return()}finally{if(h)throw f}}}else Ht(s)&&(t+="<"+u+">"+Gp(s)+"</"+u+">");else t+="<"+u+">"+Kp(s)+"</"+u+">"}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return t}var Yp=function(){function e(){g(this,e)}return h(e,[{key:"write",value:function(e){var t=['<?xml version="1.0" encoding="UTF-8"?><root>'],n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=o.value;t.push(Kp({row:l}))}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return t.push("</root>"),t.join("")}}]),e}();function Zp(e){var t=""+e;return t=t.replace(/"/g,'""'),t=/[\n",]/.test(t)?'"'+t+'"':t}var Jp=function(){function e(){g(this,e)}return h(e,[{key:"write",value:function(e,t){var n=[],r=[],i=[],o=!0,a=!1,l=void 0;try{for(var u,s=t[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value;"data"===c.class&&(r.push(ta(c)),i.push(Zp(c.title)))}}catch(e){a=!0,l=e}finally{try{!o&&s.return&&s.return()}finally{if(a)throw l}}n.push(i.join(","));var h=!0,f=!1,d=void 0;try{for(var g,m=e[Symbol.iterator]();!(h=(g=m.next()).done);h=!0){var p=g.value,v=[],y=!0,x=!1,w=void 0;try{for(var b,k=r[Symbol.iterator]();!(y=(b=k.next()).done);y=!0){var C=b.value;v.push(Zp(C(p)))}}catch(e){x=!0,w=e}finally{try{!y&&k.return&&k.return()}finally{if(x)throw w}}n.push(v.join(","))}}catch(e){f=!0,d=e}finally{try{!h&&m.return&&m.return()}finally{if(f)throw d}}return n.join("\n")}}]),e}();function Qp(a){return function(e,t,n,r){var i=new Blob([t],{type:n}),o=e+"."+(r||n.split("/")[1]);a.saveAs(i,o)}}var Xp=function(){function t(e){g(this,t),this.xlsx=e}return h(t,[{key:"write",value:function(e,t){var n=[],r=[],i=!0,o=!1,a=void 0;try{for(var l,u=e[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var s=l.value;n.push(Hp(s))}}catch(e){o=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}var c=!0,h=!1,f=void 0;try{for(var d,g=t[Symbol.iterator]();!(c=(d=g.next()).done);c=!0){var m=d.value;r.push(m.title)}}catch(e){h=!0,f=e}finally{try{!c&&g.return&&g.return()}finally{if(h)throw f}}var p,v,y=this.xlsx.utils.json_to_sheet(n),x=(p=this.updateTitles(y,r),(v={}).Sheet1=p,{SheetNames:["Sheet1"],Sheets:v});return function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;++r)n[r]=255&e.charCodeAt(r);return t}(this.xlsx.write(x,{bookType:"xlsx",bookSST:!0,cellDates:!0,compression:!0,type:"binary"}))}},{key:"updateTitles",value:function(e,t){for(var n=this.xlsx.utils.decode_range(e["!ref"]),r=n.s.r;r<=n.e.r;++r){var i=this.xlsx.utils.encode_col(r)+"1";e[i]&&(e[i].v=t[r])}return e}}]),t}(),ev=function(){function t(e){g(this,t),this.jsPDF=e}return h(t,[{key:"write",value:function(e,t,n){var r=[],i=[],o=new this.jsPDF({orientation:"landscape",unit:"in"}),a=!0,l=!1,u=void 0;try{for(var s,c=t[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var h=s.value;r.push({title:h.title,dataKey:h.path})}}catch(e){l=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(l)throw u}}var f=!0,d=!1,g=void 0;try{for(var m,p=e[Symbol.iterator]();!(f=(m=p.next()).done);f=!0){var v=m.value;i.push(Hp(v))}}catch(e){d=!0,g=e}finally{try{!f&&p.return&&p.return()}finally{if(d)throw g}}o.autoTable(r,i,{styles:{overflow:"linebreak",fontSize:8,columnWidth:"auto",overflowColumns:!0},headerStyles:{overflow:"ellipsize"},pageBreak:"auto",margin:0}),o.save(n+".pdf")}}]),t}(),tv=function(){function n(e,t){var i=this;g(this,n),this.model=e,this.type=t.type,this.csv=new Ea({source:"export",canExecute:function(){return"csv"===i.type},execute:function(){var e=new Up(i.model).resolve("fileSaver"),t=(new Jp).write(i.rows,i.columns);Qp(e)(i.id,t,"text/"+i.type)}}),this.json=new Ea({source:"export",canExecute:function(){return"json"===i.type},execute:function(){var e=new Up(i.model).resolve("fileSaver"),t=(new Wp).write(i.rows,i.columns);Qp(e)(i.id,t,"text/"+i.type)}}),this.xml=new Ea({source:"export",canExecute:function(){return"xml"===i.type},execute:function(){var e=new Up(i.model).resolve("fileSaver"),t=(new Yp).write(i.rows);Qp(e)(i.id,t,"application/"+i.type)}}),this.xlsx=new Ea({source:"export",canExecute:function(){return"xlsx"===i.type},execute:function(){var e=new Up(i.model),t=e.resolve("xlsx"),n=e.resolve("fileSaver"),r=new Xp(t).write(i.rows,i.columns);Qp(n)(i.id,r,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx")}}),this.pdf=new Ea({source:"export",canExecute:function(){return"pdf"===i.type},execute:function(){var e=new Up(i.model).resolve("pdf");new ev(e).write(i.rows,i.columns,i.id)}})}return h(n,[{key:"columns",get:function(){return this.model.columnList().line}},{key:"rows",get:function(){return this.model.data().rows}},{key:"id",get:function(){return this.model.grid().id}}]),n}(),nv=function(){function r(e,t){var n=this;g(this,r),this.plugin=e,this.templateHost=t,this.context={$implicit:this},this.templateHost.key=function(){return"export-"+n.type}}return h(r,[{key:"ngAfterViewInit",value:function(){var e=this,t=this.plugin.model,n=new tv(t,{type:this.type}),r=new fc(new Ea({execute:function(){return n[e.type].execute()}}),"Export to "+this.type,"file_download");this.templateRef&&(r.templateUrl=this.templateHost.key("trigger")),t.action({items:Cf.list([t.action().items,[r]])},{source:"export.component"})}}]),r}();nv.decorators=[{type:u.Component,args:[{selector:"q-grid-export",template:"",providers:[Df,Jc]}]}],nv.ctorParameters=function(){return[{type:Jc},{type:Df}]},nv.propDecorators={type:[{type:u.Input}],templateRef:[{type:u.ContentChild,args:[u.TemplateRef]}]};var rv=function e(){g(this,e)};function iv(e,t){return t[e]}function ov(e){return e}function av(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZ";return e<t.length?t[e]:""+t[Math.floor(e/t.length-1)]+t[e%t.length]}function lv(e){var t={},n=!0,r=!1,i=void 0;try{for(var o,a=Object.entries(e)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l=j(o.value,2),u=l[0],s=l[1];t[u]=s}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return t}rv.decorators=[{type:u.NgModule,args:[{declarations:[nv],exports:[nv],imports:[yg]}]}];var uv=function(){function t(e){g(this,t),this.xlsx=e}return h(t,[{key:"read",value:function(e,t){var n=this.xlsx.read(e,{type:"binary"});return this.toJson(n,t)}},{key:"toJson",value:function(e){var t={};switch((1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).head){case"alpha":t.header="A";break;case"numeric":t.header=1}var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e.SheetNames[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;n=this.xlsx.utils.sheet_to_json(e.Sheets[u],t).concat(n)}}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n.map(lv)}}]),t}(),sv=1,cv=function(){function e(){g(this,e)}return h(e,[{key:"read",value:function(e){if(!e)return[];var t=(new DOMParser).parseFromString(e,"text/xml").documentElement,n=this.getStatistics(t),r=this.build(t,n,"root"),i=r[Object.keys(r)[0]];return M(i)?i:[i]}},{key:"arrayFromChildren",value:function(e,t,n,r){var i=[],o=Array.from(e.children).filter(function(e){return e.nodeName===r}),a=!0,l=!1,u=void 0;try{for(var s,c=o[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var h=s.value;i.push(this.buildNonArray(h,t,n))}}catch(e){l=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(l)throw u}}return i}},{key:"build",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"root";return t.get(n).isArray?this.arrayFromChildren(e.parentNode,t,n,e.nodeName):this.buildNonArray(e,t,n)}},{key:"buildNonArray",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"root",r=t.get(n);if(r.isObject){var i={},o=new Set,a=!0,l=!1,u=void 0;try{for(var s,c=Array.from(e.attributes)[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var h=s.value;i[h.name]=h.value}}catch(e){l=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(l)throw u}}var f=!0,d=!1,g=void 0;try{for(var m,p=Array.from(e.children)[Symbol.iterator]();!(f=(m=p.next()).done);f=!0){var v=m.value,y=this.getPath(n,v.nodeName);o.has(y)||(o.add(y),i[v.nodeName]=this.build(v,t,y))}}catch(e){d=!0,g=e}finally{try{!f&&p.return&&p.return()}finally{if(d)throw g}}return i}return r.isText?e.textContent:null}},{key:"info",value:function(t,e){return e||(e={isArray:!1,isObject:!1,isText:!1}),{isArray:e.isArray||1<Array.from(t.parentNode.children).filter(function(e){return e.nodeName===t.nodeName}).length,isObject:e.isObject||0<t.children.length||0<t.attributes.length,isText:e.isText||this.isTextContainer(t)}}},{key:"getStatistics",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"root",n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:new Map;n.set(t,this.info(e,n.get(t)));var r=Array.from(e.children);if(0<r.length){var i=!0,o=!1,a=void 0;try{for(var l,u=r[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var s=l.value,c=this.getPath(t,s.nodeName);this.getStatistics(s,c,n)}}catch(e){o=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}}return n}},{key:"isTextContainer",value:function(e){return e.nodeType===sv&&!e.children.length&&e.childNodes.length}},{key:"getPath",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.join("/")}}]),e}(),hv=function(){function e(){g(this,e)}return h(e,[{key:"read",value:function(e){var t=JSON.parse(e);return M(t)?t:[t]}}]),e}(),fv=function(){function a(e){g(this,a),this.text=e||"",this.peeks=[],this.position=0,this.length=this.text.length}return h(a,[{key:"read",value:function(){var e=this.peeks;if(0<e.length)return e.pop();var t=this.position+1;if(t<this.length){var n=this.text[this.position];return this.position=t,n}return a.eof}},{key:"peek",value:function(){return this.peekCore(0)}},{key:"peekPeek",value:function(){return this.peekCore(1)}},{key:"peekCore",value:function(e){var t=this.peeks;if(e<t.length)return t[e];for(var n=this.length,r=t.length;r<=e;r++){var i=this.position+1;if(n<=i)return a.eof;var o=this.text[this.position];this.position=i,t.push(o)}return t[e]}},{key:"seek",value:function(e){var t=this.peeks,n=t.length;for(t.splice(0,Math.Min(e,n)),e-=n;0<=--e;)this.read();return this.peek()}}],[{key:"eof",get:function(){}}]),a}(),dv=function(){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:",";g(this,t),this.delimiter=e}return h(t,[{key:"read",value:function(e){for(var t=new fv(e),n=this.delimiter,r=[],i=[],o="";;){var a=t.peek();if(" "!==a)if(a!==n)if("\n"!==a)if("\r"!==a||"\n"!==t.peekPeek()){if(a===fv.eof){t.read(),(0<i.length||0<o.length)&&(i.push(o),r.push(i));break}o='"'===a?this.readEscapedValue(t,o):this.readUnescapedValue(t,o)}else t.read(),t.read(),(0<i.length||0<o.length)&&(i.push(o),o=""),0<i.length&&(r.push(i),i=[]);else t.read(),(0<i.length||0<o.length)&&(i.push(o),o=""),0<i.length&&(r.push(i),i=[]);else t.read(),i.push(o),o="";else t.read()}return r.map(this.lineToObj)}},{key:"readEscapedValue",value:function(e,t){for(var n=e.read();n!==fv.eof;){if('"'===(n=e.read())){if('"'===e.peek()){t+=e.read();continue}break}t+=n}return t}},{key:"readUnescapedValue",value:function(e,t){for(var n=this.delimiter,r=e.peek();r!==fv.eof&&r!==n&&"\n"!==r&&("\r"!==r||"\n"!==e.peekPeek());)t+=e.read(),r=e.peek();return t}},{key:"lineToObj",value:function(e){for(var t={},n=0,r=e.length;n<r;n++)t[n]=e[n];return t}}]),t}();var gv=function(){function i(e,t){g(this,i),this.model=e;var n=t.element,r=t.options;this.options=r,this.upload=new Ea({source:"import",execute:function(){return(t=(e=n).ownerDocument.createElement("input")).type="file",t.style.display="none",e.appendChild(t),void t.click();var e,t}})}return h(i,[{key:"load",value:function(e){var n=this,t=e.target.files,r=!0,i=!1,o=void 0;try{for(var a,l=function(){var t=a.value,e=new FileReader;e.onload=function(e){!function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},i=e.target.result,o=""===t.type?function(e){if(/[.]/g.test(e)){var t=e.split(".");return t[t.length-1]}}(t.name):t.type,a=new Up(n);switch(o){case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"xlsx":var l=a.resolve("xlsx"),u=new uv(l).read(i,r),s=Pl(n),c=Bl({rows:u,columnFactory:function(e,t){return s("text",t)},deep:!1});n.data({columns:c,rows:u},{source:"read"});break;case"application/json":case"text/json":case"json":var h=(new hv).read(i);if(!h.length)throw new Xo("import","JSON for input should be an array of objects");var f=Pl(n),d=Bl({rows:h,columnFactory:function(e,t){return f("text",t)},deep:!0});n.data({columns:d,rows:h},{source:"read"});break;case"application/xml":case"text/xml":case"xml":var g=(new cv).read(i),m=Bl({rows:g,columnFactory:Pl(n),deep:!0});n.data({columns:m,rows:g},{source:"read"});break;case"application/vnd.ms-excel":case"text/csv":case"csv":var p=(new dv).read(i),v=iv;"alpha"===r.head?v=av:"numeric"===r.head&&(v=ov);var y=Bl({rows:p,columnFactory:Pl(n),deep:!1,title:v});v===iv&&p.shift(0),n.data({columns:y,rows:p},{source:"read"});break;default:throw new Xo("import","This is not valid file type "+o)}}(e,t,n.model,n.options)},e.readAsBinaryString(t)},u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)l()}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}}}]),i}(),mv=function(){function r(e,t,n){g(this,r),this.plugin=e,this.templateHost=t,this.hostElement=n,this.context={$implicit:this},this.templateHost.key=function(){return"import"}}return h(r,[{key:"ngAfterViewInit",value:function(){var e=this.hostElement.nativeElement,t=new Pf(e,new Af(this)),n=this.plugin.model,r={element:e,options:this.options},i=new gv(n,r);t.on("change",function(e){return i.load(e)});var o=new fc(new Ea({execute:function(){return i.upload.execute()}}),"Import data","file_upload");this.templateRef&&(o.templateUrl=this.templateHost.key("trigger")),n.action({items:Cf.list([n.action().items,[o]])},{source:"import.component"})}},{key:"rows",get:function(){return this.plugin.model.data().rows}},{key:"columns",get:function(){return this.plugin.model.columnList().line}},{key:"id",get:function(){return this.plugin.model.grid().id}}]),r}();mv.decorators=[{type:u.Component,args:[{selector:"q-grid-import",template:"",providers:[Df,Jc]}]}],mv.ctorParameters=function(){return[{type:Jc},{type:Df},{type:u.ElementRef}]},mv.propDecorators={options:[{type:u.Input}],templateRef:[{type:u.ContentChild,args:[u.TemplateRef]}]};var pv=function e(){g(this,e)};pv.decorators=[{type:u.NgModule,args:[{declarations:[mv],exports:[mv],imports:[yg]}]}];var vv=function(){function i(e,t){var n,r;g(this,i),this.model=e,this.context=t,this.oldErrors=[],n=this.rules,r=this.key,Rh(n,r).hasRules&&(this.validator=jh(this.rules,this.key))}return h(i,[{key:"errors",get:function(){if(this.validator){var e=R({},this.key,this.value);if(this.validator.validate(e))this.oldErrors.length=0;else{var t=this.validator.getErrors()[this.key],n=Ht(t)?[t]:t;r=n,i=this.oldErrors,Bt(r,i)||(this.oldErrors=n)}return this.oldErrors}var r,i}},{key:"rules",get:function(){return this.model.validation().rules}},{key:"type",get:function(){return this.context.type}},{key:"value",get:function(){return this.context.value}},{key:"key",get:function(){return this.context.key}}]),i}(),yv=function(){function n(e,t){g(this,n),this.plugin=e,this.templateHost=t,this.templateHost.key=function(){return"validator"}}return h(n,[{key:"ngOnInit",value:function(){var e=this.plugin.model,t=new vv(e,this);this.context={$implicit:t}}}]),n}();yv.decorators=[{type:u.Component,args:[{selector:"q-grid-validator",template:'<ng-container key="plugin-validator.tpl.html" [context]="context"></ng-container> ',providers:[Df,Jc]}]}],yv.ctorParameters=function(){return[{type:Jc},{type:Df}]},yv.propDecorators={value:[{type:u.Input}],key:[{type:u.Input}],type:[{type:u.Input}]};var xv=function(){function n(e,t){g(this,n),this.plugin=e,this.templateHost=t,this.context={$implicit:this},this.templateHost.key=function(){return"rule"}}return h(n,[{key:"ngOnChanges",value:function(t){var n=this,r={for:this.for,key:this.key},e=this.plugin.model.validation,i=Array.from(e().rules);Object.keys(t).forEach(function(e){!["for","key"].includes(e)&&t[e].firstChange&&(r[e]=n[e])}),i.push(r),e({rules:i})}}]),n}();xv.decorators=[{type:u.Component,args:[{selector:"q-grid-rule",template:"",providers:[Df,Jc]}]}],xv.ctorParameters=function(){return[{type:Jc},{type:Df}]},xv.propDecorators={for:[{type:u.Input}],key:[{type:u.Input}],required:[{type:u.Input}],not_empty_list:[{type:u.Input,args:["notEmptyList"]}],any_object:[{type:u.Input,args:["anyObject"]}],eq:[{type:u.Input,args:["equal"]}],string:[{type:u.Input}],length_between:[{type:u.Input,args:["lengthBetween"]}],length_equal:[{type:u.Input,args:["lengthEqual"]}],min_length:[{type:u.Input,args:["minLength"]}],max_length:[{type:u.Input,args:["maxLength"]}],one_of:[{type:u.Input,args:["oneOf"]}],like:[{type:u.Input,args:["pattern"]}],integer:[{type:u.Input}],positive_integer:[{type:u.Input,args:["positiveInteger"]}],decimal:[{type:u.Input}],positive_decimal:[{type:u.Input,args:["positiveDecimal"]}],max_number:[{type:u.Input,args:["maxNumber"]}],min_number:[{type:u.Input,args:["minNumber"]}],email:[{type:u.Input}],url:[{type:u.Input}],iso_date:[{type:u.Input,args:["isoDate"]}],equal_to_field:[{type:u.Input,args:["equalToField"]}],list_of:[{type:u.Input,args:["listOf"]}],templateRef:[{type:u.ContentChild,args:[u.TemplateRef]}]};var wv=function e(t){g(this,e),this.plugin=t};wv.decorators=[{type:u.Component,args:[{selector:"q-grid-validation",template:"",providers:[Jc]}]}],wv.ctorParameters=function(){return[{type:Jc}]},wv.propDecorators={type:[{type:u.Input}]};var bv=function e(){g(this,e)};bv.decorators=[{type:u.NgModule,args:[{declarations:[wv,yv,xv],exports:[wv,yv,xv],imports:[yg]}]}],da.register("columnChooser",function e(){g(this,e),this.resource=new Wu,this.canAggregate=!1,this.canSort=!0}).register("columnFilter",function e(){g(this,e),this.threshold=20,this.source="data"}).register("dataManipulation",function e(){g(this,e),this.resource=new Wu,this.deleted=new Set,this.added=new Set,this.edited=new Map,this.rowFactory=function(e){if(e)return ur(e,function(e){return M(e)?[]:!I(e)||Yt(e)||Jt(e)||Gt(e)||L(e)?null:void 0})}}).register("queryBuilder",np);var kv=function e(){g(this,e)};kv.decorators=[{type:u.NgModule,args:[{declarations:[],exports:[Ng,$g,Wg,Kg,Zg,Qg,rm,cm,mm,ym,Fm,Cm,rv,pv,$m,Wm,Xm,tp,zp,Sp,Mp,Dp,Vp,Bp,bv]}]}];var Cv=function e(t,n,r,i){g(this,e),Aa.date=function(e,t){return n.transform(e,t)},Aa.number=function(e,t){return r.transform(e,t)},Aa.currency=function(e,t){return i.transform(e,t)},qa.invoke=function(e){return t.runOutsideAngular(e)},da.register("grid",Ia).register("pipe",$u).register("scene",Bu).register("view",Uu).register("data",Hu).register("selection",ts).register("head",Ku).register("body",Yu).register("navigation",Ju).register("focus",Qu).register("foot",rs).register("layout",Zu).register("row",es).register("columnList",Xu).register("rowList",Gs).register("sort",is).register("group",as).register("pivot",ls).register("edit",ss).register("plugin",us).register("toolbar",cs).register("layer",hs).register("pagination",fs).register("progress",ds).register("highlight",gs).register("visibility",ms).register("filter",ks).register("drag",Cs).register("style",qs).register("scroll",Os).register("export",_s).register("import",Is).register("action",Ts).register("fetch",Ds).register("persistence",Fs).register("validation",Vs).register("template",$s).register("rest",Us).register("animation",Ws)};Cv.decorators=[{type:u.NgModule,args:[{declarations:[],exports:[Tf,Uf,$f,vg,kv,Ag,yg,hd,jg],imports:[Ag,yg],providers:[n.DatePipe,n.DecimalPipe,n.CurrencyPipe,Xc,xd]}]}],Cv.ctorParameters=function(){return[{type:u.NgZone},{type:n.DatePipe},{type:n.DecimalPipe},{type:n.CurrencyPipe}]};var qv=function(){function e(){g(this,e)}return h(e,[{key:"transform",value:function(e,t){if((e||0===e)&&(t||0===t)){e=e.toString(),t=t.toString();var n=new RegExp(Go(t),"gi");if(n.test(e))return e.replace(n,function(e){return'<span class="q-grid-highlight-part">'+Wo(e)+"</span>"});if(new RegExp(Go(e),"gi").test(t))return'<span class="q-grid-highlight-part">'+Wo(e)+"</span>"}return Wo(e)}}]),e}();qv.decorators=[{type:u.Pipe,args:[{name:"qGridHighlight"}]}];var Ov=function(e){function r(){return g(this,r),m(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return c(r,e),h(r,[{key:"transform",value:function(e,t){var n=new Date(e);return n instanceof Date&&!isNaN(n)?s(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"transform",this).call(this,e,t):e}}]),r}(n.DatePipe);Ov.decorators=[{type:u.Pipe,args:[{name:"qGridTime"}]}];var _v=function(){function e(){g(this,e)}return h(e,[{key:"transform",value:function(e,t){var n=t.search,r=void 0===n?null:n,i=t.type,o=void 0===i?"plain":i;if(r||0===r||!1===r){var a=Fg(r);switch(o){case"node":return Zl(e,a);default:return e.filter(a)}}return e}}]),e}();_v.decorators=[{type:u.Pipe,args:[{name:"qGridFilter"}]}];var Iv=function e(){g(this,e)};Iv.decorators=[{type:u.NgModule,args:[{declarations:[qv,_v,Ov],exports:[qv,_v,Ov]}]}],Iv.ctorParameters=function(){return[]},e.GridService=Oa,e.GridModule=Cv,e.GridComponent=Tf,e.Grid=Qc,e.GridPlugin=Jc,e.GridModel=da,e.DomTable=Zc,e.HighlightPipe=qv,e.TimePipe=Ov,e.FilterPipe=_v,e.PipeModule=Iv,e.Action=fc,e.Command=Ea,e.Pipe=Ru,e.PipeUnit=Vu,e.Node=Kl,e.RowDetailsStatus=Mu,e.Shortcut=As,e.ShortcutDispatcher=Ls,e.CommandManager=Ms,e.GridError=Xo,e.ArrayColumn=La,e.BoolColumn=Ta,e.CohortColumn=Na,e.Column=ja,e.CurrencyColumn=Va,e.DataColumn=Pa,e.DateColumn=Ba,e.EmailColumn=Ha,e.FileColumn=Ka,e.FilterRowColumn=Wh,e.GroupColumn=Za,e.GroupSummaryColumn=Qa,e.IdColumn=el,e.ImageColumn=nl,e.NumberColumn=il,e.PadColumn=al,e.PasswordColumn=ul,e.PivotColumn=cl,e.ReferenceColumn=fl,e.RowDetailsColumn=gl,e.RowExpandColumn=pl,e.RowIndicatorColumn=yl,e.RowNumberColumn=wl,e.RowOptionsColumn=kl,e.SelectColumn=ql,e.TextColumn=_l,e.TimeColumn=El,e.UrlColumn=Rl,e.DomBox=Ac,e.DomCell=Ic,e.DomRow=qc,e.DomData=wc,e.DomView=xc,e.PluginModule=kv,e.TemplateModule=yg,e.TemplateService=cc,e.ThemeService=Xc,e.CommonModule=Jd,e.VscrollModule=Vd,e.ColumnView=Sa,e.ɵfa=Yd,e.ɵez=Zd,e.ɵey=Gd,e.ɵex=Kd,e.ɵdv=ad,e.ɵdw=id,e.ɵdx=od,e.ɵem=wd,e.ɵel=bd,e.ɵea=sd,e.ɵeb=cd,e.ɵdz=ld,e.ɵdy=hd,e.ɵbk=em,e.ɵei=$d,e.ɵef=yd,e.ɵeg=pd,e.ɵeh=vd,e.ɵek=td,e.ɵej=nd,e.ɵee=dd,e.ɵed=fd,e.ɵec=gd,e.ɵew=Bd,e.ɵev=Ud,e.ɵeo=Ld,e.ɵes=Fd,e.ɵet=Nd,e.ɵep=Ad,e.ɵer=Md,e.ɵen=jd,e.ɵeu=Dd,e.ɵeq=Cd,e.ɵbn=kd,e.ɵj=Bf,e.ɵb=Ys,e.ɵa=Zs,e.ɵc=ac,e.ɵdq=Wf,e.ɵi=Uf,e.ɵk=Ff,e.ɵl=$f,e.ɵn=Vf,e.ɵfc=Qf,e.ɵfl=sg,e.ɵfm=dg,e.ɵfe=ed,e.ɵbr=hg,e.ɵfb=zg,e.ɵff=Qd,e.ɵfo=bg,e.ɵfg=eg,e.ɵfq=Og,e.ɵfh=tg,e.ɵfi=ng,e.ɵdt=Sg,e.ɵh=hc,e.ɵfj=rg,e.ɵds=jg,e.ɵfn=cg,e.ɵfp=xg,e.ɵg=jf,e.ɵfk=ig,e.ɵfd=Jf,e.ɵfr=_g,e.ɵfs=Eg,e.ɵf=Sf,e.ɵdp=Ag,e.ɵdu=Pg,e.ɵdr=Rg,e.ɵq=Lg,e.ɵp=Ng,e.ɵt=Tg,e.ɵr=Mg,e.ɵs=Dg,e.ɵx=Vg,e.ɵw=$g,e.ɵz=Ug,e.ɵbb=Hg,e.ɵy=Wg,e.ɵba=xd,e.ɵbd=Gg,e.ɵbc=Kg,e.ɵbf=Yg,e.ɵbe=Zg,e.ɵbh=Jg,e.ɵbg=Qg,e.ɵbj=nm,e.ɵbi=rm,e.ɵbp=lm,e.ɵbq=um,e.ɵbs=sm,e.ɵbo=am,e.ɵbm=om,e.ɵbl=cm,e.ɵbu=gm,e.ɵbt=mm,e.ɵbw=vm,e.ɵbv=ym,e.ɵcg=km,e.ɵce=xm,e.ɵcf=bm,e.ɵcd=Cm,e.ɵci=nv,e.ɵch=rv,e.ɵca=Nm,e.ɵcb=Dm,e.ɵby=Sm,e.ɵbz=jm,e.ɵbx=Fm,e.ɵcc=Im,e.ɵck=mv,e.ɵcj=pv,e.ɵcm=Vm,e.ɵcl=$m,e.ɵcp=Hm,e.ɵco=Um,e.ɵcn=Wm,e.ɵcs=Qm,e.ɵcr=Gm,e.ɵcq=Xm,e.ɵcu=ep,e.ɵct=tp,e.ɵcx=Op,e.ɵcw=rp,e.ɵcv=zp,e.ɵcy=Ep,e.ɵda=Rp,e.ɵcz=Sp,e.ɵdb=jp,e.ɵdd=Lp,e.ɵdc=Mp,e.ɵdf=Tp,e.ɵde=Dp,e.ɵdi=Fp,e.ɵdh=Np,e.ɵdg=Vp,e.ɵdk=$p,e.ɵdj=Bp,e.ɵdo=xv,e.ɵdm=wv,e.ɵdl=bv,e.ɵdn=yv,e.ɵo=vg,e.ɵd=sc,e.ɵm=Df,e.ɵv=pg,e.ɵe=uc,e.ɵu=gg,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ng2-qgrid.umd.min.js.map