mirror of
https://github.com/Team4388/ScoutingApp2022.git
synced 2026-06-08 16:28:04 -06:00
3 lines
2.1 MiB
Plaintext
3 lines
2.1 MiB
Plaintext
/*! For license information please see main.64a1750c.js.LICENSE.txt */
|
|
(function(){var e={1167:function(e,t,n){"use strict";function r(e){return null==e||""===e?null:e}function o(e,t){return void 0===t&&(t=!1),null!=e&&(""!==e||t)}function i(e){return!o(e)}function a(e){return null==e||0===e.length}function s(e){return null!=e&&"function"===typeof e.toString?e.toString():null}function l(e){if(void 0!==e){if(null===e||""===e)return null;if("number"===typeof e)return isNaN(e)?void 0:e;var t=parseInt(e,10);return isNaN(t)?void 0:t}}function c(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"===typeof e?e:/true/i.test(e))}function u(e,t,n){void 0===n&&(n=!1);var r=null==e,o=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),r&&o)return 0;if(r)return-1;if(o)return 1;function i(e,t){return e>t?1:e<t?-1:0}if("string"!==typeof e)return i(e,t);if(!n)return i(e,t);try{return e.localeCompare(t)}catch(a){return i(e,t)}}function p(e,t,n){if(null===e||void 0===e)return null;if(!Array.isArray(e))return p(d(e),t,n);for(var r=e,o=null,i=0;i<r.length;i++){var a=r[i];if("string"===typeof t){if(a[t]===n){o=a;break}}else if(t(a)){o=a;break}}return o}function d(e){if(e instanceof Set||e instanceof Map){var t=[];return e.forEach((function(e){return t.push(e)})),t}return Object.keys(e).map((function(t){return e[t]}))}Object.defineProperty(t,"__esModule",{value:!0});var h=Object.freeze({__proto__:null,makeNull:r,exists:o,missing:i,missingOrEmpty:a,toStringOrNull:s,attrToNumber:l,attrToBoolean:c,attrToString:function(e){if(null!=e&&""!==e)return e},referenceCompare:function(e,t){return null==e&&null==t||(null!=e||null==t)&&((null==e||null!=t)&&e===t)},jsonEquals:function(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)},defaultComparator:u,find:p,values:d}),f=function(){function e(){this.existingKeys={}}return e.prototype.addExistingKeys=function(e){for(var t=0;t<e.length;t++)this.existingKeys[e[t]]=!0},e.prototype.getUniqueKey=function(e,t){e=s(e);for(var n=0;;){var r=void 0;if(e?(r=e,0!==n&&(r+="_"+n)):t?(r=t,0!==n&&(r+="_"+n)):r=""+n,!this.existingKeys[r])return this.existingKeys[r]=!0,r;n++}},e}();function g(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<e.length;n++){var r=e[n];if(o(r))return r}return null}function v(e){if(e&&e.length)return e[e.length-1]}function m(e,t,n){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&R(e,(function(e,r){return n?n(e,t[r]):t[r]===e}))}function y(e){return e.sort((function(e,t){return e-t}))}function b(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function w(e,t){A(t,(function(t){return b(e,t)}))}function C(e,t,n){e.splice(n,0,t)}function x(e,t,n){w(e,t),A(t.slice().reverse(),(function(t){return C(e,t,n)}))}function S(e,t){return e.indexOf(t)>-1}function E(e,t){null!=t&&null!=e&&A(t,(function(t){return e.push(t)}))}function _(e,t){for(var n=0;n<e.length;n++)if(t(e[n],n,e))return n;return-1}function R(e,t){if(null==e)return!0;for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}function O(e,t){if(null==e)return!1;for(var n=0;n<e.length;n++)if(t(e[n],n))return!0;return!1}function A(e,t){if(null!=e)for(var n=0;n<e.length;n++)t(e[n],n)}function P(e,t){if(null==e)return null;for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}function T(e,t){if(null==e)return null;for(var n=[],r=0;r<e.length;r++)t(e[r],r)&&n.push(e[r]);return n}var D=Object.freeze({__proto__:null,firstExistingValue:g,anyExists:function(e){return e&&null!=g(e)},existsAndNotEmpty:function(e){return null!=e&&e.length>0},last:v,areEqual:m,compareArrays:function(e,t){return m(e,t)},shallowCompare:function(e,t){return m(e,t)},sortNumerically:y,removeRepeatsFromArray:function(e,t){if(e)for(var n=e.length-2;n>=0;n--){var r=e[n]===t,o=e[n+1]===t;r&&o&&e.splice(n+1,1)}},removeFromArray:b,removeAllFromArray:w,insertIntoArray:C,insertArrayIntoArray:function(e,t,n){if(null!=e&&null!=t)for(var r=t.length-1;r>=0;r--){C(e,t[r],n)}},moveInArray:x,includes:S,flatten:function(e){return[].concat.apply([],e)},pushAll:E,toStrings:function(e){return P(e,s)},findIndex:_,fill:function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=0),void 0===r&&(r=e.length);for(var o=n;o<r;o++)e[o]=t;return e},every:R,some:O,forEach:A,forEachReverse:function(e,t){if(null!=e)for(var n=e.length-1;n>=0;n--)t(e[n],n)},map:P,filter:T,reduce:function(e,t,n){if(null==e||null==n)return null;for(var r=n,o=0;o<e.length;o++)r=t(r,e[o],o);return r},forEachSnapshotFirst:function(e,t){e&&e.slice(0).forEach(t)}});function k(e,t){null!=e&&(Array.isArray(e)?A(e,(function(e,n){return t(""+n,e)})):A(Object.keys(e),(function(n){return t(n,e[n])})))}function N(e){for(var t={},n=Object.keys(e),r=0;r<n.length;r++){var o=n[r],i=e[o];t[o]=i}return t}function M(e,t){if(e){var n=e,r={};return Object.keys(n).forEach((function(e){if(!(t&&t.indexOf(e)>=0)){var o=n[e],i=z(o)&&o.constructor===Object;r[e]=i?M(o):o}})),r}}function I(e,t){return e[t]}function L(e,t,n){e[t]=n}function F(e,t,n,r){var o=I(e,n);void 0!==o&&L(t,n,r?r(o):o)}function G(e){var t={};return e.filter((function(e){return null!=e})).forEach((function(e){A(Object.keys(e),(function(e){return t[e]=null}))})),Object.keys(t)}function H(e){if(!e)return[];var t=Object;if("function"===typeof t.values)return t.values(e);var n=[];for(var r in e)e.hasOwnProperty(r)&&e.propertyIsEnumerable(r)&&n.push(e[r]);return n}function W(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1),o(t)&&k(t,(function(t,o){var i=e[t];if(i!==o){if(r)if(null==i&&null!=o)"object"===typeof o&&o.constructor===Object&&(i={},e[t]=i);z(o)&&z(i)&&!Array.isArray(i)?W(i,o,n,r):(n||void 0!==o)&&(e[t]=o)}}))}function V(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return A(t,(function(t){return k(t,(function(t,n){return e[t]=n}))})),e}function j(e,t,n){if(t&&e){if(!n)return e[t];for(var r=t.split("."),o=e,i=0;i<r.length;i++){if(null==o)return;o=o[r[i]]}return o}}function B(e,t){Object.keys(e).forEach((function(t){"object"===typeof e[t]&&(e[t]=void 0)}));var n=Object.getPrototypeOf(e),r={};Object.keys(n).forEach((function(e){if("function"===typeof n[e]){r[e]={value:function(){console.warn("AG Grid: "+t+" function "+e+"() cannot be called as the grid has been destroyed.\n Please don't call grid API functions on destroyed grids - as a matter of fact you shouldn't\n be keeping the API reference, your application has a memory leak! Remove the API reference\n when the grid is destroyed.")},writable:!0}}})),Object.defineProperties(e,r)}function z(e){return"object"===typeof e&&null!==e}var U=Object.freeze({__proto__:null,iterateObject:k,cloneObject:N,deepCloneObject:function(e){return JSON.parse(JSON.stringify(e))},deepCloneDefinition:M,getProperty:I,setProperty:L,copyPropertiesIfPresent:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];A(n,(function(n){return F(e,t,n)}))},copyPropertyIfPresent:F,getAllKeysInObjects:G,getAllValuesInObject:H,mergeDeep:W,assign:V,missingOrEmptyObject:function(e){return i(e)||0===Object.keys(e).length},get:function(e,t,n){if(null==e)return n;for(var r=t.split("."),o=e;r.length>1;)if(null==(o=o[r.shift()]))return n;var i=o[r[0]];return null!=i?i:n},set:function(e,t,n){if(null!=e){for(var r=t.split("."),o=e;r.length>1;)if(null==(o=o[r.shift()]))return;o[r[0]]=n}},deepFreeze:function e(t){return Object.freeze(t),A(d(t),(function(t){(z(t)||"function"===typeof t)&&e(t)})),t},getValueUsingField:j,removeAllReferences:B,isNonNullObject:z}),Y=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,X=/([^\s,]+)/g,q={};function K(e,t){q[t]||(e(),q[t]=!0)}function $(e){if(e.name)return e.name;var t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function Q(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Z(e){ne(e,400)}var J=[],ee=!1;function te(e){J.push(e),ee||(ee=!0,window.setTimeout((function(){var e=J.slice();J.length=0,ee=!1,e.forEach((function(e){return e()}))}),0))}function ne(e,t){void 0===t&&(t=0),e.length>0&&window.setTimeout((function(){return e.forEach((function(e){return e()}))}),t)}function re(e,t,n){var r;return void 0===n&&(n=!1),function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=this,s=n&&!r;window.clearTimeout(r),r=window.setTimeout((function(){r=null,n||e.apply(a,o)}),t),s&&e.apply(a,o)}}function oe(e,t,n,r){void 0===n&&(n=100);var o=(new Date).getTime(),i=null,a=!1,s=function(){var s=(new Date).getTime()-o>n;(e()||s)&&(t(),a=!0,null!=i&&(window.clearInterval(i),i=null),s&&r&&console.warn(r))};s(),a||(i=window.setInterval(s,10))}function ie(e){e&&e()}var ae=Object.freeze({__proto__:null,doOnce:K,getFunctionName:$,getFunctionParameters:function(e){var t=e.toString().replace(Y,"");return t.slice(t.indexOf("(")+1,t.indexOf(")")).match(X)||[]},isFunction:Q,executeInAWhile:Z,executeNextVMTurn:te,executeAfter:ne,debounce:re,waitUntil:oe,compose:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduce((function(e,t){return t(e)}),t)}},callIfPresent:ie}),se=function(){function e(e,t){if(this.beanWrappers={},this.destroyed=!1,e&&e.beanClasses){this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();var n=this.getBeanInstances();this.wireBeans(n),this.logger.log(">> ag-Application Context ready - component is alive")}}return e.prototype.getBeanInstances=function(){return d(this.beanWrappers).map((function(e){return e.beanInstance}))},e.prototype.createBean=function(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e},e.prototype.wireBeans=function(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),o(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")},e.prototype.createBeans=function(){var e=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),k(this.beanWrappers,(function(t,n){var r;n.bean.__agBeanMetaData&&n.bean.__agBeanMetaData.autowireMethods&&n.bean.__agBeanMetaData.autowireMethods.agConstructor&&(r=n.bean.__agBeanMetaData.autowireMethods.agConstructor);var o=e.getBeansForParameters(r,n.bean.name),i=function(e,t){var n=[null].concat(t);return new(e.bind.apply(e,n))}(n.bean,o);n.beanInstance=i}));var t=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: "+t)},e.prototype.createBeanWrapper=function(e){var t=e.__agBeanMetaData;if(!t){var n=void 0;return n=e.prototype.constructor?$(e.prototype.constructor):""+e,void console.error("Context item "+n+" is not a bean")}var r={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=r},e.prototype.autoWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(n,r){var o=n.agClassAttributes;o&&o.forEach((function(n){var o=t.lookupBeanInstance(r,n.beanName,n.optional);e[n.attributeName]=o}))}))}))},e.prototype.methodWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(n,r){k(n.autowireMethods,(function(n,o){if("agConstructor"!==n){var i=t.getBeansForParameters(o,r);e[n].apply(e,i)}}))}))}))},e.prototype.forEachMetaDataInHierarchy=function(e,t){for(var n=Object.getPrototypeOf(e);null!=n;){var r=n.constructor;if(r.hasOwnProperty("__agBeanMetaData"))t(r.__agBeanMetaData,this.getBeanName(r));n=Object.getPrototypeOf(n)}},e.prototype.getBeanName=function(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;var t=e.toString();return t.substring(9,t.indexOf("("))},e.prototype.getBeansForParameters=function(e,t){var n=this,r=[];return e&&k(e,(function(e,o){var i=n.lookupBeanInstance(t,o);r[Number(e)]=i})),r},e.prototype.lookupBeanInstance=function(e,t,n){if(void 0===n&&(n=!1),"context"===t)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];var r=this.beanWrappers[t];return r?r.beanInstance:(n||console.error("AG Grid: unable to find bean reference "+t+" while initialising "+e),null)},e.prototype.callLifeCycleMethods=function(e,t){var n=this;e.forEach((function(e){return n.callLifeCycleMethodsOnBean(e,t)}))},e.prototype.callLifeCycleMethodsOnBean=function(e,t,n){var r={};this.forEachMetaDataInHierarchy(e,(function(e){var o=e[t];o&&o.forEach((function(e){e!=n&&(r[e]=!0)}))})),Object.keys(r).forEach((function(t){return e[t]()}))},e.prototype.getBean=function(e){return this.lookupBeanInstance("getBean",e,!0)},e.prototype.destroy=function(){if(!this.destroyed){this.logger.log(">> Shutting down ag-Application Context");var e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,this.destroyed=!0,this.logger.log(">> ag-Application Context shut down - component is dead")}},e.prototype.destroyBean=function(e){e&&this.destroyBeans([e])},e.prototype.destroyBeans=function(e){var t=this;return e?(e.forEach((function(e){t.callLifeCycleMethodsOnBean(e,"preDestroyMethods","destroy");var n=e;"function"===typeof n.destroy&&n.destroy()})),[]):[]},e}();function le(e,t,n){var r=ve(e.constructor);r.preConstructMethods||(r.preConstructMethods=[]),r.preConstructMethods.push(t)}function ce(e,t,n){var r=ve(e.constructor);r.postConstructMethods||(r.postConstructMethods=[]),r.postConstructMethods.push(t)}function ue(e,t,n){var r=ve(e.constructor);r.preDestroyMethods||(r.preDestroyMethods=[]),r.preDestroyMethods.push(t)}function pe(e){return function(t){ve(t).beanName=e}}function de(e){return function(t,n,r){fe(t,e,!1,t,n,null)}}function he(e){return function(t,n,r){fe(t,e,!0,t,n,null)}}function fe(e,t,n,r,o,i){if(null!==t)if("number"!==typeof i){var a=ve(e.constructor);a.agClassAttributes||(a.agClassAttributes=[]),a.agClassAttributes.push({attributeName:o,beanName:t,optional:n})}else console.error("AG Grid: Autowired should be on an attribute");else console.error("AG Grid: Autowired name should not be null")}function ge(e){return function(t,n,r){var o,i="function"==typeof t?t:t.constructor;if("number"===typeof r){var a=void 0;n?(o=ve(i),a=n):(o=ve(i),a="agConstructor"),o.autowireMethods||(o.autowireMethods={}),o.autowireMethods[a]||(o.autowireMethods[a]={}),o.autowireMethods[a][r]=e}}}function ve(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var me,ye=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},be=function(e,t){return function(n,r){t(n,r,e)}},we=function(){function e(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}return e.prototype.setBeans=function(e,t,n,r){if(void 0===r&&(r=null),this.frameworkOverrides=n,r){var o=t.useAsyncEvents();this.addGlobalListener(r,o)}},e.prototype.getListeners=function(e,t,n){var r=t?this.allAsyncListeners:this.allSyncListeners,o=r.get(e);return!o&&n&&(o=new Set,r.set(e,o)),o},e.prototype.noRegisteredListenersExist=function(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size},e.prototype.addEventListener=function(e,t,n){void 0===n&&(n=!1),this.getListeners(e,n,!0).add(t)},e.prototype.removeEventListener=function(e,t,n){void 0===n&&(n=!1);var r=this.getListeners(e,n,!1);r&&(r.delete(t),0===r.size&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))},e.prototype.addGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)},e.prototype.removeGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)},e.prototype.dispatchEvent=function(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0},e.prototype.dispatchEventOnce=function(e){this.firedEvents[e.type]||this.dispatchEvent(e)},e.prototype.dispatchToListeners=function(e,t){var n=this,r=e.type,o=this.getListeners(r,t,!1);o&&function(r){r.forEach((function(r){t?n.dispatchAsync((function(){return r(e)})):r(e)}))}(o),(t?this.globalAsyncListeners:this.globalSyncListeners).forEach((function(o){t?n.dispatchAsync((function(){return n.frameworkOverrides.dispatchEvent(r,(function(){return o(r,e)}),!0)})):n.frameworkOverrides.dispatchEvent(r,(function(){return o(r,e)}),!0)}))},e.prototype.dispatchAsync=function(e){this.asyncFunctionsQueue.push(e),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},e.prototype.flushAsyncQueue=function(){this.scheduled=!1;var e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((function(e){return e()}))},ye([be(0,ge("loggerFactory")),be(1,ge("gridOptionsWrapper")),be(2,ge("frameworkOverrides")),be(3,ge("globalEventListener"))],e.prototype,"setBeans",null),e=ye([pe("eventService")],e)}(),Ce=function(){function e(){}return e.ROW_BUFFER_SIZE=10,e.LAYOUT_INTERVAL=500,e.BATCH_WAIT_MILLIS=50,e.EXPORT_TYPE_DRAG_COPY="dragCopy",e.EXPORT_TYPE_CLIPBOARD="clipboard",e.EXPORT_TYPE_EXCEL="excel",e.EXPORT_TYPE_CSV="csv",e.ROW_MODEL_TYPE_INFINITE="infinite",e.ROW_MODEL_TYPE_VIEWPORT="viewport",e.ROW_MODEL_TYPE_CLIENT_SIDE="clientSide",e.ROW_MODEL_TYPE_SERVER_SIDE="serverSide",e.ALWAYS="always",e.ONLY_WHEN_GROUPING="onlyWhenGrouping",e.PINNED_TOP="top",e.PINNED_BOTTOM="bottom",e.DOM_LAYOUT_NORMAL="normal",e.DOM_LAYOUT_PRINT="print",e.DOM_LAYOUT_AUTO_HEIGHT="autoHeight",e.GROUP_AUTO_COLUMN_ID="ag-Grid-AutoColumn",e.SOURCE_PASTE="paste",e.PINNED_RIGHT="right",e.PINNED_LEFT="left",e.SORT_ASC="asc",e.SORT_DESC="desc",e.INPUT_SELECTOR="input, select, button, textarea",e.FOCUSABLE_SELECTOR="[tabindex], input, select, button, textarea",e.FOCUSABLE_EXCLUDE=".ag-hidden, .ag-hidden *, [disabled], .ag-disabled, .ag-disabled *",e}();(me=t.ModuleNames||(t.ModuleNames={})).CommunityCoreModule="@ag-grid-community/core",me.CommunityAllModules="@ag-grid-community/all",me.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",me.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",me.CsvExportModule="@ag-grid-community/csv-export",me.EnterpriseCoreModule="@ag-grid-enterprise/core",me.EnterpriseAllModules="@ag-grid-enterprise/all",me.RowGroupingModule="@ag-grid-enterprise/row-grouping",me.ColumnToolPanelModule="@ag-grid-enterprise/column-tool-panel",me.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",me.MenuModule="@ag-grid-enterprise/menu",me.SetFilterModule="@ag-grid-enterprise/set-filter",me.MultiFilterModule="@ag-grid-enterprise/multi-filter",me.StatusBarModule="@ag-grid-enterprise/status-bar",me.SideBarModule="@ag-grid-enterprise/side-bar",me.RangeSelectionModule="@ag-grid-enterprise/range-selection",me.MasterDetailModule="@ag-grid-enterprise/master-detail",me.RichSelectModule="@ag-grid-enterprise/rich-select",me.GridChartsModule="@ag-grid-enterprise/charts",me.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",me.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",me.ExcelExportModule="@ag-grid-enterprise/excel-export",me.ClipboardModule="@ag-grid-enterprise/clipboard",me.SparklinesModule="@ag-grid-enterprise/sparklines",me.AngularModule="@ag-grid-community/angular",me.ReactModule="@ag-grid-community/react",me.VueModule="@ag-grid-community/vue",me.PolymerModule="@ag-grid-community/polymer";var xe=function(){function e(){}return e.register=function(t,n){void 0===n&&(n=!0),e.modulesMap[t.moduleName]=t,void 0===e.moduleBased?e.moduleBased=n:e.moduleBased!==n&&K((function(){console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")}),"ModulePackageCheck")},e.registerModules=function(t,n){void 0===n&&(n=!0),t&&t.forEach((function(t){return e.register(t,n)}))},e.assertRegistered=function(e,t){if(this.isRegistered(e))return!0;var n="AG Grid: unable to use "+t+" as module "+e+" is not present. Please see: https://www.ag-grid.com/javascript-grid/modules/";return K((function(){console.warn(n)}),t+e),!1},e.isRegistered=function(t){return!!e.modulesMap[t]},e.getRegisteredModules=function(){return d(e.modulesMap)},e.isPackageBased=function(){return!e.moduleBased},e.modulesMap={},e}(),Se=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ee=0,_e=function(){function e(e,t,n,r){this.instanceId=Ee++,this.moving=!1,this.menuVisible=!1,this.filterActive=!1,this.eventService=new we,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=r,this.setState(e)}return e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.setState=function(e){void 0!==e.sort?e.sort!==Ce.SORT_ASC&&e.sort!==Ce.SORT_DESC||(this.sort=e.sort):e.initialSort!==Ce.SORT_ASC&&e.initialSort!==Ce.SORT_DESC||(this.sort=e.initialSort);var t=l(e.sortIndex),n=l(e.initialSortIndex);void 0!==t?null!==t&&(this.sortIndex=t):null!==n&&(this.sortIndex=n);var r=c(e.hide),o=c(e.initialHide);this.visible=void 0!==r?!r:!o,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);var i=l(e.flex),a=l(e.initialFlex);void 0!==i?this.flex=i:void 0!==a&&(this.flex=a)},e.prototype.setColDef=function(e,t){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation()},e.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef},e.prototype.setParent=function(e){this.parent=e},e.prototype.getParent=function(){return this.parent},e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.initialise=function(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.validate()},e.prototype.initDotNotation=function(){var e=this.gridOptionsWrapper.isSuppressFieldDotNotation();this.fieldContainsDots=o(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=o(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e},e.prototype.initMinAndMaxWidths=function(){var e=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(e),this.maxWidth=this.columnUtils.calculateColMaxWidth(e)},e.prototype.resetActualWidth=function(e){void 0===e&&(e="api");var t=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)},e.prototype.isEmptyGroup=function(){return!1},e.prototype.isRowGroupDisplayed=function(e){if(i(this.colDef)||i(this.colDef.showRowGroup))return!1;var t=!0===this.colDef.showRowGroup,n=this.colDef.showRowGroup===e;return t||n},e.prototype.isPrimary=function(){return this.primary},e.prototype.isFilterAllowed=function(){var e=!!this.colDef.filter||!!this.colDef.filterFramework;return this.primary&&e},e.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},e.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},e.prototype.validate=function(){var e=this.colDef;function n(e,t,n){K((function(){n?console.warn(e,n):K((function(){return console.warn(e)}),t)}),t)}if(this.gridOptionsWrapper.isRowModelDefault()&&!xe.isRegistered(t.ModuleNames.RowGroupingModule)){["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","enableValue","pivot","pivotIndex","aggFunc"].forEach((function(r){o(e[r])&&(xe.isPackageBased()?n("AG Grid: "+r+" is only valid in ag-grid-enterprise, your column definition should not have "+r,"ColumnRowGroupingMissing"+r):n("AG Grid: "+r+" is only valid with AG Grid Enterprise Module "+t.ModuleNames.RowGroupingModule+" - your column definition should not have "+r,"ColumnRowGroupingMissing"+r))}))}if(xe.isRegistered(t.ModuleNames.RichSelectModule)||"agRichSelect"===this.colDef.cellEditor&&(xe.isPackageBased()?n("AG Grid: "+this.colDef.cellEditor+" can only be used with ag-grid-enterprise","ColumnRichSelectMissing"):n("AG Grid: "+this.colDef.cellEditor+" can only be used with AG Grid Enterprise Module "+t.ModuleNames.RichSelectModule,"ColumnRichSelectMissing")),this.gridOptionsWrapper.isTreeData()){["rowGroup","rowGroupIndex","pivot","pivotIndex"].forEach((function(t){o(e[t])&&n("AG Grid: "+t+" is not possible when doing tree data, your column definition should not have "+t,"TreeDataCannotRowGroup")}))}o(this.colDef.width)&&"number"!==typeof this.colDef.width&&n("AG Grid: colDef.width should be a number, not "+typeof this.colDef.width,"ColumnCheck_asdfawef"),e.pinnedRowCellRenderer&&n("AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column","colDef.pinnedRowCellRenderer-deprecated"),e.pinnedRowCellRendererParams&&n("AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column","colDef.pinnedRowCellRenderer-deprecated"),e.pinnedRowCellRendererFramework&&n("AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column","colDef.pinnedRowCellRenderer-deprecated"),e.pinnedRowValueGetter&&n("AG Grid: pinnedRowCellRenderer is deprecated, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue.","colDef.pinnedRowCellRenderer-deprecated")},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.createColumnFunctionCallbackParams=function(e){return{node:e,data:e.data,column:this,colDef:this.colDef,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()}},e.prototype.isSuppressNavigable=function(e){if("boolean"===typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"===typeof this.colDef.suppressNavigable){var t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1},e.prototype.isCellEditable=function(e){return!(e.group&&!this.gridOptionsWrapper.isEnableGroupEdit())&&this.isColumnFunc(e,this.colDef.editable)},e.prototype.isSuppressFillHandle=function(){return!!this.colDef.suppressFillHandle},e.prototype.isRowDrag=function(e){return this.isColumnFunc(e,this.colDef.rowDrag)},e.prototype.isDndSource=function(e){return this.isColumnFunc(e,this.colDef.dndSource)},e.prototype.isCellCheckboxSelection=function(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)},e.prototype.isSuppressPaste=function(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)},e.prototype.isResizable=function(){return!0===this.colDef.resizable},e.prototype.isColumnFunc=function(e,t){return"boolean"===typeof t?t:"function"===typeof t&&t(this.createColumnFunctionCallbackParams(e))},e.prototype.setMoving=function(t,n){void 0===n&&(n="api"),this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_MOVING_CHANGED,n))},e.prototype.createColumnEvent=function(e,t){return{api:this.gridApi,columnApi:this.columnApi,type:e,column:this,columns:[this],source:t}},e.prototype.isMoving=function(){return this.moving},e.prototype.getSort=function(){return this.sort},e.prototype.setSort=function(t,n){void 0===n&&(n="api"),this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_SORT_CHANGED,n)))},e.prototype.setMenuVisible=function(t,n){void 0===n&&(n="api"),this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_MENU_VISIBLE_CHANGED,n)))},e.prototype.isMenuVisible=function(){return this.menuVisible},e.prototype.isSortAscending=function(){return this.sort===Ce.SORT_ASC},e.prototype.isSortDescending=function(){return this.sort===Ce.SORT_DESC},e.prototype.isSortNone=function(){return i(this.sort)},e.prototype.isSorting=function(){return o(this.sort)},e.prototype.getSortIndex=function(){return this.sortIndex},e.prototype.setSortIndex=function(e){this.sortIndex=e},e.prototype.setAggFunc=function(e){this.aggFunc=e},e.prototype.getAggFunc=function(){return this.aggFunc},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.getRight=function(){return this.left+this.actualWidth},e.prototype.setLeft=function(t,n){void 0===n&&(n="api"),this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_LEFT_CHANGED,n)))},e.prototype.isFilterActive=function(){return this.filterActive},e.prototype.setFilterActive=function(t,n,r){void 0===n&&(n="api"),this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FILTER_ACTIVE_CHANGED,n)));var o=this.createColumnEvent(e.EVENT_FILTER_CHANGED,n);r&&W(o,r),this.eventService.dispatchEvent(o)},e.prototype.setPinned=function(e){!0===e||e===Ce.PINNED_LEFT?this.pinned=Ce.PINNED_LEFT:e===Ce.PINNED_RIGHT?this.pinned=Ce.PINNED_RIGHT:this.pinned=null},e.prototype.setFirstRightPinned=function(t,n){void 0===n&&(n="api"),this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FIRST_RIGHT_PINNED_CHANGED,n)))},e.prototype.setLastLeftPinned=function(t,n){void 0===n&&(n="api"),this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_LAST_LEFT_PINNED_CHANGED,n)))},e.prototype.isFirstRightPinned=function(){return this.firstRightPinned},e.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},e.prototype.isPinned=function(){return this.pinned===Ce.PINNED_LEFT||this.pinned===Ce.PINNED_RIGHT},e.prototype.isPinnedLeft=function(){return this.pinned===Ce.PINNED_LEFT},e.prototype.isPinnedRight=function(){return this.pinned===Ce.PINNED_RIGHT},e.prototype.getPinned=function(){return this.pinned},e.prototype.setVisible=function(t,n){void 0===n&&(n="api");var r=!0===t;this.visible!==r&&(this.visible=r,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_VISIBLE_CHANGED,n)))},e.prototype.isVisible=function(){return this.visible},e.prototype.getColDef=function(){return this.colDef},e.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},e.prototype.getColId=function(){return this.colId},e.prototype.getId=function(){return this.getColId()},e.prototype.getUniqueId=function(){return this.getId()},e.prototype.getDefinition=function(){return this.colDef},e.prototype.getActualWidth=function(){return this.actualWidth},e.prototype.createBaseColDefParams=function(e){return{node:e,data:e.data,colDef:this.colDef,column:this,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}},e.prototype.getColSpan=function(e){if(i(this.colDef.colSpan))return 1;var t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)},e.prototype.getRowSpan=function(e){if(i(this.colDef.rowSpan))return 1;var t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)},e.prototype.setActualWidth=function(e,t,n){void 0===t&&(t="api"),void 0===n&&(n=!1),null!=this.minWidth&&(e=Math.max(e,this.minWidth)),null!=this.maxWidth&&(e=Math.min(e,this.maxWidth)),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t))},e.prototype.fireColumnWidthChangedEvent=function(t){this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_WIDTH_CHANGED,t))},e.prototype.isGreaterThanMax=function(e){return null!=this.maxWidth&&e>this.maxWidth},e.prototype.getMinWidth=function(){return this.minWidth},e.prototype.getMaxWidth=function(){return this.maxWidth},e.prototype.getFlex=function(){return this.flex||0},e.prototype.setFlex=function(e){this.flex!==e&&(this.flex=e)},e.prototype.setMinimum=function(e){void 0===e&&(e="api"),o(this.minWidth)&&this.setActualWidth(this.minWidth,e)},e.prototype.setRowGroupActive=function(t,n){void 0===n&&(n="api"),this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_ROW_GROUP_CHANGED,n)))},e.prototype.isRowGroupActive=function(){return this.rowGroupActive},e.prototype.setPivotActive=function(t,n){void 0===n&&(n="api"),this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_PIVOT_CHANGED,n)))},e.prototype.isPivotActive=function(){return this.pivotActive},e.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},e.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},e.prototype.setValueActive=function(t,n){void 0===n&&(n="api"),this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_VALUE_CHANGED,n)))},e.prototype.isValueActive=function(){return this.aggregationActive},e.prototype.isAllowPivot=function(){return!0===this.colDef.enablePivot},e.prototype.isAllowValue=function(){return!0===this.colDef.enableValue},e.prototype.isAllowRowGroup=function(){return!0===this.colDef.enableRowGroup},e.prototype.getMenuTabs=function(e){var t=this.getColDef().menuTabs;return null==t&&(t=e),t},e.prototype.isLockPosition=function(){return console.warn("AG Grid: since v21, col.isLockPosition() should not be used, please use col.getColDef().lockPosition instead."),!!this.colDef&&!!this.colDef.lockPosition},e.prototype.isLockVisible=function(){return console.warn("AG Grid: since v21, col.isLockVisible() should not be used, please use col.getColDef().lockVisible instead."),!!this.colDef&&!!this.colDef.lockVisible},e.prototype.isLockPinned=function(){return console.warn("AG Grid: since v21, col.isLockPinned() should not be used, please use col.getColDef().lockPinned instead."),!!this.colDef&&!!this.colDef.lockPinned},e.EVENT_MOVING_CHANGED="movingChanged",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_WIDTH_CHANGED="widthChanged",e.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",e.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",e.EVENT_VISIBLE_CHANGED="visibleChanged",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",e.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_PIVOT_CHANGED="columnPivotChanged",e.EVENT_VALUE_CHANGED="columnValueChanged",Se([de("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),Se([de("columnUtils")],e.prototype,"columnUtils",void 0),Se([de("columnApi")],e.prototype,"columnApi",void 0),Se([de("gridApi")],e.prototype,"gridApi",void 0),Se([de("context")],e.prototype,"context",void 0),Se([ce],e.prototype,"initialise",null),e}(),Re=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Oe=function(){function e(e,t,n,r){this.displayedChildren=[],this.localEventService=new we,this.groupId=t,this.instanceId=n,this.originalColumnGroup=e,this.pinned=r}return e.createUniqueId=function(e,t){return e+"_"+t},e.prototype.reset=function(){this.parent=null,this.children=null,this.displayedChildren=null},e.prototype.getParent=function(){return this.parent},e.prototype.setParent=function(e){this.parent=e},e.prototype.getUniqueId=function(){return e.createUniqueId(this.groupId,this.instanceId)},e.prototype.isEmptyGroup=function(){return 0===this.displayedChildren.length},e.prototype.isMoving=function(){var e=this.getOriginalColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every((function(e){return e.isMoving()}))},e.prototype.checkLeft=function(){if(this.displayedChildren.forEach((function(t){t instanceof e&&t.checkLeft()})),this.displayedChildren.length>0)if(this.gridOptionsWrapper.isEnableRtl()){var t=v(this.displayedChildren).getLeft();this.setLeft(t)}else{var n=this.displayedChildren[0].getLeft();this.setLeft(n)}else this.setLeft(null)},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.setLeft=function(t){this.oldLeft=t,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))},e.prototype.getPinned=function(){return this.pinned},e.prototype.createAgEvent=function(e){return{type:e}},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.isChildInThisGroupDeepSearch=function(t){var n=!1;return this.children.forEach((function(r){t===r&&(n=!0),r instanceof e&&r.isChildInThisGroupDeepSearch(t)&&(n=!0)})),n},e.prototype.getActualWidth=function(){var e=0;return this.displayedChildren&&this.displayedChildren.forEach((function(t){e+=t.getActualWidth()})),e},e.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var e=!1;return this.displayedChildren.forEach((function(t){t.isResizable()&&(e=!0)})),e},e.prototype.getMinWidth=function(){var e=0;return this.displayedChildren.forEach((function(t){e+=t.getMinWidth()||0})),e},e.prototype.addChild=function(e){this.children||(this.children=[]),this.children.push(e)},e.prototype.getDisplayedChildren=function(){return this.displayedChildren},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.getDisplayedLeafColumns=function(){var e=[];return this.addDisplayedLeafColumns(e),e},e.prototype.getDefinition=function(){return this.originalColumnGroup.getColGroupDef()},e.prototype.getColGroupDef=function(){return this.originalColumnGroup.getColGroupDef()},e.prototype.isPadding=function(){return this.originalColumnGroup.isPadding()},e.prototype.isExpandable=function(){return this.originalColumnGroup.isExpandable()},e.prototype.isExpanded=function(){return this.originalColumnGroup.isExpanded()},e.prototype.setExpanded=function(e){this.originalColumnGroup.setExpanded(e)},e.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach((function(n){n instanceof _e?t.push(n):n instanceof e&&n.addDisplayedLeafColumns(t)}))},e.prototype.addLeafColumns=function(t){this.children.forEach((function(n){n instanceof _e?t.push(n):n instanceof e&&n.addLeafColumns(t)}))},e.prototype.getChildren=function(){return this.children},e.prototype.getColumnGroupShow=function(){return this.originalColumnGroup.getColumnGroupShow()},e.prototype.getOriginalColumnGroup=function(){return this.originalColumnGroup},e.prototype.getPaddingLevel=function(){var e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0},e.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[];for(var n=this;null!=n&&n.isPadding();)n=n.getParent();if(!(!!n&&n.originalColumnGroup.isExpandable()))return this.displayedChildren=this.children,void this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED));this.children.forEach((function(r){if(!(r instanceof e&&(!r.displayedChildren||!r.displayedChildren.length)))switch(r.getColumnGroupShow()){case e.HEADER_GROUP_SHOW_OPEN:n.originalColumnGroup.isExpanded()&&t.displayedChildren.push(r);break;case e.HEADER_GROUP_SHOW_CLOSED:n.originalColumnGroup.isExpanded()||t.displayedChildren.push(r);break;default:t.displayedChildren.push(r)}})),this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))},e.HEADER_GROUP_SHOW_OPEN="open",e.HEADER_GROUP_SHOW_CLOSED="closed",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",Re([de("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),e}(),Ae=function(){function e(e,t,n,r){this.localEventService=new we,this.expandable=!1,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=n,this.level=r}return e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.getLevel=function(){return this.level},e.prototype.isVisible=function(){return!!this.children&&this.children.some((function(e){return e.isVisible()}))},e.prototype.isPadding=function(){return this.padding},e.prototype.setExpanded=function(t){this.expanded=void 0!==t&&t;var n={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(n)},e.prototype.isExpandable=function(){return this.expandable},e.prototype.isExpanded=function(){return this.expanded},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getId=function(){return this.getGroupId()},e.prototype.setChildren=function(e){this.children=e},e.prototype.getChildren=function(){return this.children},e.prototype.getColGroupDef=function(){return this.colGroupDef},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.addLeafColumns=function(t){this.children&&this.children.forEach((function(n){n instanceof _e?t.push(n):n instanceof e&&n.addLeafColumns(t)}))},e.prototype.getColumnGroupShow=function(){var e=this.colGroupDef;if(e)return e.columnGroupShow},e.prototype.setupExpandable=function(){var e=this;this.setExpandable(),this.getLeafColumns().forEach((function(t){return t.addEventListener(_e.EVENT_VISIBLE_CHANGED,e.onColumnVisibilityChanged.bind(e))}))},e.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,n=!1,r=!1,o=this.findChildrenRemovingPadding(),i=0,a=o.length;i<a;i++){var s=o[i];if(s.isVisible()){var l=s.getColumnGroupShow();l===Oe.HEADER_GROUP_SHOW_OPEN?(t=!0,r=!0):l===Oe.HEADER_GROUP_SHOW_CLOSED?(n=!0,r=!0):(t=!0,n=!0)}}var c=t&&n&&r;if(this.expandable!==c){this.expandable=c;var u={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(u)}}},e.prototype.findChildrenRemovingPadding=function(){var t=[];return function n(r){r.forEach((function(r){r instanceof e&&r.isPadding()?n(r.children):t.push(r)}))}(this.children),t},e.prototype.onColumnVisibilityChanged=function(){this.setExpandable()},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_EXPANDABLE_CHANGED="expandableChanged",e}(),Pe={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},Te="__ag_Grid_Stop_Propagation",De=["touchstart","touchend","touchmove","touchcancel"],ke={};function Ne(e){e[Te]=!0}function Me(e){return!0===e[Te]}var Ie=function(){var e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(t){if("boolean"===typeof ke[t])return ke[t];var n=document.createElement(e[t]||"div"),r=(t="on"+t)in n;return r||(n.setAttribute(t,"return;"),r="function"==typeof n[t]),ke[t]=r}}();function Le(e,t,n){for(var r=Fe(t);r;){var o=e.getDomData(r,n);if(o)return o;r=r.parentElement}return null}function Fe(e){var t=e;return t.target||t.srcElement}function Ge(e,t){return!(!t||!e)&&We(t).indexOf(e)>=0}function He(e){for(var t=[],n=Fe(e);n;)t.push(n),n=n.parentElement;return t}function We(e){var t=e;return t.deepPath?t.deepPath():t.path?t.path:t.composedPath?t.composedPath():t.__agGridEventPath?t.__agGridEventPath:He(e)}function Ve(e,t,n,r){var o=S(De,n)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,n,r,o)}var je=Object.freeze({__proto__:null,stopPropagationForAgGrid:Ne,isStopPropagationForAgGrid:Me,isEventSupported:Ie,getCtrlForEvent:Le,addChangeListener:function(e,t){e.addEventListener("changed",t),e.addEventListener("paste",t),e.addEventListener("input",t),e.addEventListener("keydown",t),e.addEventListener("keyup",t)},getTarget:Fe,isElementInEventPath:Ge,createEventPath:He,addAgGridEventPath:function(e){e.__agGridEventPath=We(e)},getEventPath:We,addSafePassiveEventListener:Ve}),Be=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ze=function(){function e(){var e=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.isAlive=function(){return!e.destroyed}}return e.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides},e.prototype.getContext=function(){return this.context},e.prototype.destroy=function(){this.destroyFunctions.forEach((function(e){return e()})),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})},e.prototype.addEventListener=function(e,t){this.localEventService||(this.localEventService=new we),this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)},e.prototype.dispatchEventAsync=function(e){var t=this;window.setTimeout((function(){return t.dispatchEvent(e)}),0)},e.prototype.dispatchEvent=function(e){this.localEventService&&this.localEventService.dispatchEvent(e)},e.prototype.addManagedListener=function(e,t,n){var r=this;if(!this.destroyed){e instanceof HTMLElement?Ve(this.getFrameworkOverrides(),e,t,n):e.addEventListener(t,n);var o=function o(){return e.removeEventListener(t,n),r.destroyFunctions=r.destroyFunctions.filter((function(e){return e!==o})),null};return this.destroyFunctions.push(o),o}},e.prototype.addDestroyFunc=function(e){this.isAlive()?this.destroyFunctions.push(e):e()},e.prototype.createManagedBean=function(e,t){var n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n},e.prototype.createBean=function(e,t,n){return(t||this.getContext()).createBean(e,n)},e.prototype.destroyBean=function(e,t){return(t||this.getContext()).destroyBean(e)},e.prototype.destroyBeans=function(e,t){var n=this;return e&&A(e,(function(e){return n.destroyBean(e,t)})),[]},e.EVENT_DESTROYED="destroyed",Be([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),Be([de("context")],e.prototype,"context",void 0),Be([de("eventService")],e.prototype,"eventService",void 0),Be([de("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),Be([ue],e.prototype,"destroy",null),e}(),Ue=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Xe=function(e,t){return function(n,r){t(n,r,e)}},qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ue(t,e),t.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},t.prototype.createColumnTree=function(e,t,n){var r=new f,o=this.extractExistingTreeData(n),i=o.existingCols,a=o.existingGroups,s=o.existingColKeys;r.addExistingKeys(s);var l=this.recursivelyCreateColumns(e,0,t,i,r,a),c=this.findMaxDept(l,0);this.logger.log("Number of levels for grouped columns is "+c);var u=this.balanceColumnTree(l,0,c,r);return this.columnUtils.depthFirstOriginalTreeSearch(null,u,(function(e,t){e instanceof Ae&&e.setupExpandable(),e.setOriginalParent(t)})),{columnTree:u,treeDept:c}},t.prototype.extractExistingTreeData=function(e){var t=[],n=[],r=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){if(e instanceof Ae){var o=e;n.push(o)}else{var i=e;r.push(i.getId()),t.push(i)}})),{existingCols:t,existingGroups:n,existingColKeys:r}},t.prototype.createForAutoGroups=function(e,t){var n=this,r=[];return e.forEach((function(e){var o=n.createAutoGroupTreeItem(t,e);r.push(o)})),r},t.prototype.createAutoGroupTreeItem=function(e,t){for(var n=t,r=this.findDepth(e)-1;r>=0;r--){var o=new Ae(null,"FAKE_PATH_"+t.getId()+"}_"+r,!0,r);this.context.createBean(o),o.setChildren([n]),n.setOriginalParent(o),n=o}return n},t.prototype.findDepth=function(e){for(var t=0,n=e;n&&n[0]&&n[0]instanceof Ae;)t++,n=n[0].getChildren();return t},t.prototype.balanceColumnTree=function(e,t,n,r){for(var o=[],i=0;i<e.length;i++){var a=e[i];if(a instanceof Ae){var s=a,l=this.balanceColumnTree(s.getChildren(),t+1,n,r);s.setChildren(l),o.push(s)}else{for(var c=void 0,u=void 0,p=n-1;p>=t;p--){var d=r.getUniqueKey(null,null),h=this.createMergedColGroupDef(null),f=new Ae(h,d,!0,t);this.context.createBean(f),u&&u.setChildren([f]),u=f,c||(c=u)}if(c&&u){if(o.push(c),e.some((function(e){return e instanceof Ae}))){u.setChildren([a]);continue}u.setChildren(e);break}o.push(a)}}return o},t.prototype.findMaxDept=function(e,t){for(var n=t,r=0;r<e.length;r++){var o=e[r];if(o instanceof Ae){var i=o,a=this.findMaxDept(i.getChildren(),t+1);n<a&&(n=a)}}return n},t.prototype.recursivelyCreateColumns=function(e,t,n,r,o,i){var a=this,s=[];return e?(e.forEach((function(e){var l;l=a.isColumnGroup(e)?a.createColumnGroup(n,e,t,r,o,i):a.createColumn(n,e,r,o),s.push(l)})),s):s},t.prototype.createColumnGroup=function(e,t,n,r,o,i){var a=this.createMergedColGroupDef(t),s=o.getUniqueKey(a.groupId||null,null),l=new Ae(a,s,!1,n);this.context.createBean(l);var c=this.findExistingGroup(t,i);c&&c.isExpanded()&&l.setExpanded(!0);var u=this.recursivelyCreateColumns(a.children,n+1,e,r,o,i);return l.setChildren(u),l},t.prototype.createMergedColGroupDef=function(e){var t={};return V(t,this.gridOptionsWrapper.getDefaultColGroupDef()),V(t,e),this.checkForDeprecatedItems(t),t},t.prototype.createColumn=function(e,t,n,r){var o=this.mergeColDefs(t);this.checkForDeprecatedItems(o);var i=this.findExistingColumn(t,n);if(i)i.setColDef(o,t),this.applyColumnState(i,o);else{var a=r.getUniqueKey(o.colId,o.field);i=new _e(o,t,a,e),this.context.createBean(i)}return i},t.prototype.applyColumnState=function(e,t){var n=l(t.flex);if(void 0!==n&&e.setFlex(n),e.getFlex()<=0){var r=l(t.width);if(null!=r)e.setActualWidth(r);else{var o=e.getActualWidth();e.setActualWidth(o)}}void 0!==t.sort&&(t.sort==Ce.SORT_ASC||t.sort==Ce.SORT_DESC?e.setSort(t.sort):e.setSort(void 0));var i=l(t.sortIndex);void 0!==i&&e.setSortIndex(i);var a=c(t.hide);void 0!==a&&e.setVisible(!a),void 0!==t.pinned&&e.setPinned(t.pinned)},t.prototype.findExistingColumn=function(e,t){var n=p(t,(function(t){var n=t.getUserProvidedColDef();if(!n)return!1;var r=null!=e.colId,o=null!=e.field;return r?t.getId()===e.colId:o?n.field===e.field:n===e}));return t&&n&&b(t,n),n},t.prototype.findExistingGroup=function(e,t){var n=p(t,(function(t){return!!t.getColGroupDef()&&(!(null==e.groupId)&&t.getId()===e.groupId)}));return n&&b(t,n),n},t.prototype.mergeColDefs=function(e){var t={},n=this.gridOptionsWrapper.getDefaultColDef();W(t,n,!1,!0);var r=e.type;return r||(r=n&&n.type),r&&this.assignColumnTypes(r,t),W(t,e,!1,!0),t},t.prototype.assignColumnTypes=function(e,t){var n=[];if(e instanceof Array){e.some((function(e){return"string"!==typeof e}))?console.warn("ag-grid: if colDef.type is supplied an array it should be of type 'string[]'"):n=e}else{if("string"!==typeof e)return void console.warn("ag-grid: colDef.type should be of type 'string' | 'string[]'");n=e.split(",")}var r=V({},Pe);k(this.gridOptionsWrapper.getColumnTypes()||{},(function(e,t){e in r?console.warn("AG Grid: the column type '"+e+"' is a default column type and cannot be overridden."):r[e]=t})),n.forEach((function(e){var n=r[e.trim()];n?W(t,n,!1,!0):console.warn("ag-grid: colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")}))},t.prototype.checkForDeprecatedItems=function(e){if(e){var t=e;void 0!==t.group&&console.warn("ag-grid: colDef.group is invalid, please check documentation on how to do grouping as it changed in version 3"),void 0!==t.headerGroup&&console.warn("ag-grid: colDef.headerGroup is invalid, please check documentation on how to do grouping as it changed in version 3"),void 0!==t.headerGroupShow&&console.warn("ag-grid: colDef.headerGroupShow is invalid, should be columnGroupShow, please check documentation on how to do grouping as it changed in version 3"),void 0!==t.suppressRowGroup&&console.warn("ag-grid: colDef.suppressRowGroup is deprecated, please use colDef.type instead"),void 0!==t.suppressAggregation&&console.warn("ag-grid: colDef.suppressAggregation is deprecated, please use colDef.type instead"),(t.suppressRowGroup||t.suppressAggregation)&&console.warn("ag-grid: colDef.suppressAggregation and colDef.suppressRowGroup are deprecated, use allowRowGroup, allowPivot and allowValue instead"),t.displayName&&(console.warn("ag-grid: Found displayName "+t.displayName+", please use headerName instead, displayName is deprecated."),t.headerName=t.displayName)}},t.prototype.isColumnGroup=function(e){return void 0!==e.children},Ye([de("columnUtils")],t.prototype,"columnUtils",void 0),Ye([Xe(0,ge("loggerFactory"))],t.prototype,"setBeans",null),t=Ye([pe("columnFactory")],t)}(ze),Ke=function(){function e(){}return e.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",e.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",e.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",e.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",e.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",e.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",e.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",e.EVENT_COLUMN_MOVED="columnMoved",e.EVENT_COLUMN_VISIBLE="columnVisible",e.EVENT_COLUMN_PINNED="columnPinned",e.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",e.EVENT_COLUMN_RESIZED="columnResized",e.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",e.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",e.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",e.EVENT_ROW_GROUP_OPENED="rowGroupOpened",e.EVENT_ROW_DATA_CHANGED="rowDataChanged",e.EVENT_ROW_DATA_UPDATED="rowDataUpdated",e.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",e.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",e.EVENT_CHART_CREATED="chartCreated",e.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",e.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",e.EVENT_CHART_DESTROYED="chartDestroyed",e.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",e.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",e.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",e.EVENT_MODEL_UPDATED="modelUpdated",e.EVENT_PASTE_START="pasteStart",e.EVENT_PASTE_END="pasteEnd",e.EVENT_FILL_START="fillStart",e.EVENT_FILL_END="fillEnd",e.EVENT_CELL_CLICKED="cellClicked",e.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",e.EVENT_CELL_MOUSE_DOWN="cellMouseDown",e.EVENT_CELL_CONTEXT_MENU="cellContextMenu",e.EVENT_CELL_VALUE_CHANGED="cellValueChanged",e.EVENT_ROW_VALUE_CHANGED="rowValueChanged",e.EVENT_CELL_FOCUSED="cellFocused",e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_SELECTION_CHANGED="selectionChanged",e.EVENT_CELL_KEY_DOWN="cellKeyDown",e.EVENT_CELL_KEY_PRESS="cellKeyPress",e.EVENT_CELL_MOUSE_OVER="cellMouseOver",e.EVENT_CELL_MOUSE_OUT="cellMouseOut",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_MODIFIED="filterModified",e.EVENT_FILTER_OPENED="filterOpened",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",e.EVENT_ROW_CLICKED="rowClicked",e.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",e.EVENT_GRID_READY="gridReady",e.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",e.EVENT_VIEWPORT_CHANGED="viewportChanged",e.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",e.EVENT_FIRST_DATA_RENDERED="firstDataRendered",e.EVENT_DRAG_STARTED="dragStarted",e.EVENT_DRAG_STOPPED="dragStopped",e.EVENT_CHECKBOX_CHANGED="checkboxChanged",e.EVENT_ROW_EDITING_STARTED="rowEditingStarted",e.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",e.EVENT_CELL_EDITING_STARTED="cellEditingStarted",e.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",e.EVENT_BODY_SCROLL="bodyScroll",e.EVENT_BODY_SCROLL_END="bodyScrollEnd",e.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",e.EVENT_PAGINATION_CHANGED="paginationChanged",e.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",e.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",e.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",e.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",e.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",e.EVENT_FLASH_CELLS="flashCells",e.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",e.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",e.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",e.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",e.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",e.EVENT_ROW_DRAG_ENTER="rowDragEnter",e.EVENT_ROW_DRAG_MOVE="rowDragMove",e.EVENT_ROW_DRAG_LEAVE="rowDragLeave",e.EVENT_ROW_DRAG_END="rowDragEnd",e.EVENT_POPUP_TO_FRONT="popupToFront",e.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",e.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",e.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",e.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",e.EVENT_KEYBOARD_FOCUS="keyboardFocus",e.EVENT_MOUSE_FOCUS="mouseFocus",e.EVENT_STORE_UPDATED="storeUpdated",e}(),$e=function(){function e(){this.existingIds={}}return e.prototype.getInstanceIdForKey=function(e){var t,n=this.existingIds[e];return t="number"!==typeof n?0:n+1,this.existingIds[e]=t,t},e}(),Qe=/[&<>"']/g,Ze={"&":"&","<":"<",">":">",'"':""","'":"'"};function Je(e,t){if(t=Math.floor(t),0===e.length||0===t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,n-e.length)}function et(e,t,n){return e.length>t?e:((t-=e.length)>n.length&&(n+=Je(n,t/n.length)),n.slice(0,t)+e)}function tt(e){return null===e||void 0===e?null:e.replace(/([A-Z])/g,(function(e){return"-"+e[0].toLowerCase()}))}function nt(e){return null===e||void 0===e?null:e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function rt(e){return e[0].toUpperCase()+e.substr(1).toLowerCase()}function ot(e){return null==e?null:e.toString().toString().replace(Qe,(function(e){return Ze[e]}))}function it(e){if(!e||null==e)return null;return e.replace(/([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g,"$1$4 $2$3$5").replace("."," ").split(" ").map((function(e){return e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")})).join(" ")}function at(e,t){return e===t||null!=e&&e.slice(0,t.length)===t}var st=Object.freeze({__proto__:null,utf8_encode:function(e){var t=String.fromCharCode;function n(e,n){return t(e>>n&63|128)}function r(e){if(e>=0&&e<=31&&10!==e)return"_x"+et(e.toString(16).toUpperCase(),4,"0")+"_";if(0==(4294967168&e))return t(e);var r="";return 0==(4294965248&e)?r=t(e>>6&31|192):0==(4294901760&e)?(!function(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}(e),r=t(e>>12&15|224),r+=n(e,6)):0==(4292870144&e)&&(r=t(e>>18&7|240),r+=n(e,12),r+=n(e,6)),r+=t(63&e|128)}for(var o=function(e){var t=[];if(!e)return[];for(var n,r,o=e.length,i=0;i<o;)(n=e.charCodeAt(i++))>=55296&&n<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?t.push(((1023&n)<<10)+(1023&r)+65536):(t.push(n),i--):t.push(n);return t}(e),i=o.length,a=-1,s="";++a<i;)s+=r(o[a]);return s},stringRepeat:Je,padStart:et,camelCaseToHyphen:tt,hyphenToCamelCase:nt,capitalise:rt,escapeString:ot,camelCaseToHumanText:it,startsWith:at});function lt(e){var t=new Map;return e.forEach((function(e){return t.set(e[0],e[1])})),t}var ct=Object.freeze({__proto__:null,convertToMap:lt,mapById:function(e,t){var n=new Map;return e.forEach((function(e){return n.set(t(e),e)})),n},keys:function(e){var t=[];return e.forEach((function(e,n){return t.push(n)})),t}}),ut=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pt=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},dt=function(e,t){return function(n,r){t(n,r,e)}},ht=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},ft=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.primaryHeaderRowCount=0,t.secondaryHeaderRowCount=0,t.secondaryColumnsPresent=!1,t.gridHeaderRowCount=0,t.displayedColumnsLeft=[],t.displayedColumnsRight=[],t.displayedColumnsCenter=[],t.displayedColumns=[],t.displayedColumnsAndGroupsMap={},t.viewportColumns=[],t.viewportColumnsCenter=[],t.autoHeightActiveAtLeastOnce=!1,t.rowGroupColumns=[],t.valueColumns=[],t.pivotColumns=[],t.ready=!1,t.autoGroupsNeedBuilding=!1,t.forceRecreateAutoGroups=!1,t.pivotMode=!1,t.bodyWidth=0,t.leftWidth=0,t.rightWidth=0,t.bodyWidthDirty=!0,t.colDefVersion=0,t.flexColsCalculatedAtLestOnce=!1,t}return ut(t,e),t.prototype.init=function(){this.suppressColumnVirtualisation=this.gridOptionsWrapper.isSuppressColumnVirtualisation();var e=this.gridOptionsWrapper.isPivotMode();this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.usingTreeData=this.gridOptionsWrapper.isTreeData(),this.addManagedListener(this.gridOptionsWrapper,"autoGroupColumnDef",this.onAutoGroupColumnDefChanged.bind(this))},t.prototype.onAutoGroupColumnDefChanged=function(){this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns("gridOptionsChanged")},t.prototype.getColDefVersion=function(){return this.colDefVersion},t.prototype.setColumnDefs=function(e,t){var n=this;void 0===t&&(t="api");var r=!!this.columnDefs;this.colDefVersion++;var o=this.compareColumnStatesAndRaiseEvents(t);this.columnDefs=e,this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var i=this.primaryColumns,a=this.primaryColumnTree,s=this.columnFactory.createColumnTree(e,!0,a);this.primaryColumnTree=s.columnTree,this.primaryHeaderRowCount=s.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach((function(e){return n.primaryColumnsMap[e.getId()]=e})),this.extractRowGroupColumns(t,i),this.extractPivotColumns(t,i),this.extractValueColumns(t,i),this.ready=!0,this.updateGridColumns(),r&&this.gridColsArePrimary&&!this.gridOptionsWrapper.isMaintainColumnOrder()&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns(),this.dispatchEverythingChanged(t),o(),this.dispatchNewColumnsLoaded()},t.prototype.dispatchNewColumnsLoaded=function(){var e={type:Ke.EVENT_NEW_COLUMNS_LOADED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},t.prototype.dispatchEverythingChanged=function(e){void 0===e&&(e="api");var t={type:Ke.EVENT_COLUMN_EVERYTHING_CHANGED,api:this.gridApi,columnApi:this.columnApi,source:e};this.eventService.dispatchEvent(t)},t.prototype.orderGridColumnsLikePrimary=function(){var e=this,t=this.primaryColumns;t&&this.gridColumns.sort((function(n,r){var o=t.indexOf(n),i=t.indexOf(r),a=o>=0,s=i>=0;return a&&s?o-i:a?1:s?-1:e.gridColumns.indexOf(n)-e.gridColumns.indexOf(r)}))},t.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols},t.prototype.setViewport=function(){this.gridOptionsWrapper.isEnableRtl()?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)},t.prototype.getDisplayedColumnsStartingAt=function(e){for(var t=e,n=[];null!=t;)n.push(t),t=this.getDisplayedColAfter(t);return n},t.prototype.checkViewportColumns=function(){if(null!=this.displayedColumnsCenter){var e=this.viewportColumns.map((function(e){return e.getId()})).join("#");if(this.extractViewport(),e!==this.viewportColumns.map((function(e){return e.getId()})).join("#")){var t={type:Ke.EVENT_VIRTUAL_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}}},t.prototype.setViewportPosition=function(e,t){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns())},t.prototype.isPivotMode=function(){return this.pivotMode},t.prototype.isPivotSettingAllowed=function(e){return!e||!this.gridOptionsWrapper.isTreeData()||(console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1)},t.prototype.setPivotMode=function(e,t){if(void 0===t&&(t="api"),e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)){this.pivotMode=e,this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);var n={type:Ke.EVENT_COLUMN_PIVOT_MODE_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(n)}},t.prototype.getSecondaryPivotColumn=function(e,t){if(!this.secondaryColumnsPresent||!this.secondaryColumns)return null;var n=this.getPrimaryColumn(t),r=null;return this.secondaryColumns.forEach((function(t){var o=t.getColDef().pivotKeys,i=t.getColDef().pivotValueColumn;m(o,e)&&i===n&&(r=t)})),r},t.prototype.setBeans=function(e){this.logger=e.create("columnModel")},t.prototype.setFirstRightAndLastLeftPinned=function(e){var t,n;this.gridOptionsWrapper.isEnableRtl()?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,n=this.displayedColumnsRight?v(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?v(this.displayedColumnsLeft):null,n=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach((function(r){r.setLastLeftPinned(r===t,e),r.setFirstRightPinned(r===n,e)}))},t.prototype.autoSizeColumns=function(e,t,n){var r=this;void 0===n&&(n="api"),this.animationFrameService.flushAllFrames();var o=[],i=-1;for(null==t&&(t=this.gridOptionsWrapper.isSkipHeaderOnAutoSize());0!==i;)i=0,this.actionOnGridColumns(e,(function(e){if(o.indexOf(e)>=0)return!1;var a=r.autoWidthCalculator.getPreferredWidthForColumn(e,t);if(a>0){var s=r.normaliseColumnWidth(e,a);e.setActualWidth(s,n),o.push(e),i++}return!0}),n);this.fireColumnResizedEvent(o,!0,"autosizeColumns")},t.prototype.fireColumnResizedEvent=function(e,t,n,r){if(void 0===r&&(r=null),e&&e.length){var o={type:Ke.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:r,finished:t,api:this.gridApi,columnApi:this.columnApi,source:n};this.eventService.dispatchEvent(o)}},t.prototype.autoSizeColumn=function(e,t,n){void 0===n&&(n="api"),e&&this.autoSizeColumns([e],t,n)},t.prototype.autoSizeAllColumns=function(e,t){void 0===t&&(t="api");var n=this.getAllDisplayedColumns();this.autoSizeColumns(n,e,t)},t.prototype.getColumnsFromTree=function(e){var t=[];return function e(n){for(var r=0;r<n.length;r++){var o=n[r];o instanceof _e?t.push(o):o instanceof Ae&&e(o.getChildren())}}(e),t},t.prototype.getAllDisplayedTrees=function(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null},t.prototype.getPrimaryColumnTree=function(){return this.primaryColumnTree},t.prototype.getHeaderRowCount=function(){return this.gridHeaderRowCount},t.prototype.getDisplayedTreeLeft=function(){return this.displayedTreeLeft},t.prototype.getDisplayedTreeRight=function(){return this.displayedTreeRight},t.prototype.getDisplayedTreeCentre=function(){return this.displayedTreeCentre},t.prototype.isColumnDisplayed=function(e){return this.getAllDisplayedColumns().indexOf(e)>=0},t.prototype.getAllDisplayedColumns=function(){return this.displayedColumns},t.prototype.getViewportColumns=function(){return this.viewportColumns},t.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft},t.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight},t.prototype.getDisplayedColumnsForRow=function(e,t,n,r){for(var o,i=[],a=null,s=function(s){var l,c=t[s],u=t.length-s,p=Math.min(c.getColSpan(e),u),d=[c];if(p>1){for(var h=p-1,f=1;f<=h;f++)d.push(t[s+f]);s+=h}if(n?(l=!1,d.forEach((function(e){n(e)&&(l=!0)}))):l=!0,l){if(0===i.length&&a)!!r&&r(c)&&i.push(a);i.push(c)}a=c,o=s},l=0;l<t.length;l++)s(l),l=o;return i},t.prototype.getViewportCenterColumnsForRow=function(e){var t=this;if(!this.colSpanActive)return this.viewportColumnsCenter;var n=this.suppressColumnVirtualisation?null:this.isColumnInViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,n,(function(e){var n=e.getLeft();return o(n)&&n>t.viewportLeft}))},t.prototype.getAriaColumnIndex=function(e){return this.getAllGridColumns().indexOf(e)+1},t.prototype.isColumnInViewport=function(e){if(e.getColDef().autoHeight)return!0;var t=e.getLeft()||0,n=t+e.getActualWidth(),r=this.viewportLeft-200,o=this.viewportRight+200;return!(t<r&&n<r)&&!(t>o&&n>o)},t.prototype.getDisplayedColumnsLeftWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)},t.prototype.getDisplayedColumnsRightWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsRight)},t.prototype.updatePrimaryColumnList=function(e,t,n,r,o,i){var s=this;if(void 0===i&&(i="api"),e&&!a(e)){var l=!1;if(e.forEach((function(e){var o=s.getPrimaryColumn(e);if(o){if(n){if(t.indexOf(o)>=0)return;t.push(o)}else{if(t.indexOf(o)<0)return;b(t,o)}r(o),l=!0}})),l){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(i);var c={type:o,columns:t,column:1===t.length?t[0]:null,api:this.gridApi,columnApi:this.columnApi,source:i};this.eventService.dispatchEvent(c)}}},t.prototype.setRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,this.setRowGroupActive.bind(this),t)},t.prototype.setRowGroupActive=function(e,t,n){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,n),e||this.gridOptionsWrapper.isSuppressMakeColumnVisibleAfterUnGroup()||t.setVisible(!0,n))},t.prototype.addRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.addRowGroupColumns([e],t)},t.prototype.addRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},t.prototype.removeRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},t.prototype.removeRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.removeRowGroupColumns([e],t)},t.prototype.addPivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,(function(e){return e.setPivotActive(!0,t)}),Ke.EVENT_COLUMN_PIVOT_CHANGED,t)},t.prototype.setPivotColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.pivotColumns,Ke.EVENT_COLUMN_PIVOT_CHANGED,(function(e,n){n.setPivotActive(e,t)}),t)},t.prototype.addPivotColumn=function(e,t){void 0===t&&(t="api"),this.addPivotColumns([e],t)},t.prototype.removePivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,(function(e){return e.setPivotActive(!1,t)}),Ke.EVENT_COLUMN_PIVOT_CHANGED,t)},t.prototype.removePivotColumn=function(e,t){void 0===t&&(t="api"),this.removePivotColumns([e],t)},t.prototype.setPrimaryColumnList=function(e,t,n,r,i){var a=this;t.length=0,o(e)&&e.forEach((function(e){var n=a.getPrimaryColumn(e);n&&t.push(n)})),(this.primaryColumns||[]).forEach((function(e){var n=t.indexOf(e)>=0;r(n,e)})),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(i),this.fireColumnEvent(n,t,i)},t.prototype.setValueColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.valueColumns,Ke.EVENT_COLUMN_VALUE_CHANGED,this.setValueActive.bind(this),t)},t.prototype.setValueActive=function(e,t,n){if(e!==t.isValueActive()&&(t.setValueActive(e,n),e&&!t.getAggFunc())){var r=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(r)}},t.prototype.addValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),Ke.EVENT_COLUMN_VALUE_CHANGED,t)},t.prototype.addValueColumn=function(e,t){void 0===t&&(t="api"),e&&this.addValueColumns([e],t)},t.prototype.removeValueColumn=function(e,t){void 0===t&&(t="api"),this.removeValueColumns([e],t)},t.prototype.removeValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),Ke.EVENT_COLUMN_VALUE_CHANGED,t)},t.prototype.normaliseColumnWidth=function(e,t){var n=e.getMinWidth();o(n)&&t<n&&(t=n);var r=e.getMaxWidth();return o(r)&&e.isGreaterThanMax(t)&&(t=r),t},t.prototype.getPrimaryOrGridColumn=function(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)},t.prototype.setColumnWidths=function(e,t,n,r){var o=this;void 0===r&&(r="api");var i=[];e.forEach((function(e){var n=o.getPrimaryOrGridColumn(e.key);if(n&&(i.push({width:e.newWidth,ratios:[1],columns:[n]}),"shift"===o.gridOptionsWrapper.getColResizeDefault()&&(t=!t),t)){var r=o.getDisplayedColAfter(n);if(!r)return;var a=n.getActualWidth()-e.newWidth,s=r.getActualWidth()+a;i.push({width:s,ratios:[1],columns:[r]})}})),0!==i.length&&this.resizeColumnSets(i,n,r)},t.prototype.checkMinAndMaxWidthsForSet=function(e){var t=e.columns,n=e.width,r=0,i=0,a=!0;return t.forEach((function(e){var t=e.getMinWidth();r+=t||0;var n=e.getMaxWidth();o(n)&&n>0?i+=n:a=!1})),n>=r&&(!a||n<=i)},t.prototype.resizeColumnSets=function(e,t,n){var r=this;if(!e||e.every((function(e){return r.checkMinAndMaxWidthsForSet(e)}))){var i=[],a=[];e.forEach((function(e){var t=e.width,r=e.columns,s=e.ratios,l={},c={};r.forEach((function(e){return a.push(e)}));for(var u=!0,p=0,d=function(){if(++p>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";u=!1;var e=[],n=0,i=t;r.forEach((function(t,r){if(c[t.getId()])i-=l[t.getId()];else{e.push(t);var o=s[r];n+=o}}));var a=1/n;e.forEach((function(n,r){var p;r===e.length-1?p=i:(p=Math.round(s[r]*t*a),i-=p);var d=n.getMinWidth(),h=n.getMaxWidth();o(d)&&p<d?(p=d,c[n.getId()]=!0,u=!0):o(h)&&h>0&&p>h&&(p=h,c[n.getId()]=!0,u=!0),l[n.getId()]=p}))};u;){if("break"===d())break}r.forEach((function(e){var t=l[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,n),i.push(e))}))}));var s=i.length>0,l=this.refreshFlexedColumns({resizingCols:a,skipSetLeft:!0});s&&(this.setLeftValues(n),this.updateBodyWidths(),this.checkViewportColumns());var c=a.concat(l);(s||t)&&this.fireColumnResizedEvent(c,t,n,l)}else if(t){var u=e&&e.length>0?e[0].columns:null;this.fireColumnResizedEvent(u,t,n)}},t.prototype.setColumnAggFunc=function(e,t,n){if(void 0===n&&(n="api"),e){var r=this.getPrimaryColumn(e);r&&(r.setAggFunc(t),this.fireColumnEvent(Ke.EVENT_COLUMN_VALUE_CHANGED,[r],n))}},t.prototype.fireColumnEvent=function(e,t,n){var r={type:e,columns:t,column:t&&1==t.length?t[0]:null,api:this.gridApi,columnApi:this.columnApi,source:n};this.eventService.dispatchEvent(r)},t.prototype.moveRowGroupColumn=function(e,t,n){void 0===n&&(n="api");var r=this.rowGroupColumns[e];this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,r);var o={type:Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:this.rowGroupColumns,column:1===this.rowGroupColumns.length?this.rowGroupColumns[0]:null,api:this.gridApi,columnApi:this.columnApi,source:n};this.eventService.dispatchEvent(o)},t.prototype.moveColumns=function(e,t,n){if(void 0===n&&(n="api"),this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),void console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");var r=this.getGridColumns(e);if(!!this.doesMovePassRules(r,t)){x(this.gridColumns,r,t),this.updateDisplayedColumns(n);var o={type:Ke.EVENT_COLUMN_MOVED,columns:r,column:1===r.length?r[0]:null,toIndex:t,api:this.gridApi,columnApi:this.columnApi,source:n};this.eventService.dispatchEvent(o),this.columnAnimationService.finish()}},t.prototype.doesMovePassRules=function(e,t){var n=this.gridColumns.slice();return x(n,e,t),!!this.doesMovePassMarryChildren(n)&&!!this.doesMovePassLockedPositions(n)},t.prototype.sortColumnsLikeGridColumns=function(e){var t=this;!e||e.length<=1||(e.filter((function(e){return t.gridColumns.indexOf(e)<0})).length>0||e.sort((function(e,n){return t.gridColumns.indexOf(e)-t.gridColumns.indexOf(n)})))},t.prototype.doesMovePassLockedPositions=function(e){var t=!1,n=!0;return e.forEach((function(e){e.getColDef().lockPosition?t&&(n=!1):t=!0})),n},t.prototype.doesMovePassMarryChildren=function(e){var t=!0;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(n){if(n instanceof Ae){var r=n,o=r.getColGroupDef();if(o&&o.marryChildren){var i=[];r.getLeafColumns().forEach((function(t){var n=e.indexOf(t);i.push(n)})),Math.max.apply(Math,i)-Math.min.apply(Math,i)>r.getLeafColumns().length-1&&(t=!1)}}})),t},t.prototype.moveColumn=function(e,t,n){void 0===n&&(n="api"),this.moveColumns([e],t,n)},t.prototype.moveColumnByIndex=function(e,t,n){void 0===n&&(n="api");var r=this.gridColumns[e];this.moveColumn(r,t,n)},t.prototype.getColumnDefs=function(){var e=this;if(this.primaryColumns){var t=this.primaryColumns.slice();return this.gridColsArePrimary?t.sort((function(t,n){return e.gridColumns.indexOf(t)-e.gridColumns.indexOf(n)})):this.lastPrimaryOrder&&t.sort((function(t,n){return e.lastPrimaryOrder.indexOf(t)-e.lastPrimaryOrder.indexOf(n)})),this.columnDefFactory.buildColumnDefs(t,this.rowGroupColumns,this.pivotColumns)}},t.prototype.getBodyContainerWidth=function(){return this.bodyWidth},t.prototype.getContainerWidth=function(e){switch(e){case Ce.PINNED_LEFT:return this.leftWidth;case Ce.PINNED_RIGHT:return this.rightWidth;default:return this.bodyWidth}},t.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),n=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==n){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=n;var r={type:Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)}},t.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},t.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},t.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},t.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},t.prototype.getDisplayedCenterColumns=function(){return this.displayedColumnsCenter},t.prototype.getDisplayedLeftColumns=function(){return this.displayedColumnsLeft},t.prototype.getDisplayedRightColumns=function(){return this.displayedColumnsRight},t.prototype.getDisplayedColumns=function(e){switch(e){case Ce.PINNED_LEFT:return this.getDisplayedLeftColumns();case Ce.PINNED_RIGHT:return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},t.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},t.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},t.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},t.prototype.getAllGridColumns=function(){return this.gridColumns},t.prototype.isEmpty=function(){return a(this.gridColumns)},t.prototype.isRowGroupEmpty=function(){return a(this.rowGroupColumns)},t.prototype.setColumnVisible=function(e,t,n){void 0===n&&(n="api"),this.setColumnsVisible([e],t,n)},t.prototype.setColumnsVisible=function(e,t,n){var r=this;void 0===t&&(t=!1),void 0===n&&(n="api"),this.columnAnimationService.start(),this.actionOnGridColumns(e,(function(e){return e.isVisible()!==t&&(e.setVisible(t,n),!0)}),n,(function(){return{type:Ke.EVENT_COLUMN_VISIBLE,visible:t,column:null,columns:null,api:r.gridApi,columnApi:r.columnApi,source:n}})),this.columnAnimationService.finish()},t.prototype.setColumnPinned=function(e,t,n){void 0===n&&(n="api"),e&&this.setColumnsPinned([e],t,n)},t.prototype.setColumnsPinned=function(e,t,n){var r,o=this;(void 0===n&&(n="api"),"print"!==this.gridOptionsWrapper.getDomLayout())?(this.columnAnimationService.start(),r=!0===t||t===Ce.PINNED_LEFT?Ce.PINNED_LEFT:t===Ce.PINNED_RIGHT?Ce.PINNED_RIGHT:null,this.actionOnGridColumns(e,(function(e){return e.getPinned()!==r&&(e.setPinned(r),!0)}),n,(function(){return{type:Ke.EVENT_COLUMN_PINNED,pinned:r,column:null,columns:null,api:o.gridApi,columnApi:o.columnApi,source:n}})),this.columnAnimationService.finish()):console.warn("Changing the column pinning status is not allowed with domLayout='print'")},t.prototype.actionOnGridColumns=function(e,t,n,r){var i=this;if(!a(e)){var s=[];if(e.forEach((function(e){var n=i.getGridColumn(e);n&&(!1!==t(n)&&s.push(n))})),s.length&&(this.updateDisplayedColumns(n),o(r)&&r)){var l=r();l.columns=s,l.column=1===s.length?s[0]:null,this.eventService.dispatchEvent(l)}}},t.prototype.getDisplayedColBefore=function(e){var t=this.getAllDisplayedColumns(),n=t.indexOf(e);return n>0?t[n-1]:null},t.prototype.getDisplayedColAfter=function(e){var t=this.getAllDisplayedColumns(),n=t.indexOf(e);return n<t.length-1?t[n+1]:null},t.prototype.getDisplayedGroupAfter=function(e){return this.getDisplayedGroupAtDirection(e,"After")},t.prototype.getDisplayedGroupBefore=function(e){return this.getDisplayedGroupAtDirection(e,"Before")},t.prototype.getDisplayedGroupAtDirection=function(e,t){for(var n=e.getOriginalColumnGroup().getLevel()+e.getPaddingLevel(),r=e.getDisplayedLeafColumns(),o="After"===t?v(r):r[0],i="getDisplayedCol"+t;;){var a=this[i](o);if(!a)return null;var s=this.getColumnGroupAtLevel(a,n);if(s!==e)return s}},t.prototype.getColumnGroupAtLevel=function(e,t){for(var n=e.getParent();;){if(n.getOriginalColumnGroup().getLevel()+n.getPaddingLevel()<=t)break;n=n.getParent()}return n},t.prototype.isPinningLeft=function(){return this.displayedColumnsLeft.length>0},t.prototype.isPinningRight=function(){return this.displayedColumnsRight.length>0},t.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e=this.primaryColumns?this.primaryColumns.slice(0):[];return this.groupAutoColumns&&o(this.groupAutoColumns)&&this.groupAutoColumns.forEach((function(t){return e.push(t)})),this.secondaryColumnsPresent&&this.secondaryColumns&&this.secondaryColumns.forEach((function(t){return e.push(t)})),e},t.prototype.createStateItemFromColumn=function(e){var t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,n=e.isPivotActive()?this.pivotColumns.indexOf(e):null,r=e.isValueActive()?e.getAggFunc():null,o=null!=e.getSort()?e.getSort():null,i=null!=e.getSortIndex()?e.getSortIndex():null,a=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:o,sortIndex:i,aggFunc:r,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:n,flex:a}},t.prototype.getColumnState=function(){if(i(this.primaryColumns)||!this.isAlive())return[];var e=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.pivotMode||this.orderColumnStateList(e),e},t.prototype.getPrimaryAndAutoGroupCols=function(){return this.groupAutoColumns?ht(this.primaryColumns||[],this.groupAutoColumns):this.primaryColumns},t.prototype.orderColumnStateList=function(e){var t=lt(this.gridColumns.map((function(e,t){return[e.getColId(),t]})));e.sort((function(e,n){return(t.has(e.colId)?t.get(e.colId):-1)-(t.has(n.colId)?t.get(n.colId):-1)}))},t.prototype.resetColumnState=function(e){void 0===e&&(e="api");var t=this.getColumnsFromTree(this.primaryColumnTree),n=[],r=1e3,o=1e3,a=[];this.groupAutoColumns&&(a=a.concat(this.groupAutoColumns)),t&&(a=a.concat(t)),a.forEach((function(e){var t=function(e,t){return null!=e?e:null!=t?t:null},a=e.getColDef(),s=t(a.sort,a.initialSort),l=t(a.sortIndex,a.initialSortIndex),c=t(a.hide,a.initialHide),u=t(a.pinned,a.initialPinned),p=t(a.width,a.initialWidth),d=t(a.flex,a.initialFlex),h=t(a.rowGroupIndex,a.initialRowGroupIndex),f=t(a.rowGroup,a.initialRowGroup);null!=h||null!=f&&0!=f||(h=null,f=null);var g=t(a.pivotIndex,a.initialPivotIndex),v=t(a.pivot,a.initialPivot);null!=g||null!=v&&0!=v||(g=null,v=null);var m=t(a.aggFunc,a.initialAggFunc),y={colId:e.getColId(),sort:s,sortIndex:l,hide:c,pinned:u,width:p,flex:d,rowGroup:f,rowGroupIndex:h,pivot:v,pivotIndex:g,aggFunc:m};i(h)&&f&&(y.rowGroupIndex=r++),i(g)&&v&&(y.pivotIndex=o++),n.push(y)})),this.applyColumnState({state:n,applyOrder:!0},e)},t.prototype.applyColumnState=function(e,t){var n=this;if(void 0===t&&(t="api"),a(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;this.columnAnimationService.start();var r=this.compareColumnStatesAndRaiseEvents(t);this.autoGroupsNeedBuilding=!0;var o=this.primaryColumns.slice(),i=!0,s={},l={},c=[],u=this.rowGroupColumns.slice(),p=this.pivotColumns.slice();e.state&&e.state.forEach((function(r){var a=Ce.GROUP_AUTO_COLUMN_ID,u=r.colId||"";if(at(u,a))c.push(r);else{var p=n.getPrimaryColumn(u);p?(n.syncColumnWithStateItem(p,r,e.defaultState,s,l,!1,t),b(o,p)):i=!1}}));var d=function(r){return n.syncColumnWithStateItem(r,null,e.defaultState,s,l,!1,t)};o.forEach(d);var h=function(e,t,n,r){var o=e[n.getId()],i=e[r.getId()],a=null!=o,s=null!=i;if(a&&s)return o-i;if(a)return-1;if(s)return 1;var l=t.indexOf(n),c=t.indexOf(r),u=l>=0;return u&&c>=0?l-c:u?-1:1};this.rowGroupColumns.sort(h.bind(this,s,u)),this.pivotColumns.sort(h.bind(this,l,p)),this.updateGridColumns();var f=this.groupAutoColumns?this.groupAutoColumns.slice():[];return c.forEach((function(r){var o=n.getAutoColumn(r.colId);b(f,o),n.syncColumnWithStateItem(o,r,e.defaultState,null,null,!0,t)})),f.forEach(d),this.applyOrderAfterApplyState(e),this.updateDisplayedColumns(t),this.dispatchEverythingChanged(t),r(),this.columnAnimationService.finish(),i},t.prototype.applyOrderAfterApplyState=function(e){if(this.gridColsArePrimary&&e.applyOrder&&e.state){var t=[],n={},r={};this.gridColumns.forEach((function(e){return r[e.getId()]=e})),e.state.forEach((function(e){if(e.colId&&!n[e.colId]){var o=r[e.colId];o&&(t.push(o),n[e.colId]=!0)}})),this.gridColumns.forEach((function(e){n[e.getColId()]||t.push(e)})),t=this.putFixedColumnsFirst(t),this.doesMovePassMarryChildren(t)?this.gridColumns=t:console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}},t.prototype.compareColumnStatesAndRaiseEvents=function(e){var t=this;if(!!!this.columnDefs)return function(){};var n={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},r=this.getColumnState(),o={};return r.forEach((function(e){o[e.colId]=e})),function(){if(!t.gridOptionsWrapper.isSuppressColumnStateEvents()){var i=t.getPrimaryAndAutoGroupCols(),a=function(n,r,o,i){if(!m(r.map(i),o.map(i))){var a={type:n,columns:o,column:1===o.length?o[0]:null,api:t.gridApi,columnApi:t.columnApi,source:e};t.eventService.dispatchEvent(a)}},s=function(e){var t=[];return(i||[]).forEach((function(n){var r=o[n.getColId()];r&&e(r,n)&&t.push(n)})),t},l=function(e){return e.getColId()};a(Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,n.rowGroupColumns,t.rowGroupColumns,l),a(Ke.EVENT_COLUMN_PIVOT_CHANGED,n.pivotColumns,t.pivotColumns,l);s((function(e,t){var n=null!=e.aggFunc,r=n!=t.isValueActive(),o=n&&e.aggFunc!=t.getAggFunc();return r||o})).length>0&&t.fireColumnEvent(Ke.EVENT_COLUMN_VALUE_CHANGED,t.valueColumns,e);t.fireColumnResizedEvent(s((function(e,t){return e.width!=t.getActualWidth()})),!0,e);t.raiseColumnPinnedEvent(s((function(e,t){return e.pinned!=t.getPinned()})),e);t.raiseColumnVisibleEvent(s((function(e,t){return e.hide==t.isVisible()})),e);s((function(e,t){return e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex()})).length>0&&t.sortController.dispatchSortChangedEvents(),t.raiseColumnMovedEvent(r,e)}}},t.prototype.raiseColumnPinnedEvent=function(e,t){if(e.length){var n=1===e.length?e[0]:null,r=this.getCommonValue(e,(function(e){return e.getPinned()})),o={type:Ke.EVENT_COLUMN_PINNED,pinned:null!=r?r:null,columns:e,column:n,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(o)}},t.prototype.getCommonValue=function(e,t){if(e&&0!=e.length){for(var n=t(e[0]),r=1;r<e.length;r++)if(n!==t(e[r]))return;return n}},t.prototype.raiseColumnVisibleEvent=function(e,t){if(e.length){var n=1===e.length?e[0]:null,r=this.getCommonValue(e,(function(e){return e.isVisible()})),o={type:Ke.EVENT_COLUMN_VISIBLE,visible:r,columns:e,column:n,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(o)}},t.prototype.raiseColumnMovedEvent=function(e,t){var n=this,r=this.getColumnState(),o={};r.forEach((function(e){return o[e.colId]=e}));var i={};e.forEach((function(e){o[e.colId]&&(i[e.colId]=!0)}));var a=T(e,(function(e){return i[e.colId]})),s=T(r,(function(e){return i[e.colId]})),l=[];if(s.forEach((function(e,t){var r=a&&a[t];if(r&&r.colId!==e.colId){var o=n.getGridColumn(r.colId);o&&l.push(o)}})),l.length){var c={type:Ke.EVENT_COLUMN_MOVED,columns:l,column:null,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(c)}},t.prototype.syncColumnWithStateItem=function(e,t,n,r,i,a,s){if(e){var l=function(e,r){var i=t,a=n,s={value1:void 0,value2:void 0},l=!1;return i&&(void 0!==i[e]&&(s.value1=i[e],l=!0),o(r)&&void 0!==i[r]&&(s.value2=i[r],l=!0)),!l&&a&&(void 0!==a[e]&&(s.value1=a[e]),o(r)&&void 0!==a[r]&&(s.value2=a[r])),s},c=l("hide").value1;void 0!==c&&e.setVisible(!c,s);var u=l("pinned").value1;void 0!==u&&e.setPinned(u);var p=this.columnUtils.calculateColMinWidth(e.getColDef()),d=l("flex").value1;if(void 0!==d&&e.setFlex(d),e.getFlex()<=0){var h=l("width").value1;null!=h&&null!=p&&h>=p&&e.setActualWidth(h,s)}var f=l("sort").value1;void 0!==f&&(f===Ce.SORT_DESC||f===Ce.SORT_ASC?e.setSort(f):e.setSort(void 0));var g=l("sortIndex").value1;if(void 0!==g&&e.setSortIndex(g),!a){var v=l("aggFunc").value1;void 0!==v&&("string"===typeof v?(e.setAggFunc(v),e.isValueActive()||(e.setValueActive(!0,s),this.valueColumns.push(e))):(o(v)&&console.warn("AG Grid: stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,s),b(this.valueColumns,e))));var m=l("rowGroup","rowGroupIndex"),y=m.value1,w=m.value2;void 0===y&&void 0===w||("number"===typeof w||y?(e.isRowGroupActive()||(e.setRowGroupActive(!0,s),this.rowGroupColumns.push(e)),r&&"number"===typeof w&&(r[e.getId()]=w)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,s),b(this.rowGroupColumns,e)));var C=l("pivot","pivotIndex"),x=C.value1,S=C.value2;void 0===x&&void 0===S||("number"===typeof S||x?(e.isPivotActive()||(e.setPivotActive(!0,s),this.pivotColumns.push(e)),i&&"number"===typeof S&&(i[e.getId()]=S)):e.isPivotActive()&&(e.setPivotActive(!1,s),b(this.pivotColumns,e)))}}},t.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},t.prototype.getColumns=function(e,t){var n=[];return e&&e.forEach((function(e){var r=t(e);r&&n.push(r)})),n},t.prototype.getColumnWithValidation=function(e){if(null==e)return null;var t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t},t.prototype.getPrimaryColumn=function(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null},t.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)},t.prototype.getColumn=function(e,t,n){if(!e)return null;if("string"==typeof e&&n[e])return n[e];for(var r=0;r<t.length;r++)if(this.columnsMatch(t[r],e))return t[r];return this.getAutoColumn(e)},t.prototype.getAutoColumn=function(e){var t=this;return this.groupAutoColumns&&o(this.groupAutoColumns)&&!i(this.groupAutoColumns)?p(this.groupAutoColumns,(function(n){return t.columnsMatch(n,e)})):null},t.prototype.columnsMatch=function(e,t){var n=e===t,r=e.getColDef()===t,o=e.getColId()==t;return n||r||o},t.prototype.getDisplayNameForColumn=function(e,t,n){if(void 0===n&&(n=!1),!e)return null;var r=this.getHeaderName(e.getColDef(),e,null,null,t);return n?this.wrapHeaderNameWithAggFunc(e,r):r},t.prototype.getDisplayNameForOriginalColumnGroup=function(e,t,n){var r=t?t.getColGroupDef():null;return r?this.getHeaderName(r,null,e,t,n):null},t.prototype.getDisplayNameForColumnGroup=function(e,t){return this.getDisplayNameForOriginalColumnGroup(e,e.getOriginalColumnGroup(),t)},t.prototype.getHeaderName=function(e,t,n,r,o){var i=e.headerValueGetter;if(i){var a={colDef:e,column:t,columnGroup:n,originalColumnGroup:r,location:o,api:this.gridOptionsWrapper.getApi(),context:this.gridOptionsWrapper.getContext()};return"function"===typeof i?i(a):"string"===typeof i?this.expressionService.evaluate(i,a):(console.warn("ag-grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?it(e.field):""},t.prototype.wrapHeaderNameWithAggFunc=function(e,t){if(this.gridOptionsWrapper.isSuppressAggFuncInHeader())return t;var n,r=e.getColDef().pivotValueColumn,i=null;if(o(r))i=r?r.getAggFunc():null,n=!0;else{var a=e.isValueActive(),s=this.pivotMode||!this.isRowGroupEmpty();a&&s?(i=e.getAggFunc(),n=!0):n=!1}if(n){var l="string"===typeof i?i:"func";return this.gridOptionsWrapper.getLocaleTextFunc()(l,l)+"("+t+")"}return t},t.prototype.getColumnGroup=function(e,t){if(!e)return null;if(e instanceof Oe)return e;var n=this.getAllDisplayedTrees(),r="number"===typeof t,o=null;return this.columnUtils.depthFirstAllColumnTreeSearch(n,(function(n){if(n instanceof Oe){var i=n;(r?e===i.getGroupId()&&t===i.getInstanceId():e===i.getGroupId())&&(o=i)}})),o},t.prototype.isReady=function(){return this.ready},t.prototype.extractValueColumns=function(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(function(t,n){return t.setValueActive(n,e)}),(function(){}),(function(){}),(function(e){var t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0}),(function(e){return null!=e.initialAggFunc&&""!=e.initialAggFunc})),this.valueColumns.forEach((function(e){var t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)}))},t.prototype.extractRowGroupColumns=function(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(function(t,n){return t.setRowGroupActive(n,e)}),(function(e){return e.rowGroupIndex}),(function(e){return e.initialRowGroupIndex}),(function(e){return e.rowGroup}),(function(e){return e.initialRowGroup}))},t.prototype.extractColumns=function(e,t,n,r,o,i,a){void 0===e&&(e=[]),void 0===t&&(t=[]);var s=[],u=[];(this.primaryColumns||[]).forEach((function(n){var p=e.indexOf(n)<0,d=n.getColDef(),h=c(i(d)),f=c(a(d)),g=l(r(d)),v=l(o(d));(void 0!==h?h:void 0!==g?null!==g&&g>=0:p?void 0!==f?f:!!(void 0!==v)&&(null!=v&&v>=0):t.indexOf(n)>=0)&&((p?null!=g||null!=v:null!=g)?s.push(n):u.push(n))}));var p=function(e){var t=r(e.getColDef()),n=o(e.getColDef());return null!=t?t:n};s.sort((function(e,t){var n=p(e),r=p(t);return n===r?0:n<r?-1:1}));var d=[].concat(s);return t.forEach((function(e){u.indexOf(e)>=0&&d.push(e)})),u.forEach((function(e){d.indexOf(e)<0&&d.push(e)})),t.forEach((function(e){d.indexOf(e)<0&&n(e,!1)})),d.forEach((function(e){t.indexOf(e)<0&&n(e,!0)})),d},t.prototype.extractPivotColumns=function(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(function(t,n){return t.setPivotActive(n,e)}),(function(e){return e.pivotIndex}),(function(e){return e.initialPivotIndex}),(function(e){return e.pivot}),(function(e){return e.initialPivot}))},t.prototype.resetColumnGroupState=function(e){void 0===e&&(e="api");var t=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,(function(e){if(e instanceof Ae){var n=e.getColGroupDef(),r={groupId:e.getGroupId(),open:n?n.openByDefault:void 0};t.push(r)}})),this.setColumnGroupState(t,e)},t.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(t){if(t instanceof Ae){var n=t;e.push({groupId:n.getGroupId(),open:n.isExpanded()})}})),e},t.prototype.setColumnGroupState=function(e,t){var n=this;void 0===t&&(t="api"),this.columnAnimationService.start();var r=[];e.forEach((function(e){var t=e.groupId,o=e.open,i=n.getOriginalColumnGroup(t);i&&i.isExpanded()!==o&&(n.logger.log("columnGroupOpened("+i.getGroupId()+","+o+")"),i.setExpanded(o),r.push(i))})),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),r.forEach((function(e){var t={type:Ke.EVENT_COLUMN_GROUP_OPENED,columnGroup:e,api:n.gridApi,columnApi:n.columnApi};n.eventService.dispatchEvent(t)})),this.columnAnimationService.finish()},t.prototype.setColumnGroupOpened=function(e,t,n){var r;void 0===n&&(n="api"),r=e instanceof Ae?e.getId():e||"",this.setColumnGroupState([{groupId:r,open:t}],n)},t.prototype.getOriginalColumnGroup=function(e){if(e instanceof Ae)return e;"string"!==typeof e&&console.error("AG Grid: group key must be a string");var t=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(n){if(n instanceof Ae){var r=n;r.getId()===e&&(t=r)}})),t},t.prototype.calculateColumnsForDisplay=function(){var e=this;return this.pivotMode&&!this.secondaryColumnsPresent?this.gridColumns.filter((function(t){var n=e.groupAutoColumns&&S(e.groupAutoColumns,t),r=e.valueColumns&&S(e.valueColumns,t);return n||r})):this.gridColumns.filter((function(t){return e.groupAutoColumns&&S(e.groupAutoColumns,t)||t.isVisible()}))},t.prototype.checkColSpanActiveInCols=function(e){var t=!1;return e.forEach((function(e){o(e.getColDef().colSpan)&&(t=!0)})),t},t.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[];var t=function(t){var n=t.getColDef();n&&o(n.showRowGroup)&&e.groupDisplayColumns.push(t)};this.gridColumns.forEach(t),this.groupAutoColumns&&this.groupAutoColumns.forEach(t)},t.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},t.prototype.updateDisplayedColumns=function(e){var t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.calculateColumnsForGroupDisplay(),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},t.prototype.isSecondaryColumnsPresent=function(){return this.secondaryColumnsPresent},t.prototype.setSecondaryColumns=function(e,t){void 0===t&&(t="api");var n=e&&e.length>0;if(n||this.secondaryColumnsPresent){if(n){this.processSecondaryColumnDefinitions(e);var r=this.columnFactory.createColumnTree(e,!1);this.secondaryBalancedTree=r.columnTree,this.secondaryHeaderRowCount=r.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsPresent=!0}else this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsPresent=!1;this.updateGridColumns(),this.updateDisplayedColumns(t)}},t.prototype.processSecondaryColumnDefinitions=function(e){var t=this.gridOptionsWrapper.getProcessSecondaryColDefFunc(),n=this.gridOptionsWrapper.getProcessSecondaryColGroupDefFunc();if(t||n){e&&function e(r){r.forEach((function(r){if(o(r.children)){var i=r;n&&n(i),e(i.children)}else t&&t(r)}))}(e)}},t.prototype.updateGridColumns=function(){var e=this;this.gridColsArePrimary&&(this.lastPrimaryOrder=this.gridColumns),this.secondaryColumns&&this.secondaryBalancedTree?(this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1):this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,this.orderGridColsLikeLastPrimary()),this.addAutoGroupToGridColumns(),this.gridColumns=this.putFixedColumnsFirst(this.gridColumns),this.setupQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach((function(t){return e.gridColumnsMap[t.getId()]=t})),this.setAutoHeightActive();var t={type:Ke.EVENT_GRID_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.setAutoHeightActive=function(){if(this.autoHeightActive=this.gridColumns.filter((function(e){return e.getColDef().autoHeight})).length>0,this.autoHeightActive){this.autoHeightActiveAtLeastOnce=!0;var e=this.rowModel.getType();if(!(e===Ce.ROW_MODEL_TYPE_CLIENT_SIDE||e===Ce.ROW_MODEL_TYPE_SERVER_SIDE)){K((function(){return console.warn("AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.")}),"autoHeightActive.wrongRowModel")}}},t.prototype.orderGridColsLikeLastPrimary=function(){if(!i(this.lastPrimaryOrder)){var e=lt(this.lastPrimaryOrder.map((function(e,t){return[e,t]}))),t=!0;if(this.gridColumns.forEach((function(n){e.has(n)&&(t=!1)})),!t){var n=lt(this.gridColumns.map((function(e){return[e,!0]}))),r=this.lastPrimaryOrder.filter((function(e){return n.has(e)})),o=lt(r.map((function(e){return[e,!0]}))),a=this.gridColumns.filter((function(e){return!o.has(e)})),s=r.slice();a.forEach((function(e){var t=e.getOriginalParent();if(t){for(var n=[];!n.length&&t;){t.getLeafColumns().forEach((function(e){var t=s.indexOf(e)>=0,r=n.indexOf(e)<0;t&&r&&n.push(e)})),t=t.getOriginalParent()}if(n.length){var r=n.map((function(e){return s.indexOf(e)})),o=Math.max.apply(Math,r);C(s,e,o+1)}else s.push(e)}else s.push(e)})),this.gridColumns=s}}},t.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},t.prototype.setupQuickFilterColumns=function(){this.groupAutoColumns?this.columnsForQuickFilter=(this.primaryColumns||[]).concat(this.groupAutoColumns):this.primaryColumns&&(this.columnsForQuickFilter=this.primaryColumns)},t.prototype.putFixedColumnsFirst=function(e){var t=e.filter((function(e){return e.getColDef().lockPosition})),n=e.filter((function(e){return!e.getColDef().lockPosition}));return t.concat(n)},t.prototype.addAutoGroupToGridColumns=function(){if(this.createGroupAutoColumnsIfNeeded(),!i(this.groupAutoColumns)){this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.gridBalancedTree=e.concat(this.gridBalancedTree)}},t.prototype.clearDisplayedAndViewportColumns=function(){this.displayedTreeLeft=[],this.displayedTreeRight=[],this.displayedTreeCentre=[],this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.viewportColumns=[]},t.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();var t={type:Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.deriveDisplayedColumns=function(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter((function(e){return e.getColDef().autoHeight}))},t.prototype.isAutoRowHeightActive=function(){return this.autoHeightActive},t.prototype.wasAutoRowHeightEverActive=function(){return this.autoHeightActiveAtLeastOnce},t.prototype.joinDisplayedColumns=function(){this.gridOptionsWrapper.isEnableRtl()?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)},t.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},t.prototype.setLeftValuesOfColumns=function(e){var t=this;if(this.primaryColumns){var n=this.primaryColumns.slice(0),r=this.gridOptionsWrapper.isEnableRtl();[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach((function(o){if(r){var i=t.getWidthOfColsInList(o);o.forEach((function(t){i-=t.getActualWidth(),t.setLeft(i,e)}))}else{var a=0;o.forEach((function(t){t.setLeft(a,e),a+=t.getActualWidth()}))}w(n,o)})),n.forEach((function(t){t.setLeft(null,e)}))}},t.prototype.setLeftValuesOfGroups=function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach((function(e){e.forEach((function(e){e instanceof Oe&&e.checkLeft()}))}))},t.prototype.derivedDisplayedColumnsFromDisplayedTree=function(e,t){t.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,(function(e){e instanceof _e&&t.push(e)}))},t.prototype.extractViewportColumns=function(){this.suppressColumnVirtualisation?this.viewportColumnsCenter=this.displayedColumnsCenter:this.viewportColumnsCenter=this.filterOutColumnsWithinViewport(),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)},t.prototype.getVirtualHeaderGroupRow=function(e,t){var n;switch(e){case Ce.PINNED_LEFT:n=this.viewportRowLeft[t];break;case Ce.PINNED_RIGHT:n=this.viewportRowRight[t];break;default:n=this.viewportRowCenter[t]}return i(n)&&(n=[]),n},t.prototype.extractViewportRows=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.viewportColumns.forEach((function(t){return e[t.getId()]=!0}));var t=function t(n,r,o){for(var i=!1,a=0;a<n.length;a++){var s=n[a],l=!1;if(s instanceof _e)l=!0===e[s.getId()];else{var c=s.getDisplayedChildren();c&&(l=t(c,r,o+1))}l&&(i=!0,r[o]||(r[o]=[]),r[o].push(s))}return i};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)},t.prototype.extractViewport=function(){this.extractViewportColumns(),this.extractViewportRows()},t.prototype.filterOutColumnsWithinViewport=function(){return this.displayedColumnsCenter.filter(this.isColumnInViewport.bind(this))},t.prototype.refreshFlexedColumns=function(e){var t=this;void 0===e&&(e={});var n=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];var r=-1;e.resizingCols&&e.resizingCols.forEach((function(e){var n=t.displayedColumnsCenter.indexOf(e);r<n&&(r=n)}));var i=function(e){var n=t.displayedColumnsCenter.indexOf(e)>r;return e.getFlex()&&n},a=this.displayedColumnsCenter.filter((function(e){return!i(e)})),s=this.displayedColumnsCenter.filter((function(e){return i(e)})),l=[];if(!s.length)return[];var c,u=[];e:for(;;){var p=s.reduce((function(e,t){return e+t.getFlex()}),0);c=this.flexViewportWidth-this.getWidthOfColsInList(a);for(var d=0;d<s.length;d++){var h=s[d],f=c*h.getFlex()/p,g=0,v=h.getMinWidth(),m=h.getMaxWidth();if(o(v)&&f<v?g=v:o(m)&&f>m&&(g=m),g){h.setActualWidth(g,n),b(s,h),l.push(h),a.push(h);continue e}u[d]=Math.round(f)}break}var y=c;return s.forEach((function(e,t){e.setActualWidth(Math.min(u[t],y),n),l.push(e),y-=u[t]})),e.skipSetLeft||this.setLeftValues(n),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.fireColumnResizedEvent(l,!0,n,s),this.flexColsCalculatedAtLestOnce||(this.gridOptionsWrapper.isRowModelDefault()&&this.rowModel.resetRowHeights(),this.flexColsCalculatedAtLestOnce=!0),s},t.prototype.sizeColumnsToFit=function(e,t,n){void 0===t&&(t="sizeColumnsToFit");var r=this.getAllDisplayedColumns();if(!(e<=0)&&r.length){var i=[],a=[];r.forEach((function(e){!0===e.getColDef().suppressSizeToFit?a.push(e):i.push(e)}));var s=i.slice(0),l=!1,c=function(e){b(i,e),a.push(e)};for(i.forEach((function(e){return e.resetActualWidth(t)}));!l;){l=!0;var u=e-this.getWidthOfColsInList(a);if(u<=0)i.forEach((function(e){e.setMinimum(t)}));else for(var p=u/this.getWidthOfColsInList(i),d=u,h=i.length-1;h>=0;h--){var f=i[h],g=f.getMinWidth(),v=f.getMaxWidth(),m=Math.round(f.getActualWidth()*p);o(g)&&m<g?(m=g,c(f),l=!1):o(v)&&f.isGreaterThanMax(m)?(m=v,c(f),l=!1):0===h&&(m=d),f.setActualWidth(m,t,!0),d-=m}}s.forEach((function(e){e.fireColumnWidthChangedEvent(t)})),this.setLeftValues(t),this.updateBodyWidths(),n||this.fireColumnResizedEvent(s,!0,t)}},t.prototype.buildDisplayedTrees=function(e){var t=[],n=[],r=[];e.forEach((function(e){switch(e.getPinned()){case"left":t.push(e);break;case"right":n.push(e);break;default:r.push(e)}}));var o=new $e;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,this.gridBalancedTree,o,Ce.PINNED_LEFT,this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(n,this.gridBalancedTree,o,Ce.PINNED_RIGHT,this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(r,this.gridBalancedTree,o,null,this.displayedTreeCentre),this.updateDisplayedMap()},t.prototype.updateDisplayedMap=function(){var e=this;this.displayedColumnsAndGroupsMap={};var t=function(t){e.displayedColumnsAndGroupsMap[t.getUniqueId()]=t};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,t)},t.prototype.isDisplayed=function(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e},t.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,(function(e){e instanceof Oe&&e.calculateDisplayedColumns()}))},t.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},t.prototype.createGroupAutoColumnsIfNeeded=function(){if(this.autoGroupsNeedBuilding){this.autoGroupsNeedBuilding=!1;var e=this.gridOptionsWrapper.isGroupUseEntireRow(this.pivotMode),t=this.pivotMode?this.gridOptionsWrapper.isPivotSuppressAutoColumn():this.gridOptionsWrapper.isGroupSuppressAutoColumn();if((this.rowGroupColumns.length>0||this.usingTreeData)&&!t&&!e){var n=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);(!this.autoColsEqual(n,this.groupAutoColumns)||this.forceRecreateAutoGroups)&&(this.groupAutoColumns=n)}else this.groupAutoColumns=null}},t.prototype.autoColsEqual=function(e,t){return m(e,t,(function(e,t){return e.getColId()===t.getColId()}))},t.prototype.getWidthOfColsInList=function(e){return e.reduce((function(e,t){return e+t.getActualWidth()}),0)},t.prototype.getGridBalancedTree=function(){return this.gridBalancedTree},t.prototype.hasFloatingFilters=function(){return!!this.gridColumns&&this.gridColumns.some((function(e){return e.getColDef().floatingFilter}))},t.prototype.getFirstDisplayedColumn=function(){var e=this.gridOptionsWrapper.isEnableRtl(),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(var n=0;n<t.length;n++){var r=this[t[n]]();if(r.length)return e?v(r):r[0]}return null},pt([de("expressionService")],t.prototype,"expressionService",void 0),pt([de("columnFactory")],t.prototype,"columnFactory",void 0),pt([de("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),pt([de("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),pt([de("columnUtils")],t.prototype,"columnUtils",void 0),pt([de("columnAnimationService")],t.prototype,"columnAnimationService",void 0),pt([de("autoGroupColService")],t.prototype,"autoGroupColService",void 0),pt([he("aggFuncService")],t.prototype,"aggFuncService",void 0),pt([he("valueCache")],t.prototype,"valueCache",void 0),pt([he("animationFrameService")],t.prototype,"animationFrameService",void 0),pt([de("rowModel")],t.prototype,"rowModel",void 0),pt([de("columnApi")],t.prototype,"columnApi",void 0),pt([de("gridApi")],t.prototype,"gridApi",void 0),pt([de("sortController")],t.prototype,"sortController",void 0),pt([de("columnDefFactory")],t.prototype,"columnDefFactory",void 0),pt([ce],t.prototype,"init",null),pt([dt(0,ge("loggerFactory"))],t.prototype,"setBeans",null),t=pt([pe("columnModel")],t)}(ze);function gt(e,t){return et(e.toString(),t,"0")}function vt(e,t){for(var n=[],r=e;r<=t;r++)n.push(r);return n}function mt(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function yt(){return Number.MAX_SAFE_INTEGER||9007199254740991}function bt(e){return"number"!==typeof e?"":e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")}var wt=Object.freeze({__proto__:null,padStartWidthZeros:gt,createArrayOfNumbers:vt,isNumeric:mt,getMaxSafeInteger:yt,cleanNumber:function(e){return"string"===typeof e&&(e=parseInt(e,10)),"number"===typeof e?Math.floor(e):null},decToHex:function(e,t){for(var n="",r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n},formatNumberTwoDecimalPlacesAndCommas:function(e){return"number"!==typeof e?"":bt(Math.round(100*e)/100)},formatNumberCommas:bt,sum:function(e){return null==e?null:e.reduce((function(e,t){return e+t}),0)}}),Ct=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xt=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},St=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ct(t,e),t.prototype.calculateColMinWidth=function(e){return null!=e.minWidth?e.minWidth:this.gridOptionsWrapper.getMinColWidth()},t.prototype.calculateColMaxWidth=function(e){return null!=e.maxWidth?e.maxWidth:this.gridOptionsWrapper.getMaxColWidth()||yt()},t.prototype.calculateColInitialWidth=function(e){var t,n=this.calculateColMinWidth(e),r=this.calculateColMaxWidth(e),o=l(e.width),i=l(e.initialWidth);return t=null!=o?o:null!=i?i:this.gridOptionsWrapper.getColWidth(),Math.max(Math.min(t,r),n)},t.prototype.getOriginalPathForColumn=function(e,t){var n=[],r=!1;return function t(o,i){for(var a=0;a<o.length;a++){if(r)return;var s=o[a];if(s instanceof Ae)t(s.getChildren(),i+1),n[i]=s;else s===e&&(r=!0)}}(t,0),r?n:null},t.prototype.depthFirstOriginalTreeSearch=function(e,t,n){var r=this;t&&t.forEach((function(t){t instanceof Ae&&r.depthFirstOriginalTreeSearch(t,t.getChildren(),n),n(t,e)}))},t.prototype.depthFirstAllColumnTreeSearch=function(e,t){var n=this;e&&e.forEach((function(e){e instanceof Oe&&n.depthFirstAllColumnTreeSearch(e.getChildren(),t),t(e)}))},t.prototype.depthFirstDisplayedColumnTreeSearch=function(e,t){var n=this;e&&e.forEach((function(e){e instanceof Oe&&n.depthFirstDisplayedColumnTreeSearch(e.getDisplayedChildren(),t),t(e)}))},t=xt([pe("columnUtils")],t)}(ze),Et=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_t=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Et(t,e),t.prototype.createDisplayedGroups=function(e,t,n,r,o){var i,a,s=this,l=[],c=this.mapOldGroupsById(o);return e.forEach((function(e){for(var o=s.getOriginalPathForColumn(t,e),u=[],p=!a,d=0;d<o.length;d++)if(p||o[d]!==a[d]){var h=s.createColumnGroup(o[d],n,c,r);u[d]=h,0==d?l.push(h):u[d-1].addChild(h)}else u[d]=i[d];0===u.length?l.push(e):v(u).addChild(e);i=u,a=o})),this.setupParentsIntoColumns(l,null),l},t.prototype.createColumnGroup=function(e,t,n,r){var i=e.getGroupId(),a=t.getInstanceIdForKey(i),s=n[Oe.createUniqueId(i,a)];return s&&s.getOriginalColumnGroup()!==e&&(s=null),o(s)?s.reset():(s=new Oe(e,i,a,r),this.context.createBean(s)),s},t.prototype.mapOldGroupsById=function(e){var t={};return e&&function e(n){n.forEach((function(n){if(n instanceof Oe){var r=n;t[n.getUniqueId()]=r,e(r.getChildren())}}))}(e),t},t.prototype.setupParentsIntoColumns=function(e,t){var n=this;e.forEach((function(e){if(e.setParent(t),e instanceof Oe){var r=e;n.setupParentsIntoColumns(r.getChildren(),r)}}))},t.prototype.getOriginalPathForColumn=function(e,t){var n=[],r=!1;return function e(o,i){for(var a=0;a<o.length;a++){if(r)return;var s=o[a];if(s instanceof Ae)e(s.getChildren(),i+1),n[i]=s;else s===t&&(r=!0)}}(e,0),r?n:(console.warn("could not get path"),null)},t=_t([pe("displayedGroupCreator")],t)}(ze),Ot=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},At=function(){function e(){}return e.STRING_PROPERTIES=["sortingOrder","rowClass","rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","quickFilterText","rowModelType","editType","domLayout","clipboardDeliminator","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","serverSideStoreType","groupDisplayType","treeDataDisplayType"],e.OBJECT_PROPERTIES=["components","frameworkComponents","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultExportParams","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","colResizeDefault","statusBar","sideBar","chartThemeOverrides","customChartThemes"],e.ARRAY_PROPERTIES=["alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes"],e.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","colWidth","headerHeight","groupHeaderHeight","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","minColWidth","maxColWidth","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","scrollbarWidth","batchUpdateWaitMillis","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","tabIndex"],e.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellSelection","suppressHorizontalScroll","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","angularCompileRows","angularCompileFilters","groupSuppressAutoColumn","groupSelectsChildren","groupIncludeFooter","groupIncludeTotalFooter","groupUseEntireRow","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","rememberGroupStateWhenNewData","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","deprecatedEmbedFullWidthRows","suppressPaginationPanel","floatingFilter","groupHideOpenParents","groupMultiAutoColumn","pagination","stopEditingWhenGridLosesFocus","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","deltaRowDataMode","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","treeData","masterDetail","suppressMultiRangeSelection","enterMovesDownAfterEdit","enterMovesDown","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressEnterpriseResetOnNewColumns","enableOldSetFilterModel","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","serverSideSortingAlwaysResets","suppressSetColumnStateEvents","suppressColumnStateEvents","enableCharts","deltaColumnMode","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","immutableData","immutableColumns","pivotSuppressAutoColumn","suppressExpandablePivotGroups","applyColumnDefOrder","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilteringAlwaysResets","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","reactUi"],e.FUNCTION_PROPERTIES=["localeTextFunc","groupRowInnerRenderer","groupRowInnerRendererFramework","groupRowRenderer","groupRowRendererFramework","isExternalFilterPresent","getRowHeight","doesExternalFilterPass","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","groupRowAggNodes","getRowNodeId","isFullWidthCell","fullWidthCellRenderer","fullWidthCellRendererFramework","processSecondaryColDef","processSecondaryColGroupDef","getBusinessKeyForNode","sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","loadingCellRenderer","loadingCellRendererFramework","loadingOverlayComponent","loadingOverlayComponentFramework","noRowsOverlayComponent","noRowsOverlayComponentFramework","detailCellRenderer","detailCellRendererFramework","isRowMaster","isRowSelectable","postSort","processHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","suppressKeyboardEvent","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideStoreParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","defaultGroupSortComparator","defaultGroupOrderComparator","loadingCellRendererSelector"],e.ALL_PROPERTIES=Ot(e.ARRAY_PROPERTIES,e.OBJECT_PROPERTIES,e.STRING_PROPERTIES,e.NUMBER_PROPERTIES,e.FUNCTION_PROPERTIES,e.BOOLEAN_PROPERTIES),e.FRAMEWORK_PROPERTIES=["__ob__","__v_skip","__metadata__","mappedColumnProperties","hasChildColumns","toColDef","createColDefFromGridColumn"],e}(),Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Pt.apply(this,arguments)},Tt=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},Dt=function(){function e(){}return e.getEventCallbacks=function(){return e.EVENT_CALLBACKS||(e.EVENT_CALLBACKS=e.EVENTS.map((function(t){return e.getCallbackForEvent(t)}))),e.EVENT_CALLBACKS},e.copyAttributesToGridOptions=function(t,n,r){"object"!==typeof t&&(t={});var o=t,i=function(e){return"undefined"!==typeof n[e]};return Tt(e.ARRAY_PROPERTIES,e.STRING_PROPERTIES,e.OBJECT_PROPERTIES,e.FUNCTION_PROPERTIES,e.getEventCallbacks()).filter(i).forEach((function(e){return o[e]=n[e]})),e.BOOLEAN_PROPERTIES.filter(i).forEach((function(t){return o[t]=e.toBoolean(n[t])})),e.NUMBER_PROPERTIES.filter(i).forEach((function(t){return o[t]=e.toNumber(n[t])})),t},e.getCallbackForEvent=function(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substr(1)},e.processOnChange=function(t,n,r,o){if(t){var i=Pt({},t),a=n,s=function(e){return i[e]};Tt(e.ARRAY_PROPERTIES,e.OBJECT_PROPERTIES,e.STRING_PROPERTIES,e.getEventCallbacks()).filter(s).forEach((function(e){return a[e]=i[e].currentValue})),e.BOOLEAN_PROPERTIES.filter(s).forEach((function(t){return a[t]=e.toBoolean(i[t].currentValue)})),e.NUMBER_PROPERTIES.filter(s).forEach((function(t){return a[t]=e.toNumber(i[t].currentValue)})),i.enableCellTextSelection&&(r.setEnableCellTextSelection(e.toBoolean(i.enableCellTextSelection.currentValue)),delete i.enableCellTextSelection),i.quickFilterText&&(r.setQuickFilter(i.quickFilterText.currentValue),delete i.quickFilterText),i.autoGroupColumnDef&&(r.setAutoGroupColumnDef(i.autoGroupColumnDef.currentValue,"gridOptionsChanged"),delete i.autoGroupColumnDef),i.columnDefs&&(r.setColumnDefs(i.columnDefs.currentValue,"gridOptionsChanged"),delete i.columnDefs),i.paginationPageSize&&(r.paginationSetPageSize(e.toNumber(i.paginationPageSize.currentValue)),delete i.paginationPageSize),i.pivotMode&&(o.setPivotMode(e.toBoolean(i.pivotMode.currentValue)),delete i.pivotMode),i.groupRemoveSingleChildren&&(r.setGroupRemoveSingleChildren(e.toBoolean(i.groupRemoveSingleChildren.currentValue)),delete i.groupRemoveSingleChildren),i.suppressRowDrag&&(r.setSuppressRowDrag(e.toBoolean(i.suppressRowDrag.currentValue)),delete i.suppressRowDrag),i.suppressMoveWhenRowDragging&&(r.setSuppressMoveWhenRowDragging(e.toBoolean(i.suppressMoveWhenRowDragging.currentValue)),delete i.suppressMoveWhenRowDragging),i.suppressRowClickSelection&&(r.setSuppressRowClickSelection(e.toBoolean(i.suppressRowClickSelection.currentValue)),delete i.suppressRowClickSelection),i.suppressClipboardPaste&&(r.setSuppressClipboardPaste(e.toBoolean(i.suppressClipboardPaste.currentValue)),delete i.suppressClipboardPaste),i.headerHeight&&(r.setHeaderHeight(e.toNumber(i.headerHeight.currentValue)),delete i.headerHeight);var l=r;Object.keys(i).forEach((function(e){var n="set"+e.charAt(0).toUpperCase()+e.substring(1);l[n]&&l[n](t[e].currentValue)}));var c={type:Ke.EVENT_COMPONENT_STATE_CHANGED,api:n.api,columnApi:n.columnApi};k(t,(function(e,t){c[e]=t})),r.dispatchEvent(c)}},e.toBoolean=function(e){return"boolean"===typeof e?e:"string"===typeof e&&("TRUE"===e.toUpperCase()||""==e)},e.toNumber=function(e){return"number"===typeof e?e:"string"===typeof e?Number(e):void 0},e.EVENTS=[],e.PUBLIC_EVENTS=[],e.EXCLUDED_INTERNAL_EVENTS=[],e.STRING_PROPERTIES=At.STRING_PROPERTIES,e.OBJECT_PROPERTIES=At.OBJECT_PROPERTIES,e.ARRAY_PROPERTIES=At.ARRAY_PROPERTIES,e.NUMBER_PROPERTIES=At.NUMBER_PROPERTIES,e.BOOLEAN_PROPERTIES=At.BOOLEAN_PROPERTIES,e.FUNCTION_PROPERTIES=At.FUNCTION_PROPERTIES,e.ALL_PROPERTIES=At.ALL_PROPERTIES,e}();Dt.EVENTS=d(Ke),Dt.EXCLUDED_INTERNAL_EVENTS=[Ke.EVENT_SCROLLBAR_WIDTH_CHANGED,Ke.EVENT_CHECKBOX_CHANGED,Ke.EVENT_HEIGHT_SCALE_CHANGED,Ke.EVENT_BODY_HEIGHT_CHANGED,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,Ke.EVENT_SCROLL_VISIBILITY_CHANGED,Ke.EVENT_COLUMN_HOVER_CHANGED,Ke.EVENT_FLASH_CELLS,Ke.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,Ke.EVENT_DISPLAYED_ROWS_CHANGED,Ke.EVENT_LEFT_PINNED_WIDTH_CHANGED,Ke.EVENT_RIGHT_PINNED_WIDTH_CHANGED,Ke.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,Ke.EVENT_POPUP_TO_FRONT,Ke.EVENT_KEYBOARD_FOCUS,Ke.EVENT_MOUSE_FOCUS,Ke.EVENT_STORE_UPDATED,Ke.EVENT_COLUMN_PANEL_ITEM_DRAG_START,Ke.EVENT_COLUMN_PANEL_ITEM_DRAG_END,Ke.EVENT_FILL_START,Ke.EVENT_FILL_END],Dt.PUBLIC_EVENTS=Dt.EVENTS.filter((function(e){return!S(Dt.EXCLUDED_INTERNAL_EVENTS,e)}));var kt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nt=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Mt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.componentsMappedByName={},t}return kt(t,e),t.prototype.setupComponents=function(e){var t=this;e&&e.forEach((function(e){return t.addComponent(e)}))},t.prototype.addComponent=function(e){var t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.componentClass},t.prototype.getComponentClass=function(e){return this.componentsMappedByName[e]},t=Nt([pe("agStackComponentsRegistry")],t)}(ze),It=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},Lt=function(){function e(){}return e.STRING_PROPERTIES=["headerName","columnGroupShow","headerClass","toolPanelClass","headerValueGetter","pivotKeys","groupId","colId","sort","initialSort","field","type","tooltipComponent","tooltipField","headerTooltip","cellClass","showRowGroup","template","templateUrl","filter","initialAggFunc","aggFunc","cellRenderer","cellEditor","pinned","initialPinned","chartDataType","cellEditorPopupPosition"],e.OBJECT_PROPERTIES=["headerGroupComponent","headerGroupComponentFramework","headerGroupComponentParams","cellStyle","cellRendererParams","cellEditorFramework","cellEditorParams","pinnedRowCellRendererFramework","pinnedRowCellRendererParams","filterFramework","filterParams","pivotValueColumn","headerComponent","headerComponentFramework","headerComponentParams","floatingFilterComponent","floatingFilterComponentParams","floatingFilterComponentFramework","tooltipComponent","tooltipComponentParams","tooltipComponentFramework","refData","columnsMenuParams"],e.ARRAY_PROPERTIES=["children","sortingOrder","allowedAggFuncs","menuTabs","pivotTotalColumnIds","cellClassRules","icons"],e.NUMBER_PROPERTIES=["sortedAt","sortIndex","initialSortIndex","flex","initialFlex","width","initialWidth","minWidth","maxWidth","rowGroupIndex","initialRowGroupIndex","pivotIndex","initialPivotIndex"],e.BOOLEAN_PROPERTIES=["suppressCellFlash","suppressColumnsToolPanel","suppressFiltersToolPanel","openByDefault","marryChildren","hide","initialHide","rowGroup","initialRowGroup","pivot","initialPivot","checkboxSelection","headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","suppressMenu","suppressMovable","lockPosition","lockVisible","lockPinned","unSortIcon","suppressSizeToFit","suppressAutoSize","enableRowGroup","enablePivot","enableValue","editable","suppressPaste","suppressNavigable","enableCellChangeFlash","rowDrag","dndSource","autoHeight","wrapText","sortable","resizable","singleClickEdit","floatingFilter","cellEditorPopup","suppressFillHandle"],e.FUNCTION_PROPERTIES=["dndSourceOnRowDrag","valueGetter","valueSetter","filterValueGetter","keyCreator","cellRenderer","cellRendererFramework","pinnedRowCellRenderer","valueFormatter","pinnedRowValueFormatter","valueParser","comparator","equals","pivotComparator","suppressKeyboardEvent","suppressHeaderKeyboardEvent","colSpan","rowSpan","getQuickFilterText","newValueHandler","onCellValueChanged","onCellClicked","onCellDoubleClicked","onCellContextMenu","rowDragText","tooltipValueGetter","tooltipComponent","tooltipComponentFramework","cellRendererSelector","cellEditorSelector"],e.ALL_PROPERTIES=It(e.ARRAY_PROPERTIES,e.OBJECT_PROPERTIES,e.STRING_PROPERTIES,e.NUMBER_PROPERTIES,e.FUNCTION_PROPERTIES,e.BOOLEAN_PROPERTIES),e.FRAMEWORK_PROPERTIES=["__ob__","__v_skip","__metadata__","mappedColumnProperties","hasChildColumns","toColDef","createColDefFromGridColumn"],e}(),Ft=function(){function e(e,t,n,r){void 0===r&&(r=1),this.r=Math.min(1,Math.max(0,e||0)),this.g=Math.min(1,Math.max(0,t||0)),this.b=Math.min(1,Math.max(0,n||0)),this.a=Math.min(1,Math.max(0,r||0))}return e.fromString=function(t){if(t.indexOf("#")>=0)return e.fromHexString(t);var n=e.nameToHex[t];if(n)return e.fromHexString(n);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw new Error("Invalid color string: '"+t+"'")},e.parseHex=function(e){var t;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:t=[];for(var n=0;n<e.length;n+=2)t.push(parseInt(""+e[n]+e[n+1],16));break;case 3:case 4:t=e.split("").map((function(e){return parseInt(e,16)})).map((function(e){return e+16*e}))}if(t.length>=3&&t.every((function(e){return e>=0})))return 3===t.length&&t.push(255),t},e.fromHexString=function(t){var n=e.parseHex(t);if(n)return new e(n[0]/255,n[1]/255,n[2]/255,n[3]/255);throw new Error("Malformed hexadecimal color string: '"+t+"'")},e.stringToRgba=function(e){for(var t=[NaN,NaN],n=t[0],r=t[1],o=0;o<e.length;o++){var i=e[o];if(n||"("!==i){if(")"===i){r=o;break}}else n=o}var a=n&&r&&e.substring(n+1,r);if(a){var s=a.split(","),l=[];for(o=0;o<s.length;o++){var c=s[o],u=parseFloat(c);if(isNaN(u))return;c.indexOf("%")>=0?(u=Math.max(0,Math.min(100,u)),u/=100):3===o?u=Math.max(0,Math.min(1,u)):(u=Math.max(0,Math.min(255,u)),u/=255),l.push(u)}return l}},e.fromRgbaString=function(t){var n=e.stringToRgba(t);if(n){if(3===n.length)return new e(n[0],n[1],n[2]);if(4===n.length)return new e(n[0],n[1],n[2],n[3])}throw new Error("Malformed rgb/rgba color string: '"+t+"'")},e.fromArray=function(t){if(4===t.length)return new e(t[0],t[1],t[2],t[3]);if(3===t.length)return new e(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")},e.fromHSB=function(t,n,r,o){void 0===o&&(o=1);var i=e.HSBtoRGB(t,n,r);return new e(i[0],i[1],i[2],o)},e.padHex=function(e){return 1===e.length?"0"+e:e},e.prototype.toHexString=function(){var t="#"+e.padHex(Math.round(255*this.r).toString(16))+e.padHex(Math.round(255*this.g).toString(16))+e.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(t+=e.padHex(Math.round(255*this.a).toString(16))),t},e.prototype.toRgbaString=function(e){void 0===e&&(e=3);var t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],n=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*n)/n),"rgba("+t.join(", ")+")"):"rgb("+t.join(", ")+")"},e.prototype.toString=function(){return 1===this.a?this.toHexString():this.toRgbaString()},e.prototype.toHSB=function(){return e.RGBtoHSB(this.r,this.g,this.b)},e.RGBtoHSB=function(e,t,n){var r=Math.min(e,t,n),o=Math.max(e,t,n),i=NaN;if(r!==o){var a=o-r,s=(o-e)/a,l=(o-t)/a,c=(o-n)/a;i=e===o?c-l:t===o?2+s-c:4+l-s,(i/=6)<0&&(i+=1)}return[360*i,0!==o?(o-r)/o:0,o]},e.HSBtoRGB=function(e,t,n){isNaN(e)&&(e=0),e=(e%360+360)%360/360;var r=0,o=0,i=0;if(0===t)r=o=i=n;else{var a=6*(e-Math.floor(e)),s=a-Math.floor(a),l=n*(1-t),c=n*(1-t*s),u=n*(1-t*(1-s));switch(a>>0){case 0:r=n,o=u,i=l;break;case 1:r=c,o=n,i=l;break;case 2:r=l,o=n,i=u;break;case 3:r=l,o=c,i=n;break;case 4:r=u,o=l,i=n;break;case 5:r=n,o=l,i=c}}return[r,o,i]},e.prototype.derive=function(t,n,r,o){var i=e.RGBtoHSB(this.r,this.g,this.b),a=i[2];0==a&&r>1&&(a=.05);var s=((i[0]+t)%360+360)%360,l=Math.max(Math.min(i[1]*n,1),0);a=Math.max(Math.min(a*r,1),0);var c=Math.max(Math.min(this.a*o,1),0),u=e.HSBtoRGB(s,l,a);return u.push(c),e.fromArray(u)},e.prototype.brighter=function(){return this.derive(0,1,1/.7,1)},e.prototype.darker=function(){return this.derive(0,1,.7,1)},e.nameToHex=Object.freeze({aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"}),e}();function Gt(e,t){void 0===t&&(t=",");var n=[],r=function(e){return"\r"===e||"\n"===e},o=!1;if(""===e)return[[""]];for(var i,a,s,l=function(l,c,u){var p=e[u-1],d=e[u],h=e[u+1],f=function(){n[l]||(n[l]=[]),n[l][c]||(n[l][c]="")};if(f(),'"'===d){if(o)return'"'===h?(n[l][c]+='"',u++):o=!1,i=l,a=c,s=u,"continue";if(void 0===p||p===t||r(p))return o=!0,i=l,a=c,s=u,"continue"}if(!o){if(d===t)return c++,f(),i=l,a=c,s=u,"continue";if(r(d))return c=0,l++,f(),"\r"===d&&"\n"===h&&u++,i=l,a=c,s=u,"continue"}n[l][c]+=d,i=l,a=c,s=u},c=0,u=0,p=0;p<e.length;p++)l(c,u,p),c=i,u=a,p=s;return n}var Ht,Wt,Vt,jt,Bt,zt,Ut,Yt,Xt=Object.freeze({__proto__:null,stringToArray:Gt});function qt(){return void 0===Wt&&(Wt=!!document.documentMode),Wt}function Kt(){return void 0===Vt&&(Vt=!qt()&&!!window.StyleMedia),Vt}function $t(){return void 0===Ht&&(Ht=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Ht}function Qt(){if(void 0===jt){var e=window;jt=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return jt}function Zt(){if(void 0===Bt){var e=window;Bt="undefined"!==typeof e.InstallTrigger}return Bt}function Jt(){return void 0===zt&&(zt=(/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!window.MSStream),zt}function en(e){if(!e)return null;var t=e.tabIndex,n=e.getAttribute("tabIndex");if(qt()&&0===t&&null===n){return!0==={a:!0,body:!0,button:!0,frame:!0,iframe:!0,img:!0,input:!0,isindex:!0,object:!0,select:!0,textarea:!0}[e.nodeName.toLowerCase()]?"0":null}return-1!==t||null!==n&&(""!==n||Zt())?t.toString():null}function tn(){if(!document.body)return-1;var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){var r=2*e;if(n.style.height=r+"px",r>t||n.clientHeight!==r)break;e=r}return document.body.removeChild(n),e}function nn(){return null==Yt&&rn(),Yt}function rn(){var e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);var n=t.offsetWidth-t.clientWidth;0===n&&0===t.clientWidth&&(n=null),t.parentNode&&t.parentNode.removeChild(t),null!=n&&(Yt=n,Ut=0===n)}function on(){return null==Ut&&rn(),Ut}function an(){return document.body?document.body.clientWidth:window.innerHeight?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:-1}function sn(){return document.body?document.body.clientHeight:window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:-1}var ln,cn=Object.freeze({__proto__:null,isBrowserIE:qt,isBrowserEdge:Kt,isBrowserSafari:$t,isBrowserChrome:Qt,isBrowserFirefox:Zt,isIOSUserAgent:Jt,getTabIndex:en,getMaxDivHeight:tn,getScrollbarWidth:nn,isInvisibleScrollbar:on,hasOverflowScrolling:function(){var e=["webkit","moz","o","ms"],t=document.createElement("div"),n=!1;document.getElementsByTagName("body")[0].appendChild(t),t.setAttribute("style",e.map((function(e){return"-"+e+"-overflow-scrolling: touch"})).concat("overflow-scrolling: touch").join(";"));var r=window.getComputedStyle(t);if("touch"===r.overflowScrolling&&(n=!0),!n)for(var o=0,i=e;o<i.length;o++)if("touch"===r[i[o]+"OverflowScrolling"]){n=!0;break}return t.parentNode&&t.parentNode.removeChild(t),n},getBodyWidth:an,getBodyHeight:sn});function un(e,t){if(e&&t&&0!==t.length){if(!(t.indexOf(" ")>=0)){if(e.classList)e.classList.add(t);else if(e.className&&e.className.length>0){var n=e.className.split(" ");n.indexOf(t)<0&&(n.push(t),e.setAttribute("class",n.join(" ")))}else e.setAttribute("class",t);return e}t.split(" ").forEach((function(t){return un(e,t)}))}}function pn(e,t){if(e&&t&&0!==t.length)if(t.indexOf(" ")>=0)t.split(" ").forEach((function(t){return pn(e,t)}));else if(e.classList)e.classList.remove(t);else if(e.className&&e.className.length>0){var n=e.className.split(" ").filter((function(e){return e!==t})).join(" ");e.setAttribute("class",n)}}function dn(e,t,n){n?un(e,t):pn(e,t)}function hn(e,t){if(e.classList)return e.classList.contains(t);if(e.className){var n=e.className===t,r=e.className.indexOf(" "+t+" ")>=0,o=0===e.className.indexOf(t+" "),i=e.className.lastIndexOf(" "+t)===e.className.length-t.length-1;return n||r||o||i}return!1}function fn(e){var t=Element.prototype.matches||Element.prototype.msMatchesSelector,n=t.call(e,Ce.INPUT_SELECTOR),r=t.call(e,Ce.FOCUSABLE_EXCLUDE),o=Pn(e);return n&&!r&&o}function gn(e,t){dn(e,"ag-hidden",!t)}function vn(e,t){dn(e,"ag-invisible",!t)}function mn(e,t){var n="disabled",r=t?function(e){return e.setAttribute(n,"")}:function(e){return e.removeAttribute(n)};r(e),Kn(e.querySelectorAll("input"),(function(e){return r(e)}))}function yn(e,t,n){for(var r=0;e;){if(hn(e,t))return!0;if(e=e.parentElement,n&&++r>n)break}return!1}function bn(e){var t=window.getComputedStyle(e),n=t.height,r=t.width,o=t.paddingTop,i=t.paddingRight,a=t.paddingBottom,s=t.paddingLeft,l=t.marginTop,c=t.marginRight,u=t.marginBottom,p=t.marginLeft,d=t.boxSizing;return{height:parseFloat(n),width:parseFloat(r),paddingTop:parseFloat(o),paddingRight:parseFloat(i),paddingBottom:parseFloat(a),paddingLeft:parseFloat(s),marginTop:parseFloat(l),marginRight:parseFloat(c),marginBottom:parseFloat(u),marginLeft:parseFloat(p),boxSizing:d}}function wn(e){var t=bn(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function Cn(e){var t=bn(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function xn(e){var t=bn(e),n=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+n)}function Sn(e){var t=bn(e),n=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+n)}function En(){if("boolean"===typeof ln)return ln;var e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML='<div style="width: 2px">\n <span style="display: inline-block; width: 1px"></span>\n <span style="display: inline-block; width: 1px"></span>\n </div>',document.body.appendChild(e),e.scrollLeft=1,ln=0===Math.floor(e.scrollLeft),document.body.removeChild(e),ln}function _n(e,t){var n=e.scrollLeft;return t&&(n=Math.abs(n),Qt()&&!En()&&(n=e.scrollWidth-e.clientWidth-n)),n}function Rn(e,t,n){n&&(En()?t*=-1:($t()||Qt())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function On(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function An(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Pn(e){return null!==e.offsetParent}function Tn(e){var t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Dn(e){return e&&e.clientHeight?e.clientHeight:0}function kn(e){return e&&e.clientWidth?e.clientWidth:0}function Nn(e,t,n){n&&n.nextSibling===t||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function Mn(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=e.children[n];o!==r&&e.insertBefore(r,o)}}function In(e,t,n){n?n.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function Ln(e,t){t&&Object.keys(t).forEach((function(n){var r=nt(n);r&&(e.style[r]=t[n])}))}function Fn(e){return e.clientWidth<e.scrollWidth}function Gn(e){return e.clientHeight<e.scrollHeight}function Hn(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Wn(e,t)}function Wn(e,t){t=jn(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function Vn(e,t){t=jn(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function jn(e){return"number"===typeof e?e+"px":e}function Bn(e){return"function"===typeof Node?e instanceof Node:e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName}function zn(e){return"function"===typeof HTMLElement?e instanceof HTMLElement:e&&z(e)&&1===e.nodeType&&"string"===typeof e.nodeName}function Un(e){return Bn(e)||zn(e)}function Yn(e){if(null==e)return[];var t=[];return Kn(e,(function(e){return t.push(e)})),t}function Xn(e,t){if(e)for(var n=0;n<e.length;n++){var r=e[n];t(r.name,r.value)}}function qn(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Kn(e,t){if(null!=e)for(var n=0;n<e.length;n++)t(e[n])}var $n=Object.freeze({__proto__:null,addCssClass:un,removeCssClass:pn,addOrRemoveCssClass:dn,radioCssClass:function(e,t,n){for(var r=e.parentElement,o=r&&r.firstChild;o;)t&&dn(o,t,o===e),n&&dn(o,n,o!==e),o=o.nextSibling},containsClass:hn,isFocusableFormField:fn,setDisplayed:gn,setVisible:vn,setDisabled:mn,isElementChildOfClass:yn,getElementSize:bn,getInnerHeight:wn,getInnerWidth:Cn,getAbsoluteHeight:xn,getAbsoluteWidth:Sn,isRtlNegativeScroll:En,getScrollLeft:_n,setScrollLeft:Rn,clearElement:On,removeElement:function(e,t){An(e.querySelector(t))},removeFromParent:An,isVisible:Pn,loadTemplate:Tn,appendHtml:function(e,t){e.lastChild?e.insertAdjacentHTML("afterbegin",t):e.innerHTML=t},getElementAttribute:function(e,t){return e.attributes&&e.attributes[t]?e.attributes[t].value:null},offsetHeight:Dn,offsetWidth:kn,ensureDomOrder:Nn,setDomChildOrder:Mn,insertWithDomOrder:In,prependDC:function(e,t){o(e.firstChild)?e.insertBefore(t,e.firstChild):e.appendChild(t)},addStylesToElement:Ln,isHorizontalScrollShowing:Fn,isVerticalScrollShowing:Gn,setElementWidth:Hn,setFixedWidth:Wn,setElementHeight:function(e,t){"flex"===t?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):Vn(e,t)},setFixedHeight:Vn,formatSize:jn,isNode:Bn,isElement:zn,isNodeOrElement:Un,copyNodeList:Yn,iterateNamedNodeMap:Xn,setCheckboxState:function(e,t){"boolean"===typeof t?(e.checked=t,e.indeterminate=!1):e.indeterminate=!0},addOrRemoveAttribute:qn,nodeListForEach:Kn});var Qn=Object.freeze({__proto__:null,getNameOfClass:function(e){var t=e.toString(),n=/function (.{1,})\(/.exec(t);return n&&n.length>1?n[1]:""},findLineByLeastSquares:function(e){var t=e.length,n=0;if(t<=1)return e;for(var r=0;r<e.length;r++){var o=e[r],i=o.toString().split("e-");i.length>1?n=Math.max(n,parseInt(i[1],10)):Math.floor(o)!==o&&(n=Math.max(n,o.toString().split(".")[1].length))}for(var a=0,s=0,l=0,c=0,u=0,p=0;p<t;p++)a+=p,s+=u=e[p],c+=p*p,l+=p*u;var d=(t*l-a*s)/(t*c-a*a),h=s/t-d*a/t,f=[];for(p=0;p<=t;p++)f.push(parseFloat((p*d+h).toFixed(n)));return f},cssStyleObjectToMarkup:function(e){if(!e)return"";var t=[];return k(e,(function(e,n){var r=tt(e);t.push(r+": "+n+";")})),t.join(" ")},message:function(e){var t=document.createElement("div"),n=document.querySelector("#__ag__message");if(t.innerHTML=e,!n){n=Tn('<div id="__ag__message" style="display: inline-block; position: absolute; top: 0px; left: 0px; color: white; background-color: black; z-index: 20; padding: 2px; border: 1px solid darkred; height: 200px; overflow-y: auto;"></div>'),document.body&&document.body.appendChild(n)}n.insertBefore(t,n.children[0])},bindCellRendererToHtmlElement:function(e,t){e.then((function(e){var n=e.getGui();null!=n&&("object"===typeof n?t.appendChild(n):t.innerHTML=n)}))}});function Zn(e,t,n){e.setAttribute(er(t),n.toString())}function Jn(e,t){e.removeAttribute(er(t))}function er(e){return"aria-"+e}function tr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function nr(e){return e.isSortAscending()?"ascending":e.isSortDescending()?"descending":"none"}function rr(e){return parseInt(e.getAttribute("aria-posinset"),10)}function or(e,t){var n="label";t?Zn(e,n,t):Jn(e,n)}function ir(e,t){var n="labelledby";t?Zn(e,n,t):Jn(e,n)}function ar(e,t){var n="describedby";t?Zn(e,n,t):Jn(e,n)}function sr(e,t){Zn(e,"disabled",t)}function lr(e,t){Zn(e,"expanded",t)}function cr(e,t){Zn(e,"setsize",t)}function ur(e,t){Zn(e,"posinset",t)}function pr(e,t){Zn(e,"multiselectable",t)}function dr(e,t){Zn(e,"rowcount",t)}function hr(e,t){Zn(e,"rowindex",t)}function fr(e,t){Zn(e,"colcount",t)}function gr(e,t){Zn(e,"colindex",t)}function vr(e,t){Zn(e,"colspan",t)}function mr(e,t){Zn(e,"sort",t)}function yr(e){Jn(e,"sort")}function br(e,t){var n="selected";t?Zn(e,n,t):Jn(e,n)}function wr(e,t){Zn(e,"checked",void 0===t?"mixed":t)}var Cr=Object.freeze({__proto__:null,setAriaRole:tr,getAriaSortState:nr,getAriaLevel:function(e){return parseInt(e.getAttribute("aria-level"),10)},getAriaPosInSet:rr,getAriaDescribedBy:function(e){return e.getAttribute("aria-describedby")||""},setAriaLabel:or,setAriaLabelledBy:ir,setAriaDescribedBy:ar,setAriaLevel:function(e,t){Zn(e,"level",t)},setAriaDisabled:sr,setAriaExpanded:lr,removeAriaExpanded:function(e){Jn(e,"expanded")},setAriaSetSize:cr,setAriaPosInSet:ur,setAriaMultiSelectable:pr,setAriaRowCount:dr,setAriaRowIndex:hr,setAriaColCount:fr,setAriaColIndex:gr,setAriaColSpan:vr,setAriaSort:mr,removeAriaSort:yr,setAriaSelected:br,setAriaChecked:wr});function xr(e,t,n){if(void 0===t&&(t=!0),void 0===n&&(n="-"),!e)return null;var r=[e.getFullYear(),e.getMonth()+1,e.getDate()].map((function(e){return gt(e,2)})).join(n);return t&&(r+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map((function(e){return gt(e,2)})).join(":")),r}function Sr(e){if(!e)return null;var t=e.split(" "),n=t[0],r=t[1];if(!n)return null;var o=n.split("-").map((function(e){return parseInt(e,10)}));if(3!==o.filter((function(e){return!isNaN(e)})).length)return null;var i=o[0],a=o[1],s=o[2],l=new Date(i,a-1,s);if(l.getFullYear()!==i||l.getMonth()!==a-1||l.getDate()!==s)return null;if(!r||"00:00:00"===r)return l;var c=r.split(":").map((function(e){return parseInt(e,10)})),u=c[0],p=c[1],d=c[2];return u>=0&&u<24&&l.setHours(u),p>=0&&p<60&&l.setMinutes(p),d>=0&&d<60&&l.setSeconds(d),l}var Er=Object.freeze({__proto__:null,serialiseDate:xr,parseDateTimeFromString:Sr});function _r(e,t,n){var r={},o=e.filter((function(e){return!t.some((function(t){return t===e}))}));return o.length>0&&o.forEach((function(e){return r[e]=Rr(e,n)})),r}function Rr(e,t,n,r){var o=r?Pr:Ar,i=t.map((function(t){return{value:t,relevance:o(e.toLowerCase(),t.toLocaleLowerCase())}}));return i.sort((function(e,t){return t.relevance-e.relevance})),n&&(i=i.filter((function(e){return 0!==e.relevance}))),i.map((function(e){return e.value}))}function Or(e){var t,n,r,o=e.toLowerCase(),i=new Array(o.length-1);for(t=n=0,r=i.length;n<=r;t=n+=1)i[t]=o.slice(t,t+2);return i}function Ar(e,t){if(0===e.length&&0===t.length)return 0;var n,r,o=Or(e),i=Or(t),a=o.length+i.length,s=0;for(n=0,r=o.length;n<r;n++){var l,c=o[n],u=void 0;for(u=0,l=i.length;u<l;u++){c===i[u]&&s++}}return s>0?2*s/a:0}function Pr(e,t){for(var n=e.replace(/\s/g,""),r=t.replace(/\s/g,""),o=0,i=0,a=0;a<n.length;a++){var s=r.indexOf(n[a],i);-1!==s&&(o+=100-100*(i=s)/1e4*100)}return o}var Tr=Object.freeze({__proto__:null,fuzzyCheckStrings:_r,fuzzySuggestions:Rr,get_bigrams:Or,string_distances:Ar,string_weighted_distances:Pr}),Dr={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"};function kr(e,t,n){var r=Nr(e,t,n);if(r&&r.className.indexOf("ag-icon")>-1)return r;var o=document.createElement("span");return o.appendChild(r),o}function Nr(e,t,n,r){var o=null,i=n&&n.getColDef().icons;if(i&&(o=i[e]),t&&!o){var a=t.getIcons();a&&(o=a[e])}if(!o){var s=document.createElement("span"),l=Dr[e];return l||(r?l=e:(console.warn("AG Grid: Did not find icon "+e),l="")),s.setAttribute("class","ag-icon ag-icon-"+l),s.setAttribute("unselectable","on"),tr(s,"presentation"),s}var c=void 0;if("function"===typeof o)c=o();else{if("string"!==typeof o)throw new Error("icon from grid options needs to be a string or a function");c=o}return"string"===typeof c?Tn(c):Un(c)?c:void console.warn("AG Grid: iconRenderer should return back a string or a dom object")}var Mr=Object.freeze({__proto__:null,iconNameClassMap:Dr,createIcon:kr,createIconNoSpan:Nr});function Ir(e,t){return(e.which||e.keyCode)===t}function Lr(e){if(e.altKey||e.ctrlKey||e.metaKey)return!1;var t=1===e.key.length,n=function(e){return(Kt()||qt())&&"Del"===e.key&&46===e.charCode}(e);return t||n}function Fr(e,t,n,r,o){var i=e.getSuppressKeyboardEventFunc(),a=r?r.getColDef().suppressKeyboardEvent:void 0;if(!i&&!a)return!1;var s={event:t,editing:o,column:r,api:e.getApi(),node:n,data:n.data,colDef:r.getColDef(),context:e.getContext(),columnApi:e.getColumnApi()};if(a&&a(s))return!0;return!!i&&i(s)}function Gr(e,t,n,r){var i=r.getDefinition(),a=i&&i.suppressHeaderKeyboardEvent;return!!o(a)&&!!a({api:e.getApi(),columnApi:e.getColumnApi(),context:e.getContext(),colDef:i,column:r,headerRowIndex:n,event:t})}var Hr=Object.freeze({__proto__:null,isKeyPressed:Ir,isEventFromPrintableCharacter:Lr,isUserSuppressingKeyboardEvent:Fr,isUserSuppressingHeaderKeyboardEvent:Gr});function Wr(e,t,n){if(0===n)return!1;var r=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(r,o)<=n}var Vr=Object.freeze({__proto__:null,normalizeWheel:function(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}},isLeftClick:function(e){return"buttons"in e?1==e.buttons:1==(e.which||e.button)},areEventsNear:Wr});var jr=Object.freeze({__proto__:null,sortRowNodesByOrder:function(e,t){if(e){for(var n=function(e,n){var r=t[e.id],o=t[n.id],i=void 0!==r,a=void 0!==o;return i&&a?r-o:!i&&!a?e.__objectId-n.__objectId:i?1:-1},r=!1,o=0;o<e.length-1;o++)if(n(e[o],e[o+1])>0){r=!0;break}r&&e.sort(n)}},traverseNodesWithKey:function(e,t){var n=[];!function e(r){if(!r)return;r.forEach((function(r){if(r.group||r.hasChildren()){n.push(r.key);var o=n.join("|");t(r,o),e(r.childrenAfterGroup),n.pop()}}))}(e)}});function Br(e){var t=new Set;return e.forEach((function(e){return t.add(e)})),t}var zr,Ur=Object.freeze({__proto__:null,convertToSet:Br}),Yr=function(){return Yr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yr.apply(this,arguments)},Xr=Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr(Yr({},Qn),Cr),D),cn),Xt),Er),$n),je),ae),Tr),h),Mr),Hr),ct),Vr),wt),U),jr),Ur),st),qr=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=1),this.nextValue=e,this.step=t}return e.prototype.next=function(){var e=this.nextValue;return this.nextValue+=this.step,e},e.prototype.peek=function(){return this.nextValue},e.prototype.skip=function(e){this.nextValue+=e},e}();(zr=t.AgPromiseStatus||(t.AgPromiseStatus={}))[zr.IN_PROGRESS=0]="IN_PROGRESS",zr[zr.RESOLVED=1]="RESOLVED";var Kr,$r=function(){function e(e){var n=this;this.status=t.AgPromiseStatus.IN_PROGRESS,this.resolution=null,this.waiters=[],e((function(e){return n.onDone(e)}),(function(e){return n.onReject(e)}))}return e.all=function(t){return new e((function(e){var n=t.length,r=new Array(n);A(t,(function(t,o){t.then((function(t){r[o]=t,0===--n&&e(r)}))}))}))},e.resolve=function(t){return void 0===t&&(t=null),new e((function(e){return e(t)}))},e.prototype.then=function(n){var r=this;return new e((function(e){r.status===t.AgPromiseStatus.RESOLVED?e(n(r.resolution)):r.waiters.push((function(t){return e(n(t))}))}))},e.prototype.resolveNow=function(e,n){return this.status===t.AgPromiseStatus.RESOLVED?n(this.resolution):e},e.prototype.onDone=function(e){this.status=t.AgPromiseStatus.RESOLVED,this.resolution=e,A(this.waiters,(function(t){return t(e)}))},e.prototype.onReject=function(e){console.warn("TBI")},e}(),Qr=function(){function e(){this.timestamp=(new Date).getTime()}return e.prototype.print=function(e){var t=(new Date).getTime()-this.timestamp;console.info(e+" = "+t),this.timestamp=(new Date).getTime()},e}(),Zr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jr=function(){return Jr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Jr.apply(this,arguments)},eo=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e[e.NOTHING=0]="NOTHING",e[e.WAITING_TO_SHOW=1]="WAITING_TO_SHOW",e[e.SHOWING=2]="SHOWING"}(Kr||(Kr={}));var to=function(e){function t(t){var n=e.call(this)||this;return n.DEFAULT_HIDE_TOOLTIP_TIMEOUT=1e4,n.SHOW_QUICK_TOOLTIP_DIFF=1e3,n.FADE_OUT_TOOLTIP_TIMEOUT=1e3,n.state=Kr.NOTHING,n.tooltipInstanceCount=0,n.tooltipMouseTrack=!1,n.parentComp=t,n}return Zr(t,e),t.prototype.postConstruct=function(){this.tooltipShowDelay=this.gridOptionsWrapper.getTooltipShowDelay()||2e3,this.tooltipMouseTrack=this.gridOptionsWrapper.isTooltipMouseTrack();var e=this.parentComp.getGui();this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this)),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this))},t.prototype.destroy=function(){this.setToDoNothing(),e.prototype.destroy.call(this)},t.prototype.onMouseEnter=function(e){if(!Jt()&&this.state==Kr.NOTHING){var t=this.isLastTooltipHiddenRecently()?200:this.tooltipShowDelay;this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.lastMouseEvent=e,this.state=Kr.WAITING_TO_SHOW}},t.prototype.onMouseLeave=function(){this.setToDoNothing()},t.prototype.onKeyDown=function(){this.setToDoNothing()},t.prototype.setToDoNothing=function(){this.state===Kr.SHOWING&&this.hideTooltip(),this.clearTimeouts(),this.state=Kr.NOTHING},t.prototype.onMouseMove=function(e){this.lastMouseEvent=e,this.tooltipMouseTrack&&this.state===Kr.SHOWING&&this.tooltipComp&&this.positionTooltipUnderLastMouseEvent()},t.prototype.onMouseDown=function(){this.setToDoNothing()},t.prototype.hideTooltip=function(){this.tooltipComp&&(this.destroyTooltipComp(),t.lastTooltipHideTime=(new Date).getTime()),this.state=Kr.NOTHING},t.prototype.destroyTooltipComp=function(){var e=this;un(this.tooltipComp.getGui(),"ag-tooltip-hiding");var t=this.tooltipPopupDestroyFunc,n=this.tooltipComp;window.setTimeout((function(){t(),e.getContext().destroyBean(n)}),this.FADE_OUT_TOOLTIP_TIMEOUT),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0},t.prototype.isLastTooltipHiddenRecently=function(){return(new Date).getTime()-t.lastTooltipHideTime<this.SHOW_QUICK_TOOLTIP_DIFF},t.prototype.showTooltip=function(){var e=Jr({api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()},this.parentComp.getTooltipParams());if(o(e.value)){this.state=Kr.SHOWING,this.tooltipInstanceCount++;var t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}else this.setToDoNothing()},t.prototype.newTooltipComponentCallback=function(e,t){if(this.state!==Kr.SHOWING||this.tooltipInstanceCount!==e)this.getContext().destroyBean(t);else{var n=t.getGui();this.tooltipComp=t,hn(n,"ag-tooltip")||un(n,"ag-tooltip-custom"),this.gridOptionsWrapper.isReactUi()&&un(n,"ag-tooltip-reactui");var r=this.gridOptionsWrapper.getLocaleTextFunc(),o=this.popupService.addPopup({eChild:n,ariaLabel:r("ariaLabelTooltip","Tooltip")});o&&(this.tooltipPopupDestroyFunc=o.hideFunc),this.positionTooltipUnderLastMouseEvent(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.DEFAULT_HIDE_TOOLTIP_TIMEOUT)}},t.prototype.positionTooltipUnderLastMouseEvent=function(){this.popupService.positionPopupUnderMouseEvent({type:"tooltip",mouseEvent:this.lastMouseEvent,ePopup:this.tooltipComp.getGui(),nudgeY:18})},t.prototype.clearTimeouts=function(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0),this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)},eo([de("popupService")],t.prototype,"popupService",void 0),eo([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),eo([de("columnApi")],t.prototype,"columnApi",void 0),eo([de("gridApi")],t.prototype,"gridApi",void 0),eo([ce],t.prototype,"postConstruct",null),t}(ze),no=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ro=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},oo=new qr,io=function(e){function t(t){var n=e.call(this)||this;return n.displayed=!0,n.visible=!0,n.compId=oo.next(),n.cssClassStates={},t&&n.setTemplate(t),n}return no(t,e),t.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsWrapper.isEnableBrowserTooltips()},t.prototype.getCompId=function(){return this.compId},t.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}},t.prototype.setTooltip=function(e){var t=this;this.tooltipText!=e&&(this.tooltipText&&(t.usingBrowserTooltips?t.getGui().removeAttribute("title"):t.tooltipFeature=t.destroyBean(t.tooltipFeature)),null!=e&&(this.tooltipText=e,this.tooltipText&&(t.usingBrowserTooltips?t.getGui().setAttribute("title",t.tooltipText):t.tooltipFeature=t.createBean(new to(t)))))},t.prototype.createChildComponentsFromTags=function(e,t){var n=this;A(Yn(e.childNodes),(function(r){if(r instanceof HTMLElement){var o=n.createComponentFromElement(r,(function(e){e.getGui()&&n.copyAttributesFromNode(r,e.getGui())}),t);if(o){if(o.addItems&&r.children.length){n.createChildComponentsFromTags(r,t);var i=Array.prototype.slice.call(r.children);o.addItems(i)}n.swapComponentForNode(o,e,r)}else r.childNodes&&n.createChildComponentsFromTags(r,t)}}))},t.prototype.createComponentFromElement=function(e,n,r){var o=e.nodeName,i=r?r[e.getAttribute("ref")]:void 0,a=this.agStackComponentsRegistry.getComponentClass(o);if(a){t.elementGettingCreated=e;var s=new a(i);return s.setParentComponent(this),this.createBean(s,null,n),s}return null},t.prototype.copyAttributesFromNode=function(e,t){Xn(e.attributes,(function(e,n){return t.setAttribute(e,n)}))},t.prototype.swapComponentForNode=function(e,t,n){var r=e.getGui();t.replaceChild(r,n),t.insertBefore(document.createComment(n.nodeName),r),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,n)},t.prototype.swapInComponentForQuerySelectors=function(e,t){var n=this;this.iterateOverQuerySelectors((function(r){n[r.attributeName]===t&&(n[r.attributeName]=e)}))},t.prototype.iterateOverQuerySelectors=function(e){for(var t=Object.getPrototypeOf(this);null!=t;){var n=t.__agComponentMetaData,r=$(t.constructor);n&&n[r]&&n[r].querySelectors&&A(n[r].querySelectors,(function(t){return e(t)})),t=Object.getPrototypeOf(t)}},t.prototype.setTemplate=function(e,t){var n=Tn(e);this.setTemplateFromElement(n,t)},t.prototype.setTemplateFromElement=function(e,t){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),t)},t.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui){var t=this;this.iterateOverQuerySelectors((function(n){var r=function(e){return t[n.attributeName]=e};if(n.refSelector&&e.eGui.getAttribute("ref")===n.refSelector)r(e.eGui);else{var o=e.eGui.querySelector(n.querySelector);o&&r(o.__agComponent||o)}}))}},t.prototype.getGui=function(){return this.eGui},t.prototype.getFocusableElement=function(){return this.eGui},t.prototype.setParentComponent=function(e){this.parentComponent=e},t.prototype.getParentComponent=function(){return this.parentComponent},t.prototype.setGui=function(e){this.eGui=e},t.prototype.queryForHtmlElement=function(e){return this.eGui.querySelector(e)},t.prototype.queryForHtmlInputElement=function(e){return this.eGui.querySelector(e)},t.prototype.appendChild=function(e,t){if(t||(t=this.eGui),null!=e)if(Un(e))t.appendChild(e);else{var n=e;t.appendChild(n.getGui()),this.addDestroyFunc(this.destroyBean.bind(this,n))}},t.prototype.isDisplayed=function(){return this.displayed},t.prototype.setVisible=function(e){e!==this.visible&&(this.visible=e,vn(this.eGui,e))},t.prototype.setDisplayed=function(e){if(e!==this.displayed){this.displayed=e,gn(this.eGui,e);var n={type:t.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(n)}},t.prototype.destroy=function(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),e.prototype.destroy.call(this)},t.prototype.addGuiEventListener=function(e,t){var n=this;this.eGui.addEventListener(e,t),this.addDestroyFunc((function(){return n.eGui.removeEventListener(e,t)}))},t.prototype.addCssClass=function(e){!0!==this.cssClassStates[e]&&(un(this.eGui,e),this.cssClassStates[e]=!0)},t.prototype.removeCssClass=function(e){!1!==this.cssClassStates[e]&&(pn(this.eGui,e),this.cssClassStates[e]=!1)},t.prototype.addOrRemoveCssClass=function(e,t){this.cssClassStates[e]!==t&&(dn(this.eGui,e,t),this.cssClassStates[e]=t)},t.prototype.getAttribute=function(e){var t=this.eGui;return t?t.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'+e+'"]')},t.EVENT_DISPLAYED_CHANGED="displayedChanged",ro([de("agStackComponentsRegistry")],t.prototype,"agStackComponentsRegistry",void 0),ro([le],t.prototype,"preConstructOnComponent",null),ro([le],t.prototype,"createChildComponentsPreConstruct",null),t}(ze);function ao(e){return so.bind(this,"[ref="+e+"]",e)}function so(e,t,n,r,o){null!==e?"number"!==typeof o?function(e,t,n){var r=function(e,t){e.__agComponentMetaData||(e.__agComponentMetaData={});e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={});return e.__agComponentMetaData[t]}(e,$(e.constructor));r[t]||(r[t]=[]);r[t].push(n)}(n,"querySelectors",{attributeName:r,querySelector:e,refSelector:t}):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null")}var lo,co=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uo=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},po=function(e){function t(){return e.call(this,'\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n </div>')||this}return co(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e;var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),n=this.gridOptionsWrapper.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(t+" "+n("ariaFilterInput","Filter Input"))},t.prototype.onParentModelChanged=function(e){var t=this;e?this.params.parentFilterInstance((function(n){if(n.getModelAsString){var r=n.getModelAsString(e);t.eFloatingFilterText.setValue(r)}})):this.eFloatingFilterText.setValue("")},uo([ao("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),uo([de("columnModel")],t.prototype,"columnModel",void 0),t}(io),ho=function(){function e(e,t,n,r){var o=this;this.alive=!0,this.context=e,this.eParent=r,t.getDateCompDetails(n).newAgStackInstance().then((function(t){o.alive?(o.dateComp=t,t&&(r.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),o.tempValue&&t.setDate(o.tempValue),null!=o.disabled&&o.setDateCompDisabled(o.disabled))):e.destroyBean(t)}))}return e.prototype.destroy=function(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)},e.prototype.getDate=function(){return this.dateComp?this.dateComp.getDate():this.tempValue},e.prototype.setDate=function(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e},e.prototype.setDisabled=function(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e},e.prototype.setDisplayed=function(e){gn(this.eParent,e)},e.prototype.setInputPlaceholder=function(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)},e.prototype.setInputAriaLabel=function(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)},e.prototype.afterGuiAttached=function(e){this.dateComp&&"function"===typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)},e.prototype.setDateCompDisabled=function(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)},e}(),fo=function(){return fo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fo.apply(this,arguments)},go=function(){function e(){this.customFilterOptions={}}return e.prototype.init=function(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e),this.checkForDeprecatedParams()},e.prototype.checkForDeprecatedParams=function(){Xr.some(this.filterOptions,(function(e){return"string"!=typeof e&&null!=e.test}))&&console.warn("AG Grid: [IFilterOptionDef] since v26.2.0, test() has been replaced with predicate()."),Xr.some(this.filterOptions,(function(e){return"string"!=typeof e&&null!=e.hideFilterInput}))&&console.warn("AG Grid: [IFilterOptionDef] since v26.2.0, useOfHideFilterInput has been replaced with numberOfInputs.")},e.prototype.getFilterOptions=function(){return this.filterOptions},e.prototype.mapCustomOptions=function(){var e=this;this.filterOptions&&this.filterOptions.forEach((function(t){if("string"!==typeof t){if(R([["displayKey"],["displayName"],["predicate","test"]],(function(e){return!!O(e,(function(e){return null!=t[e]}))||(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '"+e+"'"),!1)}))){var n=t.test,r=fo({},t);null!=n&&null==t.predicate&&(r.predicate=function(e,t){return n(e[0],t)},delete r.test),r.hideFilterInput&&null==r.numberOfInputs&&(r.numberOfInputs=0,delete r.hideFilterInput),e.customFilterOptions[t.displayKey]=r}else e.filterOptions=Xr.filter(e.filterOptions,(function(e){return e===t}))||[]}}))},e.prototype.selectDefaultItem=function(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){var t=this.filterOptions[0];"string"===typeof t?this.defaultOption=t:t.displayKey?this.defaultOption=t.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")},e.prototype.getDefaultOption=function(){return this.defaultOption},e.prototype.getCustomOption=function(e){return this.customFilterOptions[e]},e}(),vo={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose One",equals:"Equals",notEqual:"Not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"In range",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equals",greaterThanOrEqual:"Greater than or equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},mo=function(){function e(){}return e.BACKSPACE=8,e.TAB=9,e.ENTER=13,e.SHIFT=16,e.ESCAPE=27,e.SPACE=32,e.LEFT=37,e.UP=38,e.RIGHT=39,e.DOWN=40,e.DELETE=46,e.A=65,e.C=67,e.V=86,e.D=68,e.Z=90,e.Y=89,e.F2=113,e.PAGE_UP=33,e.PAGE_DOWN=34,e.PAGE_HOME=36,e.PAGE_END=35,e}(),yo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bo=function(){return bo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bo.apply(this,arguments)},wo=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Co=function(e){function t(t,n){void 0===n&&(n={});var r=e.call(this)||this;return r.eFocusableElement=t,r.callbacks=n,r.callbacks=bo({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(e){if(!e.defaultPrevented){var t=r.focusService.findNextFocusableElement(r.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())}}},n),r}return yo(t,e),t.prototype.postConstruct=function(){un(this.eFocusableElement,t.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)},t.prototype.addKeyDownListeners=function(e){var t=this;this.addManagedListener(e,"keydown",(function(e){e.defaultPrevented||Me(e)||(t.callbacks.shouldStopEventPropagation(e)?Ne(e):e.keyCode===mo.TAB?t.callbacks.onTabKeyDown(e):t.callbacks.handleKeyDown&&t.callbacks.handleKeyDown(e))}))},t.FOCUS_MANAGED_CLASS="ag-focus-managed",wo([de("focusService")],t.prototype,"focusService",void 0),wo([ce],t.prototype,"postConstruct",null),t}(ze),xo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),So=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Eo=function(e){function t(t){var n=e.call(this)||this;return n.filterNameKey=t,n.applyActive=!1,n.hidePopup=null,n.appliedModel=null,n}return xo(t,e),t.prototype.postConstruct=function(){this.resetTemplate(),this.createManagedBean(new Co(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)}))},t.prototype.handleKeyDown=function(e){},t.prototype.getFilterTitle=function(){return this.translate(this.filterNameKey)},t.prototype.onFilterChanged=function(){console.warn("AG Grid: you should not call onFilterChanged() directly on the filter, please call\n gridApi.onFilterChanged() instead. onFilterChanged is not part of the exposed filter interface (it was\n a method that existed on an old version of the filters that was not intended for public use."),this.providedFilterParams.filterChangedCallback()},t.prototype.isFilterActive=function(){return!!this.appliedModel},t.prototype.resetTemplate=function(e){var t='\n <div class="ag-filter-wrapper">\n <div class="ag-filter-body-wrapper ag-'+this.getCssIdentifier()+'-body-wrapper">\n '+this.createBodyTemplate()+"\n </div>\n </div>";this.setTemplate(t,e)},t.prototype.isReadOnly=function(){return!!this.providedFilterParams.readOnly},t.prototype.init=function(e){var t=this;this.setParams(e),this.resetUiToDefaults(!0).then((function(){t.updateUiVisibility(),t.setupOnBtApplyDebounce()}))},t.prototype.setParams=function(e){if(t.checkForDeprecatedParams(e),this.providedFilterParams=e,"keep"===e.newRowsAction)this.newRowsActionKeep=!0;else if("clear"===e.newRowsAction)this.newRowsActionKeep=!1;else{var n=[Ce.ROW_MODEL_TYPE_SERVER_SIDE,Ce.ROW_MODEL_TYPE_INFINITE];this.newRowsActionKeep=n.indexOf(this.rowModel.getType())>=0}this.applyActive=t.isUseApplyButton(e),this.createButtonPanel()},t.prototype.createButtonPanel=function(){var e=this,t=this.providedFilterParams.buttons;if(!(!t||t.length<1||this.isReadOnly())){var n=document.createElement("div");un(n,"ag-filter-apply-panel");Br(t).forEach((function(t){return function(t){var r,o;switch(t){case"apply":r=e.translate("applyFilter"),o=function(t){return e.onBtApply(!1,!1,t)};break;case"clear":r=e.translate("clearFilter"),o=function(){return e.onBtClear()};break;case"reset":r=e.translate("resetFilter"),o=function(){return e.onBtReset()};break;case"cancel":r=e.translate("cancelFilter"),o=function(t){e.onBtCancel(t)};break;default:return void console.warn("Unknown button type specified")}var i=Tn('<button\n type="button"\n ref="'+t+'FilterButton"\n class="ag-standard-button ag-filter-apply-panel-button"\n >'+r+"\n </button>");n.appendChild(i),e.addManagedListener(i,"click",o)}(t)})),this.getGui().appendChild(n)}},t.checkForDeprecatedParams=function(e){var t=e.buttons||[];if(!(t.length>0)){var n=e.applyButton,r=e.resetButton;e.clearButton&&(console.warn("AG Grid: as of AG Grid v23.2, filterParams.clearButton is deprecated. Please use filterParams.buttons instead"),t.push("clear")),r&&(console.warn("AG Grid: as of AG Grid v23.2, filterParams.resetButton is deprecated. Please use filterParams.buttons instead"),t.push("reset")),n&&(console.warn("AG Grid: as of AG Grid v23.2, filterParams.applyButton is deprecated. Please use filterParams.buttons instead"),t.push("apply")),e.apply&&(console.warn("AG Grid: as of AG Grid v21, filterParams.apply is deprecated. Please use filterParams.buttons instead"),t.push("apply")),e.buttons=t}},t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.setupOnBtApplyDebounce=function(){var e=t.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs());this.onBtApplyDebounce=re(this.onBtApply.bind(this),e)},t.prototype.getModel=function(){return this.appliedModel},t.prototype.setModel=function(e){var t=this;return(e?this.setModelIntoUi(e):this.resetUiToDefaults()).then((function(){t.updateUiVisibility(),t.applyModel()}))},t.prototype.onBtCancel=function(e){var t=this,n=this.getModel(),r=function(){t.onUiChanged(!1,"prevent"),t.providedFilterParams.closeOnApply&&t.close(e)};null!=n?this.setModelIntoUi(n).then(r):this.resetUiToDefaults().then(r)},t.prototype.onBtClear=function(){var e=this;this.resetUiToDefaults().then((function(){return e.onUiChanged()}))},t.prototype.onBtReset=function(){this.onBtClear(),this.onBtApply()},t.prototype.applyModel=function(){var e=this.getModelFromUi();if(!this.isModelValid(e))return!1;var t=this.appliedModel;return this.appliedModel=e,!this.areModelsEqual(t,e)},t.prototype.isModelValid=function(e){return!0},t.prototype.onBtApply=function(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),this.applyModel()&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t}),this.providedFilterParams.closeOnApply&&this.applyActive&&!e&&!t&&this.close(n)},t.prototype.onNewRowsLoaded=function(){var e=this;this.newRowsActionKeep||this.resetUiToDefaults().then((function(){return e.appliedModel=null}))},t.prototype.close=function(e){if(this.hidePopup){var t,n=e,r=n&&n.key;"Enter"!==r&&"Space"!==r||(t={keyboardEvent:n}),this.hidePopup(t),this.hidePopup=null}},t.prototype.isNewRowsActionKeep=function(){return this.newRowsActionKeep},t.prototype.onUiChanged=function(e,t){if(void 0===e&&(e=!1),this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly){var n=this.isModelValid(this.getModelFromUi());mn(this.getRefElement("applyFilterButton"),!n)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()},t.prototype.afterGuiAttached=function(e){null!=e&&(this.hidePopup=e.hidePopup)},t.getDebounceMs=function(e,n){return t.isUseApplyButton(e)?(null!=e.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=e.debounceMs?e.debounceMs:n},t.isUseApplyButton=function(e){return t.checkForDeprecatedParams(e),!!e.buttons&&e.buttons.indexOf("apply")>=0},t.prototype.destroy=function(){this.hidePopup=null,e.prototype.destroy.call(this)},t.prototype.translate=function(e){return this.gridOptionsWrapper.getLocaleTextFunc()(e,vo[e])},t.prototype.getCellValue=function(e){return this.providedFilterParams.valueGetter(e)},So([de("rowModel")],t.prototype,"rowModel",void 0),So([ce],t.prototype,"postConstruct",null),t}(io),_o=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ro=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Oo=function(e){function t(t,n){var r=e.call(this,n)||this;return r.labelSeparator="",r.labelAlignment="left",r.label="",r.config=t||{},r}return _o(t,e),t.prototype.postConstruct=function(){un(this.getGui(),"ag-labeled"),un(this.eLabel,"ag-label");var e=this.config,t=e.labelSeparator,n=e.label,r=e.labelWidth,o=e.labelAlignment;null!=t&&this.setLabelSeparator(t),null!=n&&this.setLabel(n),null!=r&&this.setLabelWidth(r),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()},t.prototype.refreshLabel=function(){On(this.eLabel),"string"===typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(un(this.eLabel,"ag-hidden"),tr(this.eLabel,"presentation")):(pn(this.eLabel,"ag-hidden"),tr(this.eLabel,null))},t.prototype.setLabelSeparator=function(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this},t.prototype.getLabelId=function(){return this.eLabel.id=this.eLabel.id||"ag-"+this.getCompId()+"-label",this.eLabel.id},t.prototype.getLabel=function(){return this.label},t.prototype.setLabel=function(e){return this.label===e||(this.label=e,this.refreshLabel()),this},t.prototype.setLabelAlignment=function(e){var t=this.getGui();return dn(t,"ag-label-align-left","left"===e),dn(t,"ag-label-align-right","right"===e),dn(t,"ag-label-align-top","top"===e),this},t.prototype.setLabelWidth=function(e){return null==this.label||Hn(this.eLabel,e),this},Ro([ce],t.prototype,"postConstruct",null),t}(io),Ao=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Po=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.className=r,o.disabled=!1,o}return Ao(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.className&&un(this.getGui(),this.className)},t.prototype.onValueChange=function(e){var n=this;return this.addManagedListener(this,t.EVENT_CHANGED,(function(){return e(n.getValue())})),this},t.prototype.getWidth=function(){return this.getGui().clientWidth},t.prototype.setWidth=function(e){return Wn(this.getGui(),e),this},t.prototype.getPreviousValue=function(){return this.previousValue},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e,n){return this.value===e||(this.previousValue=this.value,this.value=e,n||this.dispatchEvent({type:t.EVENT_CHANGED})),this},t.prototype.setDisabled=function(e){e=!!e;var t=this.getGui();return mn(t,e),dn(t,"ag-disabled",e),this.disabled=e,this},t.prototype.isDisabled=function(){return!!this.disabled},t.EVENT_CHANGED="valueChange",t}(Oo),To=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Do=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ko=function(e){function t(t,n,r,o){var i=e.call(this,t,'<div class="ag-picker-field" role="presentation">\n <div ref="eLabel"></div>\n <div ref="eWrapper"\n class="ag-wrapper ag-picker-field-wrapper"\n tabIndex="-1"\n '+(o?'aria-haspopup="'+o+'"':"")+'\n >\n <div ref="eDisplayField" class="ag-picker-field-display"></div>\n <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n </div>\n </div>',n)||this;return i.pickerIcon=r,i.isPickerDisplayed=!1,i.isDestroyingPicker=!1,i.skipClick=!1,i}return To(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this);var n=this.getCompId()+"-display";this.eDisplayField.setAttribute("id",n),ar(this.eWrapper,n);var r=function(){t.skipClick?t.skipClick=!1:t.isDisabled()||(t.pickerComponent=t.showPicker())},o=this.getGui();if(this.addManagedListener(o,"mousedown",(function(e){!t.skipClick&&t.pickerComponent&&t.pickerComponent.isAlive()&&Pn(t.pickerComponent.getGui())&&o.contains(e.target)&&(t.skipClick=!0)})),this.addManagedListener(o,"keydown",(function(e){switch(e.keyCode){case mo.UP:case mo.DOWN:case mo.ENTER:case mo.SPACE:r();case mo.ESCAPE:t.isPickerDisplayed&&e.preventDefault()}})),this.addManagedListener(this.eWrapper,"click",r),this.addManagedListener(this.eLabel,"click",r),this.pickerIcon){var i=Nr(this.pickerIcon,this.gridOptionsWrapper);i&&this.eIcon.appendChild(i)}},t.prototype.refreshLabel=function(){o(this.getLabel())?ir(this.eWrapper,this.getLabelId()):this.eWrapper.removeAttribute("aria-labelledby"),e.prototype.refreshLabel.call(this)},t.prototype.setAriaLabel=function(e){return or(this.eWrapper,e),this},t.prototype.setInputWidth=function(e){return Hn(this.eWrapper,e),this},t.prototype.getFocusableElement=function(){return this.eWrapper},Do([ao("eLabel")],t.prototype,"eLabel",void 0),Do([ao("eWrapper")],t.prototype,"eWrapper",void 0),Do([ao("eDisplayField")],t.prototype,"eDisplayField",void 0),Do([ao("eIcon")],t.prototype,"eIcon",void 0),t}(Po),No=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mo=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Io=function(e){function t(t){void 0===t&&(t="default");var n=e.call(this,'<div class="ag-list ag-'+t+'-list" role="listbox"></div>')||this;return n.cssIdentifier=t,n.options=[],n.itemEls=[],n}return No(t,e),t.prototype.init=function(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))},t.prototype.handleKeyDown=function(e){var t=e.keyCode;switch(t){case mo.ENTER:if(this.highlightedEl){var n=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(n)}else this.setValue(this.getValue());break;case mo.DOWN:case mo.UP:var r=t===mo.DOWN,o=void 0;if(e.preventDefault(),this.highlightedEl){var i=this.itemEls.indexOf(this.highlightedEl)+(r?1:-1);i=Math.min(Math.max(i,0),this.itemEls.length-1),o=this.itemEls[i]}else o=this.itemEls[r?0:this.itemEls.length-1];this.highlightItem(o)}},t.prototype.addOptions=function(e){var t=this;return e.forEach((function(e){return t.addOption(e)})),this},t.prototype.addOption=function(e){var t=e.value,n=ot(e.text||t);return this.options.push({value:t,text:n}),this.renderOption(t,n),this},t.prototype.renderOption=function(e,t){var n=this,r=document.createElement("div");tr(r,"option"),un(r,"ag-list-item"),un(r,"ag-"+this.cssIdentifier+"-list-item"),r.innerHTML="<span>"+t+"</span>",r.tabIndex=-1,this.itemEls.push(r),this.addManagedListener(r,"mouseover",(function(){return n.highlightItem(r)})),this.addManagedListener(r,"mouseleave",(function(){return n.clearHighlighted()})),this.addManagedListener(r,"click",(function(){return n.setValue(e)})),this.getGui().appendChild(r)},t.prototype.setValue=function(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(),this;var n=_(this.options,(function(t){return t.value===e}));if(-1!==n){var r=this.options[n];this.value=r.value,this.displayValue=null!=r.text?r.text:r.value,this.highlightItem(this.itemEls[n]),t||this.fireChangeEvent()}return this},t.prototype.setValueByIndex=function(e){return this.setValue(this.options[e].value)},t.prototype.getValue=function(){return this.value},t.prototype.getDisplayValue=function(){return this.displayValue},t.prototype.refreshHighlighted=function(){var e=this;this.clearHighlighted();var t=_(this.options,(function(t){return t.value===e.value}));-1!==t&&this.highlightItem(this.itemEls[t])},t.prototype.reset=function(){this.value=null,this.displayValue=null,this.clearHighlighted(),this.fireChangeEvent()},t.prototype.highlightItem=function(e){e.offsetParent&&(this.clearHighlighted(),this.highlightedEl=e,un(this.highlightedEl,t.ACTIVE_CLASS),br(this.highlightedEl,!0),this.highlightedEl.focus())},t.prototype.clearHighlighted=function(){this.highlightedEl&&this.highlightedEl.offsetParent&&(pn(this.highlightedEl,t.ACTIVE_CLASS),br(this.highlightedEl,!1),this.highlightedEl=null)},t.prototype.fireChangeEvent=function(){this.dispatchEvent({type:Po.EVENT_CHANGED}),this.fireItemSelected()},t.prototype.fireItemSelected=function(){this.dispatchEvent({type:t.EVENT_ITEM_SELECTED})},t.EVENT_ITEM_SELECTED="selectedItem",t.ACTIVE_CLASS="ag-active-item",Mo([ce],t.prototype,"init",null),t}(io),Lo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fo=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Go=function(e){function t(t){return e.call(this,t,"ag-select","smallDown","listbox")||this}return Lo(t,e),t.prototype.init=function(){var e=this;this.listComponent=this.createBean(new Io("select")),this.listComponent.setParentComponent(this),this.eWrapper.tabIndex=0,this.listComponent.addManagedListener(this.listComponent,Io.EVENT_ITEM_SELECTED,(function(){e.hideList&&e.hideList()})),this.listComponent.addManagedListener(this.listComponent,Po.EVENT_CHANGED,(function(){e.setValue(e.listComponent.getValue(),!1,!0),e.hideList&&e.hideList()}))},t.prototype.showPicker=function(){var e=this,t=this.listComponent.getGui(),n=this.addManagedListener(document.body,"wheel",(function(n){!t.contains(n.target)&&e.hideList&&e.hideList()})),r=this.addManagedListener(t,"focusout",(function(n){!t.contains(n.relatedTarget)&&e.hideList&&e.hideList()})),o=this.gridOptionsWrapper.getLocaleTextFunc(),i=this.popupService.addPopup({modal:!0,eChild:t,closeOnEsc:!0,closedCallback:function(){e.hideList=null,e.isPickerDisplayed=!1,r(),n(),e.isAlive()&&e.getFocusableElement().focus()},ariaLabel:o("ariaLabelSelectField","Select Field")});return i&&(this.hideList=i.hideFunc),this.isPickerDisplayed=!0,Hn(t,Sn(this.eWrapper)),t.style.maxHeight=wn(this.popupService.getPopupParent())+"px",t.style.position="absolute",this.popupService.positionPopupUnderComponent({type:"ag-list",eventSource:this.eWrapper,ePopup:t,keepWithinBounds:!0}),this.listComponent.refreshHighlighted(),this.listComponent},t.prototype.addOptions=function(e){var t=this;return e.forEach((function(e){return t.addOption(e)})),this},t.prototype.addOption=function(e){return this.listComponent.addOption(e),this},t.prototype.setValue=function(t,n,r){return this.value===t?this:(r||this.listComponent.setValue(t,!0),this.listComponent.getValue()===this.getValue()?this:(this.eDisplayField.innerHTML=this.listComponent.getDisplayValue(),e.prototype.setValue.call(this,t,n)))},t.prototype.destroy=function(){this.hideList&&this.hideList(),this.destroyBean(this.listComponent),e.prototype.destroy.call(this)},Fo([de("popupService")],t.prototype,"popupService",void 0),Fo([ce],t.prototype,"init",null),t}(ko),Ho=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wo=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Vo=function(e){function t(t,n,r,o){void 0===r&&(r="text"),void 0===o&&(o="input");var i=e.call(this,t,'\n <div role="presentation">\n <div ref="eLabel" class="ag-input-field-label"></div>\n <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n <'+o+' ref="eInput" class="ag-input-field-input"></'+o+">\n </div>\n </div>",n)||this;return i.inputType=r,i.displayFieldTag=o,i}return Ho(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.setInputType(),un(this.eLabel,this.className+"-label"),un(this.eWrapper,this.className+"-input-wrapper"),un(this.eInput,this.className+"-input"),un(this.getGui(),"ag-input-field"),this.eInput.id=this.eInput.id||"ag-"+this.getCompId()+"-input";var t=this.config,n=t.width,r=t.value;null!=n&&this.setWidth(n),null!=r&&this.setValue(r),this.addInputListeners()},t.prototype.refreshLabel=function(){o(this.getLabel())?ir(this.eInput,this.getLabelId()):this.eInput.removeAttribute("aria-labelledby"),e.prototype.refreshLabel.call(this)},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",(function(t){return e.setValue(t.target.value)}))},t.prototype.setInputType=function(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)},t.prototype.getInputElement=function(){return this.eInput},t.prototype.setInputWidth=function(e){return Hn(this.eWrapper,e),this},t.prototype.setInputName=function(e){return this.getInputElement().setAttribute("name",e),this},t.prototype.getFocusableElement=function(){return this.eInput},t.prototype.setMaxLength=function(e){return this.eInput.maxLength=e,this},t.prototype.setInputPlaceholder=function(e){return qn(this.eInput,"placeholder",e),this},t.prototype.setInputAriaLabel=function(e){return or(this.eInput,e),this},t.prototype.setDisabled=function(t){return mn(this.eInput,t),e.prototype.setDisabled.call(this,t)},Wo([ao("eLabel")],t.prototype,"eLabel",void 0),Wo([ao("eWrapper")],t.prototype,"eWrapper",void 0),Wo([ao("eInput")],t.prototype,"eInput",void 0),t}(Po),jo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bo=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e[e.One=0]="One",e[e.Two=1]="Two"}(lo||(lo={}));var zo,Uo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jo(t,e),t.prototype.getNumberOfInputs=function(e){var n=this.optionsFactory.getCustomOption(e);if(n){var r=n.numberOfInputs;return null!=r?r:1}return e===t.EMPTY?0:e===t.IN_RANGE?2:1},t.prototype.onFloatingFilterChanged=function(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)},t.prototype.setTypeFromFloatingFilter=function(e){this.eType1.setValue(e),this.eType2.setValue(this.optionsFactory.getDefaultOption()),(this.isDefaultOperator("AND")?this.eJoinOperatorAnd:this.eJoinOperatorOr).setValue(!0)},t.prototype.getModelFromUi=function(){return this.isConditionUiComplete(lo.One)?this.isAllowTwoConditions()&&this.isConditionUiComplete(lo.Two)?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:this.createCondition(lo.One),condition2:this.createCondition(lo.Two)}:this.createCondition(lo.One):null},t.prototype.getConditionTypes=function(){return[this.eType1.getValue(),this.eType2.getValue()]},t.prototype.getJoinOperator=function(){return!0===this.eJoinOperatorOr.getValue()?"OR":"AND"},t.prototype.areModelsEqual=function(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;var n,r=!e.operator,o=!t.operator;if(!r&&o||r&&!o)return!1;if(r){var i=e,a=t;n=this.areSimpleModelsEqual(i,a)}else{var s=e,l=t;n=s.operator===l.operator&&this.areSimpleModelsEqual(s.condition1,l.condition1)&&this.areSimpleModelsEqual(s.condition2,l.condition2)}return n},t.prototype.setModelIntoUi=function(e){if(e.operator){var t=e,n="OR"===t.operator;this.eJoinOperatorAnd.setValue(!n),this.eJoinOperatorOr.setValue(n),this.eType1.setValue(t.condition1.type),this.eType2.setValue(t.condition2.type),this.setConditionIntoUi(t.condition1,lo.One),this.setConditionIntoUi(t.condition2,lo.Two)}else{var r=e;this.eJoinOperatorAnd.setValue(this.isDefaultOperator("AND")),this.eJoinOperatorOr.setValue(this.isDefaultOperator("OR")),this.eType1.setValue(r.type),this.eType2.setValue(this.optionsFactory.getDefaultOption()),this.setConditionIntoUi(r,lo.One),this.setConditionIntoUi(null,lo.Two)}return $r.resolve()},t.prototype.doesFilterPass=function(e){var t=this,n=this.getModel();if(null==n)return!0;var r=n.operator,o=[];if(r){var i=n;o.push(i.condition1,i.condition2)}else o.push(n);return(r&&"OR"===r?O:R)(o,(function(n){return t.individualConditionPasses(e,n)}))},t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.optionsFactory=new go,this.optionsFactory.init(t,this.getDefaultFilterOptions()),this.allowTwoConditions=!t.suppressAndOrCondition,this.alwaysShowBothConditions=!!t.alwaysShowBothConditions,this.defaultJoinOperator=this.getDefaultJoinOperator(t.defaultJoinOperator),this.putOptionsIntoDropdown(),this.addChangedListeners()},t.prototype.getDefaultJoinOperator=function(e){return S(["AND","OR"],e)?e:"AND"},t.prototype.putOptionsIntoDropdown=function(){var e=this,t=this.optionsFactory.getFilterOptions(),n=[this.eType1,this.eType2];A(t,(function(t){var r="string"===typeof t?e.createBoilerplateListOption(t):e.createCustomListOption(t);A(n,(function(e){return e.addOption(r)}))})),A(n,(function(e){return e.setDisabled(t.length<=1)}))},t.prototype.createBoilerplateListOption=function(e){return{value:e,text:this.translate(e)}},t.prototype.createCustomListOption=function(e){var t=e.displayKey,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.gridOptionsWrapper.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}},t.prototype.isAllowTwoConditions=function(){return this.allowTwoConditions},t.prototype.createBodyTemplate=function(){return'\n <ag-select class="ag-filter-select" ref="eOptions1"></ag-select>\n '+this.createValueTemplate(lo.One)+'\n <div class="ag-filter-condition" ref="eJoinOperatorPanel">\n <ag-radio-button ref="eJoinOperatorAnd" class="ag-filter-condition-operator ag-filter-condition-operator-and"></ag-radio-button>\n <ag-radio-button ref="eJoinOperatorOr" class="ag-filter-condition-operator ag-filter-condition-operator-or"></ag-radio-button>\n </div>\n <ag-select class="ag-filter-select" ref="eOptions2"></ag-select>\n '+this.createValueTemplate(lo.Two)},t.prototype.getCssIdentifier=function(){return"simple-filter"},t.prototype.updateUiVisibility=function(){var e=this,t=[[this.eType1],[this.eType2,this.eJoinOperatorPanel,this.eJoinOperatorAnd,this.eJoinOperatorOr]],n=[this.eCondition1Body,this.eCondition2Body];A(t,(function(t,n){var r=e.isConditionVisible(n),o=e.isConditionDisabled(n);A(t,(function(e){e instanceof Vo||e instanceof Go?(e.setDisabled(o),e.setDisplayed(r)):(mn(e,o),gn(e,r))}))})),A(n,(function(t,n){gn(t,e.isConditionBodyVisible(n))})),this.forEachInput((function(t,n,r,o){e.setElementDisplayed(t,n<o),e.setElementDisabled(t,e.isConditionDisabled(r))})),this.resetPlaceholder()},t.prototype.afterGuiAttached=function(t){if(e.prototype.afterGuiAttached.call(this,t),this.resetPlaceholder(),!t||!t.suppressFocus&&!this.isReadOnly()){var n=this.getInputs()[0][0];if(!n)return;n instanceof Vo&&n.getInputElement().focus()}},t.prototype.resetPlaceholder=function(){var e=this,t=this.gridOptionsWrapper.getLocaleTextFunc();this.forEachInput((function(n,r,o,i){if(n instanceof Vo){var a=0===r&&i>1?"inRangeStart":0===r?"filterOoo":"inRangeEnd",s=0===r&&i>1?t("ariaFilterFromValue","Filter from value"):0===r?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");n.setInputPlaceholder(e.translate(a)),n.setInputAriaLabel(s)}}))},t.prototype.setElementValue=function(e,t,n){e instanceof Vo&&e.setValue(t?String(t):null,n)},t.prototype.setElementDisplayed=function(e,t){e instanceof io&&gn(e.getGui(),t)},t.prototype.setElementDisabled=function(e,t){e instanceof io&&mn(e.getGui(),t)},t.prototype.attachElementOnChange=function(e,t){e instanceof Vo&&e.onValueChange(t)},t.prototype.forEachInput=function(e){var t=this,n=this.getInputs();this.getConditionTypes().forEach((function(r,o){for(var i=t.getNumberOfInputs(r),a=0;a<n[o].length;a++){var s=n[o][a];null!=s&&e(s,a,o,i)}}))},t.prototype.isConditionVisible=function(e){return 0===e||!!this.allowTwoConditions&&(this.isReadOnly()?this.isConditionUiComplete(e):!!this.alwaysShowBothConditions||this.isConditionUiComplete(e-1))},t.prototype.isConditionDisabled=function(e){return!!this.isReadOnly()||(!this.isConditionVisible(e)||0!==e&&!this.isConditionUiComplete(e-1))},t.prototype.isConditionBodyVisible=function(e){if(!this.isConditionVisible(e))return!1;var t=this.getConditionTypes()[e];return this.getNumberOfInputs(t)>0},t.prototype.isConditionUiComplete=function(e){return this.getConditionTypes()[e]!==t.EMPTY&&!Xr.some(this.getValues(e),(function(e){return null==e}))},t.prototype.resetUiToDefaults=function(e){var t=this,n=this.gridOptionsWrapper.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator"),r="ag-simple-filter-and-or-"+this.getCompId(),o=this.optionsFactory.getDefaultOption();return this.eType1.setValue(o,e).setAriaLabel(n).setDisabled(this.isReadOnly()),this.eType2.setValue(this.optionsFactory.getDefaultOption(),e).setAriaLabel(n).setDisabled(this.isReadOnly()),this.eJoinOperatorAnd.setValue(this.isDefaultOperator("AND"),e).setName(r).setLabel(this.translate("andCondition")).setDisabled(this.isReadOnly()),this.eJoinOperatorOr.setValue(this.isDefaultOperator("OR"),e).setName(r).setLabel(this.translate("orCondition")).setDisabled(this.isReadOnly()),this.forEachInput((function(n){t.setElementValue(n,null,e),t.setElementDisabled(n,t.isReadOnly())})),this.resetPlaceholder(),$r.resolve()},t.prototype.setConditionIntoUi=function(e,t){var n=this,r=this.mapValuesFromModel(e);this.forEachInput((function(e,o,i,a){i===t&&n.setElementValue(e,r[o]?r[o]:null)}))},t.prototype.setValueFromFloatingFilter=function(e){var t=this;this.forEachInput((function(n,r,o,i){t.setElementValue(n,0===r&&0===o?e:null)}))},t.prototype.isDefaultOperator=function(e){return e===this.defaultJoinOperator},t.prototype.addChangedListeners=function(){var e=this;if(!this.isReadOnly()){var t=function(){return e.onUiChanged()};this.eType1.onValueChange(t),this.eType2.onValueChange(t),this.eJoinOperatorOr.onValueChange(t),this.eJoinOperatorAnd.onValueChange(t),this.forEachInput((function(n){e.attachElementOnChange(n,t)}))}},t.prototype.individualConditionPasses=function(e,t){var n=this.getCellValue(e.node),r=this.mapValuesFromModel(t),o=this.optionsFactory.getCustomOption(t.type),i=this.evaluateCustomFilter(o,r,n);return null!=i?i:null==n?this.evaluateNullValue(t.type):this.evaluateNonNullValue(r,n,t)},t.prototype.evaluateCustomFilter=function(e,t,n){if(null!=e){var r=e.predicate;return null==r||Xr.some(t,(function(e){return null==e}))?void 0:r(t,n)}},t.EMPTY="empty",t.EQUALS="equals",t.NOT_EQUAL="notEqual",t.LESS_THAN="lessThan",t.LESS_THAN_OR_EQUAL="lessThanOrEqual",t.GREATER_THAN="greaterThan",t.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",t.IN_RANGE="inRange",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.STARTS_WITH="startsWith",t.ENDS_WITH="endsWith",Bo([ao("eOptions1")],t.prototype,"eType1",void 0),Bo([ao("eOptions2")],t.prototype,"eType2",void 0),Bo([ao("eJoinOperatorPanel")],t.prototype,"eJoinOperatorPanel",void 0),Bo([ao("eJoinOperatorAnd")],t.prototype,"eJoinOperatorAnd",void 0),Bo([ao("eJoinOperatorOr")],t.prototype,"eJoinOperatorOr",void 0),Bo([ao("eCondition1Body")],t.prototype,"eCondition1Body",void 0),Bo([ao("eCondition2Body")],t.prototype,"eCondition2Body",void 0),t}(Eo),Yo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yo(t,e),t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.scalarFilterParams=t,this.checkDeprecatedParams()},t.prototype.checkDeprecatedParams=function(){this.scalarFilterParams.nullComparator&&(console.warn("AG Grid: Since v21.0, the property filterParams.nullComparator is deprecated. Please use filterParams.includeBlanksInEquals, filterParams.includeBlanksInLessThan and filterParams.includeBlanksInGreaterThan instead."),this.scalarFilterParams.includeBlanksInEquals=this.scalarFilterParams.nullComparator.equals,this.scalarFilterParams.includeBlanksInLessThan=this.scalarFilterParams.nullComparator.lessThan,this.scalarFilterParams.includeBlanksInGreaterThan=this.scalarFilterParams.nullComparator.greaterThan)},t.prototype.evaluateNullValue=function(e){switch(e){case t.EQUALS:case t.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case t.GREATER_THAN:case t.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case t.LESS_THAN:case t.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case t.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0}return!1},t.prototype.evaluateNonNullValue=function(e,n,r){var o=this.comparator(),i=o(e[0],n);switch(r.type){case t.EQUALS:return 0===i;case t.NOT_EQUAL:return 0!==i;case t.GREATER_THAN:return i>0;case t.GREATER_THAN_OR_EQUAL:return i>=0;case t.LESS_THAN:return i<0;case t.LESS_THAN_OR_EQUAL:return i<=0;case t.IN_RANGE:var a=o(e[1],n);return this.scalarFilterParams.inRangeInclusive?i>=0&&a<=0:i>0&&a<0;default:return console.warn('AG Grid: Unexpected type of filter "'+r.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}},t}(Uo),qo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ko=function(){return Ko=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ko.apply(this,arguments)},$o=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Qo=1/0,Zo=function(e){function t(){var t=e.call(this,"dateFilter")||this;return t.minValidYear=1e3,t.maxValidYear=Qo,t}return qo(t,e),t.prototype.afterGuiAttached=function(t){e.prototype.afterGuiAttached.call(this,t),this.dateCondition1FromComp.afterGuiAttached(t)},t.prototype.mapValuesFromModel=function(e){var t=e||{},n=t.dateFrom,r=t.dateTo,o=t.type;return[n&&Sr(n)||null,r&&Sr(r)||null].slice(0,this.getNumberOfInputs(o))},t.prototype.comparator=function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)},t.prototype.defaultComparator=function(e,t){return null==t||t<e?-1:t>e?1:0},t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.dateFilterParams=t;var n=function(e,n){if(null!=t[e]){if(!isNaN(t[e]))return null==t[e]?n:Number(t[e]);console.warn("AG Grid: DateFilter "+e+" is not a number")}return n};this.minValidYear=n("minValidYear",1e3),this.maxValidYear=n("maxValidYear",Qo),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),this.createDateComponents()},t.prototype.createDateComponents=function(){var e=this,t=function(t){return new ho(e.getContext(),e.userComponentFactory,{onDateChanged:function(){return e.onUiChanged()},filterParams:e.dateFilterParams},t)};this.dateCondition1FromComp=t(this.eCondition1PanelFrom),this.dateCondition1ToComp=t(this.eCondition1PanelTo),this.dateCondition2FromComp=t(this.eCondition2PanelFrom),this.dateCondition2ToComp=t(this.eCondition2PanelTo),this.addDestroyFunc((function(){e.forEachInput((function(e){return e.destroy()}))}))},t.prototype.setElementValue=function(e,t,n){e.setDate(t)},t.prototype.setElementDisplayed=function(e,t){e.setDisplayed(t)},t.prototype.setElementDisabled=function(e,t){e.setDisabled(t)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueTemplate=function(e){var t=e===lo.One?"1":"2";return'\n <div class="ag-filter-body" ref="eCondition'+t+'Body">\n <div class="ag-filter-from ag-filter-date-from" ref="eCondition'+t+'PanelFrom"></div>\n <div class="ag-filter-to ag-filter-date-to" ref="eCondition'+t+'PanelTo"></div>\n </div>'},t.prototype.isConditionUiComplete=function(t){var n=this;if(!e.prototype.isConditionUiComplete.call(this,t))return!1;var r=!0;return this.forEachInput((function(e,o,i,a){var s;i!==t||!r||o>=a||(r=r&&(null!=(s=e.getDate())&&s.getUTCFullYear()>=n.minValidYear&&s.getUTCFullYear()<=n.maxValidYear))})),r},t.prototype.areSimpleModelsEqual=function(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type},t.prototype.getFilterType=function(){return"date"},t.prototype.createCondition=function(e){var t=this.getConditionTypes()[e],n={},r=this.getValues(e);return r.length>0&&(n.dateFrom=xr(r[0])),r.length>1&&(n.dateTo=xr(r[1])),Ko({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},n)},t.prototype.resetPlaceholder=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput((function(e){e.setInputPlaceholder(t),e.setInputAriaLabel(n)}))},t.prototype.getInputs=function(){return[[this.dateCondition1FromComp,this.dateCondition1ToComp],[this.dateCondition2FromComp,this.dateCondition2ToComp]]},t.prototype.getValues=function(e){var t=[];return this.forEachInput((function(n,r,o,i){e===o&&r<i&&t.push(n.getDate())})),t},t.DEFAULT_FILTER_OPTIONS=[Xo.EQUALS,Xo.GREATER_THAN,Xo.LESS_THAN,Xo.NOT_EQUAL,Xo.IN_RANGE],$o([ao("eCondition1PanelFrom")],t.prototype,"eCondition1PanelFrom",void 0),$o([ao("eCondition1PanelTo")],t.prototype,"eCondition1PanelTo",void 0),$o([ao("eCondition2PanelFrom")],t.prototype,"eCondition2PanelFrom",void 0),$o([ao("eCondition2PanelTo")],t.prototype,"eCondition2PanelTo",void 0),$o([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(Xo),Jo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ei=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Jo(t,e),t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.getTextFromModel=function(e){if(!e)return null;if(null!=e.operator){var t=e,n=t||{},r=n.condition1,o=n.condition2,i=this.optionsFactory.getCustomOption(r.type),a=this.optionsFactory.getCustomOption(o.type);return[this.conditionToString(r,i),t.operator,this.conditionToString(o,a)].join(" ")}var s=e,l=this.optionsFactory.getCustomOption(s.type),c=l||{},u=c.displayKey,p=c.displayName,d=c.numberOfInputs;return u&&p&&0===d?(this.gridOptionsWrapper.getLocaleTextFunc()(u,p),p):this.conditionToString(s,l)},t.prototype.isEventFromFloatingFilter=function(e){return e&&e.afterFloatingFilter},t.prototype.getLastType=function(){return this.lastType},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setLastTypeFromModel=function(e){if(e){var t;if(e.operator)t=e.condition1;else t=e;this.lastType=t.type}else this.lastType=this.optionsFactory.getDefaultOption()},t.prototype.canWeEditAfterModelFromParentFilter=function(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;var t=e;return this.isTypeEditable(t.type)},t.prototype.init=function(e){this.optionsFactory=new go,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),this.lastType=this.optionsFactory.getDefaultOption(),this.readOnly=!!e.filterParams.readOnly;var t=this.isTypeEditable(this.lastType);this.setEditable(t)},t.prototype.doesFilterHaveSingleInput=function(e){var t=(this.optionsFactory.getCustomOption(e)||{}).numberOfInputs;return null==t||1==t},t.prototype.isTypeEditable=function(e){return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&e!==Uo.IN_RANGE&&e!==Uo.EMPTY},t}(io),ti=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ni=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ri=function(e){function t(){return e.call(this,'\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>\n <div ref="eDateWrapper" style="display: flex;"></div>\n </div>')||this}return ti(t,e),t.prototype.getDefaultFilterOptions=function(){return Zo.DEFAULT_FILTER_OPTIONS},t.prototype.conditionToString=function(e,t){var n=e.type,r=(t||{}).numberOfInputs,o=n==Uo.IN_RANGE||2===r,i=Sr(e.dateFrom),a=Sr(e.dateTo);return o?xr(i,!1)+"-"+xr(a,!1):null!=i?""+xr(i,!1):""+n},t.prototype.init=function(t){e.prototype.init.call(this,t),this.params=t,this.createDateComponent();var n=this.gridOptionsWrapper.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(n("ariaDateFilterInput","Date Filter Input"))},t.prototype.setEditable=function(e){gn(this.eDateWrapper,e),gn(this.eReadOnlyText.getGui(),!e)},t.prototype.onParentModelChanged=function(t,n){if(!this.isEventFromFloatingFilter(n)){e.prototype.setLastTypeFromModel.call(this,t);var r=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(t);if(this.setEditable(r),r){if(t){var o=t;this.dateComp.setDate(Sr(o.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.getTextFromModel(t)),this.dateComp.setDate(null)}},t.prototype.onDateChanged=function(){var e=this,t=xr(this.dateComp.getDate());this.params.parentFilterInstance((function(n){n&&n.onFloatingFilterChanged(e.getLastType(),Sr(t))}))},t.prototype.createDateComponent=function(){var e=this,t=Eo.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),n={onDateChanged:re(this.onDateChanged.bind(this),t),filterParams:this.params.column.getColDef().filterParams};this.dateComp=new ho(this.getContext(),this.userComponentFactory,n,this.eDateWrapper),this.addDestroyFunc((function(){return e.dateComp.destroy()}))},ni([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ni([ao("eReadOnlyText")],t.prototype,"eReadOnlyText",void 0),ni([ao("eDateWrapper")],t.prototype,"eDateWrapper",void 0),t}(ei),oi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ii=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ai=function(e){function t(){return e.call(this,'\n <div class="ag-filter-filter">\n <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>\n </div>')||this}return oi(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var t=this,n=this.eDateInput.getInputElement();this.shouldUseBrowserDatePicker(e)&&(qt()?console.warn("ag-grid: browserDatePicker is specified to true, but it is not supported in IE 11; reverting to text date picker"):n.type="date"),this.addManagedListener(n,"mousedown",(function(){t.eDateInput.isDisabled()||n.focus()})),this.addManagedListener(n,"input",(function(n){n.target===document.activeElement&&(t.eDateInput.isDisabled()||e.onDateChanged())}));var r=e.filterParams||{},o=r.minValidYear,i=r.maxValidYear;o&&(n.min=o+"-01-01"),i&&(n.max=i+"-12-31")},t.prototype.getDate=function(){return Sr(this.eDateInput.getValue())},t.prototype.setDate=function(e){this.eDateInput.setValue(xr(e,!1))},t.prototype.setInputPlaceholder=function(e){this.eDateInput.setInputPlaceholder(e)},t.prototype.setDisabled=function(e){this.eDateInput.setDisabled(e)},t.prototype.afterGuiAttached=function(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()},t.prototype.shouldUseBrowserDatePicker=function(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:Qt()||Zt()},ii([ao("eDateInput")],t.prototype,"eDateInput",void 0),t}(io),si=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),li=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ci=function(e){function t(){return e.call(this,"numberFilter")||this}return si(t,e),t.prototype.mapValuesFromModel=function(e){var t=e||{},n=t.filter,r=t.filterTo,o=t.type;return[n||null,r||null].slice(0,this.getNumberOfInputs(o))},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.comparator=function(){return function(e,t){return e===t?0:e<t?1:-1}},t.prototype.setParams=function(t){this.numberFilterParams=t;var n=this.getAllowedCharPattern();if(n){var r={allowedCharPattern:n};this.resetTemplate({eValueFrom1:r,eValueTo1:r,eValueFrom2:r,eValueTo2:r})}e.prototype.setParams.call(this,t)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueTemplate=function(e){var t=e===lo.One?"1":"2",n=this.getAllowedCharPattern()?"ag-input-text-field":"ag-input-number-field";return'\n <div class="ag-filter-body" ref="eCondition'+t+'Body" role="presentation">\n <'+n+' class="ag-filter-from ag-filter-filter" ref="eValue-index0-'+t+'"></'+n+">\n <"+n+' class="ag-filter-to ag-filter-filter" ref="eValue-index1-'+t+'"></'+n+">\n </div>"},t.prototype.getValues=function(e){var t=this,n=[];return this.forEachInput((function(r,o,i,a){e===i&&o<a&&n.push(t.stringToFloat(r.getValue()))})),n},t.prototype.areSimpleModelsEqual=function(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type},t.prototype.getFilterType=function(){return"number"},t.prototype.stringToFloat=function(e){if("number"===typeof e)return e;var t=r(e);return null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)},t.prototype.createCondition=function(e){var t=this.getConditionTypes()[e],n={filterType:this.getFilterType(),type:t},r=this.getValues(e);return r.length>0&&(n.filter=r[0]),r.length>1&&(n.filterTo=r[1]),n},t.prototype.getInputs=function(){return[[this.eValueFrom1,this.eValueTo1],[this.eValueFrom2,this.eValueTo2]]},t.prototype.getAllowedCharPattern=function(){var e=(this.numberFilterParams||{}).allowedCharPattern;return e||(Qt()||Kt()?null:"\\d\\-\\.")},t.DEFAULT_FILTER_OPTIONS=[Xo.EQUALS,Xo.NOT_EQUAL,Xo.LESS_THAN,Xo.LESS_THAN_OR_EQUAL,Xo.GREATER_THAN,Xo.GREATER_THAN_OR_EQUAL,Xo.IN_RANGE],li([ao("eValue-index0-1")],t.prototype,"eValueFrom1",void 0),li([ao("eValue-index1-1")],t.prototype,"eValueTo1",void 0),li([ao("eValue-index0-2")],t.prototype,"eValueFrom2",void 0),li([ao("eValue-index1-2")],t.prototype,"eValueTo2",void 0),t}(Xo),ui=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pi=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},di=function(e){function t(){return e.call(this,"textFilter")||this}return ui(t,e),t.trimInput=function(e){var t=e&&e.trim();return""===t?e:t},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.setParams=function(n){e.prototype.setParams.call(this,n),this.textFilterParams=n,this.comparator=this.textFilterParams.textCustomComparator||t.DEFAULT_COMPARATOR,this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?t.DEFAULT_FORMATTER:t.DEFAULT_LOWERCASE_FORMATTER)},t.prototype.createCondition=function(e){var t=this.getConditionTypes()[e],n={filterType:this.getFilterType(),type:t},r=this.getValues(e);return r.length>0&&(n.filter=r[0]),r.length>1&&(n.filterTo=r[1]),n},t.prototype.getFilterType=function(){return"text"},t.prototype.areSimpleModelsEqual=function(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type},t.prototype.getInputs=function(){return[[this.eValueFrom1,this.eValueTo1],[this.eValueFrom2,this.eValueTo2]]},t.prototype.getValues=function(e){var n=this,o=[];return this.forEachInput((function(i,a,s,l){if(e===s&&a<l){var c=r(i.getValue()),u=(n.textFilterParams.trimInput?t.trimInput(c):c)||null;o.push(u),i.setValue(u,!0)}})),o},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueTemplate=function(e){var t=e===lo.One?"1":"2";return'\n <div class="ag-filter-body" ref="eCondition'+t+'Body" role="presentation">\n <ag-input-text-field class=".ag-filter-from ag-filter-filter" ref="eValue-index0-'+t+'"></ag-input-text-field>\n <ag-input-text-field class="ag-filter-to ag-filter-filter" ref="eValue-index1-'+t+'"></ag-input-text-field>\n </div>'},t.prototype.mapValuesFromModel=function(e){var t=e||{},n=t.filter,r=t.filterTo,o=t.type;return[n||null,r||null].slice(0,this.getNumberOfInputs(o))},t.prototype.evaluateNullValue=function(e){return e===Uo.NOT_EQUAL||e===Uo.NOT_CONTAINS},t.prototype.evaluateNonNullValue=function(e,t,n){var r=this,o=Xr.map(e,(function(e){return r.formatter(e)}))||[],i=this.formatter(t);return Xr.some(o,(function(e){return r.comparator(n.type,i,e)}))},t.DEFAULT_FILTER_OPTIONS=[Uo.CONTAINS,Uo.NOT_CONTAINS,Uo.EQUALS,Uo.NOT_EQUAL,Uo.STARTS_WITH,Uo.ENDS_WITH],t.DEFAULT_FORMATTER=function(e){return e},t.DEFAULT_LOWERCASE_FORMATTER=function(e){return null==e?null:e.toString().toLowerCase()},t.DEFAULT_COMPARATOR=function(e,n,r){switch(e){case t.CONTAINS:return n.indexOf(r)>=0;case t.NOT_CONTAINS:return n.indexOf(r)<0;case t.EQUALS:return n===r;case t.NOT_EQUAL:return n!=r;case t.STARTS_WITH:return 0===n.indexOf(r);case t.ENDS_WITH:var o=n.lastIndexOf(r);return o>=0&&o===n.length-r.length;default:return!1}},pi([ao("eValue-index0-1")],t.prototype,"eValueFrom1",void 0),pi([ao("eValue-index1-1")],t.prototype,"eValueTo1",void 0),pi([ao("eValue-index0-2")],t.prototype,"eValueFrom2",void 0),pi([ao("eValue-index1-2")],t.prototype,"eValueTo2",void 0),t}(Uo),hi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fi=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},gi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hi(t,e),t.prototype.postConstruct=function(){this.setTemplate('\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eFloatingFilterInput"></ag-input-text-field>\n </div>')},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.onParentModelChanged=function(e,t){this.isEventFromFloatingFilter(t)||(this.setLastTypeFromModel(e),this.eFloatingFilterInput.setValue(this.getTextFromModel(e)),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)))},t.prototype.init=function(t){if(e.prototype.init.call(this,t),this.params=t,this.applyActive=Eo.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){var n=Eo.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),r=re(this.syncUpWithParentFilter.bind(this),n),o=this.eFloatingFilterInput.getGui();this.addManagedListener(o,"input",r),this.addManagedListener(o,"keypress",r),this.addManagedListener(o,"keydown",r)}var i=t.column.getDefinition();(this.isReadOnly()||i.filterParams&&i.filterParams.filterOptions&&1===i.filterParams.filterOptions.length&&"inRange"===i.filterParams.filterOptions[0])&&this.eFloatingFilterInput.setDisabled(!0);var a=this.columnModel.getDisplayNameForColumn(t.column,"header",!0),s=this.gridOptionsWrapper.getLocaleTextFunc();this.eFloatingFilterInput.setInputAriaLabel(a+" "+s("ariaFilterInput","Filter Input"))},t.prototype.syncUpWithParentFilter=function(e){var t=this,n=Ir(e,mo.ENTER);if(!this.applyActive||n){var r=this.eFloatingFilterInput.getValue();this.params.filterParams.trimInput&&(r=di.trimInput(r),this.eFloatingFilterInput.setValue(r,!0)),this.params.parentFilterInstance((function(e){e&&e.onFloatingFilterChanged(t.getLastType(),r||null)}))}},t.prototype.conditionToString=function(e,t){var n=(t||{}).numberOfInputs;return e.type==Uo.IN_RANGE||2===n?e.filter+"-"+e.filterTo:null!=e.filter?""+e.filter:""+e.type},t.prototype.setEditable=function(e){this.eFloatingFilterInput.setDisabled(!e)},fi([de("columnModel")],t.prototype,"columnModel",void 0),fi([ao("eFloatingFilterInput")],t.prototype,"eFloatingFilterInput",void 0),fi([ce],t.prototype,"postConstruct",null),t}(ei),vi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return vi(t,e),t.prototype.getDefaultFilterOptions=function(){return ci.DEFAULT_FILTER_OPTIONS},t}(gi),yi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yi(t,e),t.prototype.getDefaultFilterOptions=function(){return di.DEFAULT_FILTER_OPTIONS},t}(gi),wi=function(){function e(e,t){var n=this;void 0===t&&(t=!1),this.destroyFuncs=[],this.touching=!1,this.eventService=new we,this.eElement=e,this.preventMouseClick=t;var r=this.onTouchStart.bind(this),o=this.onTouchMove.bind(this),i=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",r,{passive:!0}),this.eElement.addEventListener("touchmove",o,{passive:!0}),this.eElement.addEventListener("touchend",i,{passive:!1}),this.destroyFuncs.push((function(){n.eElement.removeEventListener("touchstart",r,{passive:!0}),n.eElement.removeEventListener("touchmove",o,{passive:!0}),n.eElement.removeEventListener("touchend",i,{passive:!1})}))}return e.prototype.getActiveTouch=function(e){for(var t=0;t<e.length;t++){if(e[t].identifier===this.touchStart.identifier)return e[t]}return null},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.onTouchStart=function(t){var n=this;if(!this.touching){this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;var r=this.touchStart;window.setTimeout((function(){var o=n.touchStart===r;if(n.touching&&o&&!n.moved){n.moved=!0;var i={type:e.EVENT_LONG_TAP,touchStart:n.touchStart,touchEvent:t};n.eventService.dispatchEvent(i)}}),500)}},e.prototype.onTouchMove=function(e){if(this.touching){var t=this.getActiveTouch(e.touches);if(t)!Wr(t,this.touchStart,4)&&(this.moved=!0)}},e.prototype.onTouchEnd=function(t){if(this.touching){if(!this.moved){var n={type:e.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(n),this.checkForDoubleTap()}this.preventMouseClick&&t.preventDefault(),this.touching=!1}},e.prototype.checkForDoubleTap=function(){var t=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0)if(t-this.lastTapTime>e.DOUBLE_TAP_MILLIS){var n={type:e.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(n),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t},e.prototype.destroy=function(){this.destroyFuncs.forEach((function(e){return e()}))},e.EVENT_TAP="tap",e.EVENT_DOUBLE_TAP="doubleTap",e.EVENT_LONG_TAP="longTap",e.DOUBLE_TAP_MILLIS=500,e}(),Ci=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xi=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Si=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastMovingChanged=0,t}return Ci(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.refresh=function(e){return this.params=e,this.workOutTemplate()==this.currentTemplate&&(this.workOutShowMenu()==this.currentShowMenu&&(this.workOutSort()==this.currentSort&&(this.setDisplayName(e),!0)))},t.prototype.workOutTemplate=function(){var e=g(this.params.template,t.TEMPLATE);return e=e&&e.trim?e.trim():e},t.prototype.init=function(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setupIcons(e.column),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setDisplayName(e)},t.prototype.setDisplayName=function(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;var t=ot(this.currentDisplayName);this.eText&&(this.eText.innerHTML=t)}},t.prototype.setupIcons=function(e){this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("menu",this.eMenu,e),this.addInIcon("filter",this.eFilter,e)},t.prototype.addInIcon=function(e,t,n){if(null!=t){var r=Nr(e,this.gridOptionsWrapper,n);r&&t.appendChild(r)}},t.prototype.setupTap=function(){var e=this,t=this.gridOptionsWrapper;if(!t.isSuppressTouch()){var n=new wi(this.getGui(),!0),r=t.isSuppressMenuHide(),i=r&&o(this.eMenu),a=i?new wi(this.eMenu,!0):n;if(this.params.enableMenu){var s=i?"EVENT_TAP":"EVENT_LONG_TAP";this.addManagedListener(a,wi[s],(function(n){t.getApi().showColumnMenuAfterMouseClick(e.params.column,n.touchStart)}))}if(this.params.enableSorting){this.addManagedListener(n,wi.EVENT_TAP,(function(t){var n=t.touchStart.target;r&&e.eMenu.contains(n)||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")}))}this.addDestroyFunc((function(){return n.destroy()})),i&&this.addDestroyFunc((function(){return a.destroy()}))}},t.prototype.workOutShowMenu=function(){var e=!this.gridOptionsWrapper.isSuppressMenuHide(),t=Jt()&&e;return this.params.enableMenu&&!t},t.prototype.setMenu=function(){var e=this;if(this.eMenu)if(this.currentShowMenu=this.workOutShowMenu(),this.currentShowMenu){var t=this.gridOptionsWrapper.isSuppressMenuHide();this.addManagedListener(this.eMenu,"click",(function(){return e.showMenu(e.eMenu)})),dn(this.eMenu,"ag-header-menu-always-show",t)}else An(this.eMenu)},t.prototype.showMenu=function(e){e||(e=this.eMenu),this.menuFactory.showMenuAfterButtonClick(this.params.column,e,"columnMenu")},t.prototype.removeSortIcons=function(){An(this.eSortAsc),An(this.eSortDesc),An(this.eSortNone),An(this.eSortOrder)},t.prototype.workOutSort=function(){return this.params.enableSorting},t.prototype.setupSort=function(){var e=this;if(this.currentSort=this.params.enableSorting,this.currentSort){var t=this.gridOptionsWrapper.isMultiSortKeyCtrl();this.addManagedListener(this.params.column,_e.EVENT_MOVING_CHANGED,(function(){e.lastMovingChanged=(new Date).getTime()})),this.eLabel&&this.addManagedListener(this.eLabel,"click",(function(n){var r=e.params.column.isMoving(),o=(new Date).getTime()-e.lastMovingChanged<50;if(!(r||o)){var i=t?n.ctrlKey||n.metaKey:n.shiftKey;e.params.progressSort(i)}})),this.addManagedListener(this.params.column,_e.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.onSortChanged(),this.addManagedListener(this.eventService,Ke.EVENT_SORT_CHANGED,this.setMultiSortOrder.bind(this)),this.setMultiSortOrder()}else this.removeSortIcons()},t.prototype.onSortChanged=function(){if(dn(this.getGui(),"ag-header-cell-sorted-asc",this.params.column.isSortAscending()),dn(this.getGui(),"ag-header-cell-sorted-desc",this.params.column.isSortDescending()),dn(this.getGui(),"ag-header-cell-sorted-none",this.params.column.isSortNone()),this.eSortAsc&&dn(this.eSortAsc,"ag-hidden",!this.params.column.isSortAscending()),this.eSortDesc&&dn(this.eSortDesc,"ag-hidden",!this.params.column.isSortDescending()),this.eSortNone){var e=!this.params.column.getColDef().unSortIcon&&!this.gridOptionsWrapper.isUnSortIcon();dn(this.eSortNone,"ag-hidden",e||!this.params.column.isSortNone())}},t.prototype.setMultiSortOrder=function(){if(this.eSortOrder){var e=this.params.column,t=this.sortController.getColumnsWithSortingOrdered(),n=t.indexOf(e),r=t.length>1,o=e.isSorting()&&r;gn(this.eSortOrder,o),n>=0?this.eSortOrder.innerHTML=(n+1).toString():On(this.eSortOrder)}},t.prototype.setupFilterIcon=function(){this.eFilter&&(this.addManagedListener(this.params.column,_e.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())},t.prototype.onFilterChanged=function(){var e=this.params.column.isFilterActive();dn(this.eFilter,"ag-hidden",!e)},t.TEMPLATE='<div class="ag-cell-label-container" role="presentation">\n <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n <div ref="eLabel" class="ag-header-cell-label" role="presentation" unselectable="on">\n <span ref="eText" class="ag-header-cell-text" unselectable="on"></span>\n <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n <span ref="eSortOrder" class="ag-header-icon ag-header-label-icon ag-sort-order" aria-hidden="true"></span>\n <span ref="eSortAsc" class="ag-header-icon ag-header-label-icon ag-sort-ascending-icon" aria-hidden="true"></span>\n <span ref="eSortDesc" class="ag-header-icon ag-header-label-icon ag-sort-descending-icon" aria-hidden="true"></span>\n <span ref="eSortNone" class="ag-header-icon ag-header-label-icon ag-sort-none-icon" aria-hidden="true"></span>\n </div>\n </div>',xi([de("sortController")],t.prototype,"sortController",void 0),xi([de("menuFactory")],t.prototype,"menuFactory",void 0),xi([ao("eFilter")],t.prototype,"eFilter",void 0),xi([ao("eSortAsc")],t.prototype,"eSortAsc",void 0),xi([ao("eSortDesc")],t.prototype,"eSortDesc",void 0),xi([ao("eSortNone")],t.prototype,"eSortNone",void 0),xi([ao("eSortOrder")],t.prototype,"eSortOrder",void 0),xi([ao("eMenu")],t.prototype,"eMenu",void 0),xi([ao("eLabel")],t.prototype,"eLabel",void 0),xi([ao("eText")],t.prototype,"eText",void 0),t}(io),Ei=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_i=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ri=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Ei(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()},t.prototype.checkWarnings=function(){if(this.params.template){K((function(){return console.warn("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}),"HeaderGroupComp.templateNotSupported")}},t.prototype.setupExpandIcons=function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var t=function(t){if(!Me(t)){var n=!e.params.columnGroup.isExpanded();e.columnModel.setColumnGroupOpened(e.params.columnGroup.getOriginalColumnGroup(),n,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);var n=function(e){Ne(e)};this.addManagedListener(this.eCloseIcon,"dblclick",n),this.addManagedListener(this.eOpenIcon,"dblclick",n),this.addManagedListener(this.getGui(),"dblclick",t),this.updateIconVisibility();var r=this.params.columnGroup.getOriginalColumnGroup();this.addManagedListener(r,Ae.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(r,Ae.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))},t.prototype.addTouchAndClickListeners=function(e,t){var n=new wi(e,!0);this.addManagedListener(n,wi.EVENT_TAP,t),this.addDestroyFunc((function(){return n.destroy()})),this.addManagedListener(e,"click",t)},t.prototype.updateIconVisibility=function(){if(this.params.columnGroup.isExpandable()){var e=this.params.columnGroup.isExpanded();gn(this.eOpenIcon,e),gn(this.eCloseIcon,!e)}else gn(this.eOpenIcon,!1),gn(this.eCloseIcon,!1)},t.prototype.addInIcon=function(e,t){var n=Nr(e,this.gridOptionsWrapper,null);n&&this.getRefElement(t).appendChild(n)},t.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable())return gn(this.eOpenIcon,!1),void gn(this.eCloseIcon,!1)},t.prototype.setupLabel=function(){var e=this.params.displayName;if(o(e)){var t=ot(e);this.getRefElement("agLabel").innerHTML=t}},t.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">\n <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n </div>',_i([de("columnModel")],t.prototype,"columnModel",void 0),_i([ao("agOpened")],t.prototype,"eOpenIcon",void 0),_i([ao("agClosed")],t.prototype,"eCloseIcon",void 0),t}(io),Oi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ai=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oi(t,e),t.prototype.isPopup=function(){return!0},t.prototype.setParentComponent=function(t){un(t.getGui(),"ag-has-popup"),e.prototype.setParentComponent.call(this,t)},t.prototype.destroy=function(){var t=this.parentComponent;t&&t.isAlive()&&pn(t.getGui(),"ag-has-popup"),e.prototype.destroy.call(this)},t}(io),Pi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ti=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Di=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Pi(t,e),t.prototype.init=function(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),o(e.value)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this))},t.prototype.onKeyDown=function(e){var t=e.which||e.keyCode;(t===mo.LEFT||t===mo.UP||t===mo.RIGHT||t===mo.DOWN||e.shiftKey&&t===mo.ENTER)&&e.stopPropagation()},t.prototype.afterGuiAttached=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()},t.prototype.getValue=function(){return this.params.parseValue(this.eTextArea.getValue())},t.TEMPLATE='<div class="ag-large-text" tabindex="0">\n <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n </div>',Ti([ao("eTextArea")],t.prototype,"eTextArea",void 0),t}(Ai),ki=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ni=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Mi=function(e){function t(){var t=e.call(this,'<div class="ag-cell-edit-wrapper"><ag-select class="ag-cell-editor" ref="eSelect"></ag-select></div>')||this;return t.startedByEnter=!1,t}return ki(t,e),t.prototype.init=function(e){var t=this;if(this.focusAfterAttached=e.cellStartedEdit,i(e.values))console.warn("AG Grid: no values found for select cellEditor");else{this.startedByEnter=e.keyPress===mo.ENTER;var n=!1;e.values.forEach((function(r){var o={value:r},i=t.valueFormatterService.formatValue(e.column,null,null,r),a=null!==i&&void 0!==i;o.text=a?i:r,t.eSelect.addOption(o),n=n||e.value===r})),n?this.eSelect.setValue(e.value,!0):e.values.length&&this.eSelect.setValue(e.values[0],!0),this.gridOptionsWrapper.isFullRowEdit()||this.eSelect.onValueChange((function(){return e.stopEditing()}))}},t.prototype.afterGuiAttached=function(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&this.eSelect.showPicker()},t.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()},t.prototype.getValue=function(){return this.eSelect.getValue()},t.prototype.isPopup=function(){return!1},Ni([de("valueFormatterService")],t.prototype,"valueFormatterService",void 0),Ni([ao("eSelect")],t.prototype,"eSelect",void 0),t}(Ai),Ii=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ii(t,e),t.prototype.isPopup=function(){return!0},t}(Mi),Fi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gi=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Hi=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Fi(t,e),t.prototype.init=function(e){this.params=e;var t,n=this.eInput;e.cellStartedEdit?(this.focusAfterAttached=!0,e.keyPress===mo.BACKSPACE||e.keyPress===mo.DELETE?t="":e.charPress?t=e.charPress:(t=this.getStartValue(e),e.keyPress!==mo.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,t=this.getStartValue(e)),null!=t&&n.setValue(t,!0),this.addManagedListener(n.getGui(),"keydown",(function(e){var t=e.keyCode;t!==mo.PAGE_UP&&t!==mo.PAGE_DOWN||e.preventDefault()}))},t.prototype.afterGuiAttached=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=this.eInput;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached){$t()||t.getFocusableElement().focus();var n=t.getInputElement();if(this.highlightAllOnFocus)n.select();else{var r=t.getValue(),i=o(r)&&r.length||0;i&&n.setSelectionRange(i,i)}}},t.prototype.focusIn=function(){var e=this.eInput,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()},t.prototype.focusOut=function(){var e=this.eInput.getInputElement();qt()&&e.setSelectionRange(0,0)},t.prototype.getValue=function(){var e=this.eInput;return this.params.parseValue(e.getValue())},t.prototype.getStartValue=function(e){return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value},t.prototype.isPopup=function(){return!1},t.TEMPLATE='<div class="ag-cell-edit-wrapper"><ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field></div>',Gi([ao("eInput")],t.prototype,"eInput",void 0),t}(Ai),Wi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wi(t,e),t.prototype.isPopup=function(){return!0},t}(Hi),ji=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bi=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},zi=function(e){function t(){var n=e.call(this,t.TEMPLATE)||this;return n.refreshCount=0,n}return ji(t,e),t.prototype.init=function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)},t.prototype.showDelta=function(e,t){var n=Math.abs(t),r=e.formatValue(n),i=o(r)?r:n,a=t>=0;this.eDelta.innerHTML=a?"\u2191"+i:"\u2193"+i,dn(this.eDelta,"ag-value-change-delta-up",a),dn(this.eDelta,"ag-value-change-delta-down",!a)},t.prototype.setTimerToRemoveDelta=function(){var e=this;this.refreshCount++;var t=this.refreshCount;window.setTimeout((function(){t===e.refreshCount&&e.hideDeltaValue()}),2e3)},t.prototype.hideDeltaValue=function(){pn(this.eValue,"ag-value-change-value-highlight"),On(this.eDelta)},t.prototype.refresh=function(e){var t=e.value;if(t===this.lastValue)return!1;if(o(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:o(e.value)?this.eValue.innerHTML=t:On(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering())return!1;if("number"===typeof t&&"number"===typeof this.lastValue){var n=t-this.lastValue;this.showDelta(e,n)}return this.lastValue&&un(this.eValue,"ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=t,!0},t.TEMPLATE='<span><span class="ag-value-change-delta"></span><span class="ag-value-change-value"></span></span>',Bi([de("filterManager")],t.prototype,"filterManager",void 0),t}(io),Ui=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yi=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Xi=function(e){function t(){var n=e.call(this,t.TEMPLATE)||this;return n.refreshCount=0,n.eCurrent=n.queryForHtmlElement(".ag-value-slide-current"),n}return Ui(t,e),t.prototype.init=function(e){this.refresh(e)},t.prototype.addSlideAnimation=function(){var e=this;this.refreshCount++;var t=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=Tn('<span class="ag-value-slide-previous ag-value-slide-out"></span>'),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout((function(){t===e.refreshCount&&un(e.ePrevious,"ag-value-slide-out-end")}),50),window.setTimeout((function(){t===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)}),3e3)},t.prototype.refresh=function(e){var t=e.value;return i(t)&&(t=""),t!==this.lastValue&&(!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(this.addSlideAnimation(),this.lastValue=t,o(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:o(e.value)?this.eCurrent.innerHTML=t:On(this.eCurrent),!0))},t.TEMPLATE='<span>\n <span class="ag-value-slide-current"></span>\n </span>',Yi([de("filterManager")],t.prototype,"filterManager",void 0),t}(io);(zo=t.RowHighlightPosition||(t.RowHighlightPosition={}))[zo.Above=0]="Above",zo[zo.Below=1]="Below";var qi,Ki,$i,Qi=function(){function e(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.selected=!1,this.beans=t}return e.prototype.setData=function(e){this.setDataCommon(e,!1)},e.prototype.updateData=function(e){this.setDataCommon(e,!0)},e.prototype.setDataCommon=function(e,t){var n=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable();var r=this.createDataChangedEvent(e,n,t);this.dispatchLocalEvent(r)},e.prototype.updateDataOnDetailNode=function(){this.detailNode&&(this.detailNode.data=this.data)},e.prototype.createDataChangedEvent=function(t,n,r){return{type:e.EVENT_DATA_CHANGED,node:this,oldData:n,newData:t,update:r}},e.prototype.createLocalRowEvent=function(e){return{type:e,node:this}},e.prototype.getRowIndexString=function(){return this.rowPinned===Ce.PINNED_TOP?"t-"+this.rowIndex:this.rowPinned===Ce.PINNED_BOTTOM?"b-"+this.rowIndex:this.rowIndex.toString()},e.prototype.createDaemonNode=function(){var t=new e(this.beans);return t.id=this.id,t.data=this.data,t.daemon=!0,t.selected=this.selected,t.level=this.level,t},e.prototype.setDataAndId=function(e,t){var n=o(this.id)?this.createDaemonNode():null,r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.beans.selectionService.syncInRowNode(this,n),this.checkRowSelectable();var i=this.createDataChangedEvent(e,r,!1);this.dispatchLocalEvent(i)},e.prototype.checkRowSelectable=function(){var e=this.beans.gridOptionsWrapper.getIsRowSelectableFunc();this.setRowSelectable(!e||e(this))},e.prototype.setRowSelectable=function(t){this.selectable!==t&&(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_SELECTABLE_CHANGED)))},e.prototype.setId=function(t){var n=this.beans.gridOptionsWrapper.getRowNodeIdFunc();n?this.data?(this.id=n(this.data),this.id&&"string"===typeof this.id&&at(this.id,e.ID_PREFIX_ROW_GROUP)&&console.error("AG Grid: Row ID's cannot start with "+e.ID_PREFIX_ROW_GROUP+", this is a reserved prefix for AG Grid's row grouping feature."),this.id&&"string"!==typeof this.id&&(this.id=""+this.id)):this.id=void 0:this.id=t},e.prototype.isPixelInRange=function(e){return!(!o(this.rowTop)||!o(this.rowHeight))&&(e>=this.rowTop&&e<this.rowTop+this.rowHeight)},e.prototype.setFirstChild=function(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_FIRST_CHILD_CHANGED)))},e.prototype.setLastChild=function(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_LAST_CHILD_CHANGED)))},e.prototype.setChildIndex=function(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_CHILD_INDEX_CHANGED)))},e.prototype.setRowTop=function(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)),this.setDisplayed(null!==t))},e.prototype.clearRowTopAndRowIndex=function(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)},e.prototype.setDisplayed=function(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DISPLAYED_CHANGED)))},e.prototype.setDragging=function(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DRAGGING_CHANGED)))},e.prototype.setHighlighted=function(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HIGHLIGHT_CHANGED)))},e.prototype.setAllChildrenCount=function(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ALL_CHILDREN_COUNT_CHANGED)))},e.prototype.setMaster=function(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_MASTER_CHANGED)))},e.prototype.setRowHeight=function(t,n){void 0===n&&(n=!1),this.rowHeight=t,this.rowHeightEstimated=n,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HEIGHT_CHANGED))},e.prototype.setRowAutoHeight=function(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=re(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())},e.prototype.checkAutoHeights=function(){var e=!1,t=!0,n=0,r=this.__autoHeights;if(null!=r&&(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEach((function(o){var i=r[o.getId()];null!=i?(t=!1,i>n&&(n=i)):e=!0})),!e&&((t||n<10)&&(n=this.beans.gridOptionsWrapper.getRowHeightForNode(this).height),n!=this.rowHeight))){this.setRowHeight(n);var o=this.beans.rowModel;o.onRowHeightChanged&&o.onRowHeightChanged()}},e.prototype.setRowIndex=function(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED)))},e.prototype.setUiLevel=function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))},e.prototype.setExpanded=function(t){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));var n=V({},this.createGlobalRowEvent(Ke.EVENT_ROW_GROUP_OPENED),{expanded:t});this.beans.rowNodeEventThrottle.dispatchExpanded(n),this.beans.gridOptionsWrapper.isGroupIncludeFooter()&&this.beans.rowRenderer.refreshCells({rowNodes:[this]})}},e.prototype.createGlobalRowEvent=function(e){return{type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi()}},e.prototype.dispatchLocalEvent=function(e){this.eventService&&this.eventService.dispatchEvent(e)},e.prototype.setDataValue=function(e,t,n){var r=this.beans.columnModel.getPrimaryColumn(e),o=this.beans.valueService.getValue(r,this);this.beans.valueService.setValue(this,r,t,n),this.dispatchCellChangedEvent(r,t,o)},e.prototype.setGroupValue=function(e,t){var n=this.beans.columnModel.getGridColumn(e);i(this.groupData)&&(this.groupData={});var r=n.getColId(),o=this.groupData[r];o!==t&&(this.groupData[r]=t,this.dispatchCellChangedEvent(n,t,o))},e.prototype.setAggData=function(e){var t=this,n=G([this.aggData,e]),r=this.aggData;this.aggData=e,this.eventService&&n.forEach((function(e){var n=t.beans.columnModel.getGridColumn(e),o=t.aggData?t.aggData[e]:void 0,i=r?r[e]:void 0;t.dispatchCellChangedEvent(n,o,i)}))},e.prototype.updateHasChildren=function(){var t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HAS_CHILDREN_CHANGED)))},e.prototype.hasChildren=function(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren},e.prototype.isEmptyRowGroupNode=function(){return this.group&&a(this.childrenAfterGroup)},e.prototype.dispatchCellChangedEvent=function(t,n,r){var o={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:n,oldValue:r};this.dispatchLocalEvent(o)},e.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},e.prototype.isExpandable=function(){return!!(this.hasChildren()&&!this.footer||this.master)},e.prototype.isSelected=function(){return this.footer?this.sibling.isSelected():this.selected},e.prototype.depthFirstSearch=function(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach((function(t){return t.depthFirstSearch(e)})),e(this)},e.prototype.calculateSelectedFromChildren=function(){var e,t=!1,n=!1,r=!1;if(this.childrenAfterGroup)for(var o=0;o<this.childrenAfterGroup.length;o++){var i=this.childrenAfterGroup[o];if(i.selectable)switch(i.isSelected()){case!0:t=!0;break;case!1:n=!0;break;default:r=!0}}e=r?void 0:!(!t||n)||!(!t&&n)&&void 0,this.selectThisNode(e)},e.prototype.setSelectedInitialValue=function(e){this.selected=e},e.prototype.setSelected=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),this.setSelectedParams({newValue:e,clearSelection:t,suppressFinishActions:n,rangeSelect:!1})},e.prototype.isRowPinned=function(){return this.rowPinned===Ce.PINNED_TOP||this.rowPinned===Ce.PINNED_BOTTOM},e.prototype.setSelectedParams=function(e){var t=this.beans.gridOptionsWrapper.isGroupSelectsChildren(),n=!0===e.newValue,r=!0===e.clearSelection,o=!0===e.suppressFinishActions,i=!0===e.rangeSelect,a=t&&!0===e.groupSelectsFiltered;if(void 0===this.id)return console.warn("AG Grid: cannot select node until id for node is known"),0;if(this.rowPinned)return console.warn("AG Grid: cannot select pinned rows"),0;if(this.footer)return this.sibling.setSelectedParams(e);if(i&&this.beans.selectionService.getLastSelectedNode()){var s=this.beans.selectionService.getLastSelectedNode()!==this,l=this.beans.gridOptionsWrapper.isRowSelectionMulti();if(s&&l){var c=this.doRowRangeSelection(e.newValue);return this.beans.selectionService.setLastSelectedNode(this),c}}var u=0;a&&this.group||this.selectThisNode(n)&&u++;if(t&&this.group&&(u+=this.selectChildNodes(n,a)),!o){if(n&&(r||!this.beans.gridOptionsWrapper.isRowSelectionMulti())&&(u+=this.beans.selectionService.clearOtherNodes(this)),u>0){this.beans.selectionService.updateGroupsFromChildrenSelections();var p={type:Ke.EVENT_SELECTION_CHANGED,api:this.beans.gridApi,columnApi:this.beans.columnApi};this.beans.eventService.dispatchEvent(p)}n&&this.beans.selectionService.setLastSelectedNode(this)}return u},e.prototype.doRowRangeSelection=function(e){var t=this;void 0===e&&(e=!0);var n=this.beans.gridOptionsWrapper.isGroupSelectsChildren(),r=this.beans.selectionService.getLastSelectedNode(),o=this.beans.rowModel.getNodesInRangeForSelection(this,r),i=0;o.forEach((function(r){r.group&&n||!1===e&&t===r||r.selectThisNode(e)&&i++})),this.beans.selectionService.updateGroupsFromChildrenSelections();var a={type:Ke.EVENT_SELECTION_CHANGED,api:this.beans.gridApi,columnApi:this.beans.columnApi};return this.beans.eventService.dispatchEvent(a),i},e.prototype.isParentOfNode=function(e){for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1},e.prototype.selectThisNode=function(t){var n=!this.selectable&&t,r=this.selected===t;if(n||r)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));var o=this.createGlobalRowEvent(Ke.EVENT_ROW_SELECTED);return this.beans.eventService.dispatchEvent(o),!0},e.prototype.selectChildNodes=function(e,t){var n=t?this.childrenAfterFilter:this.childrenAfterGroup;if(i(n))return 0;for(var r=0,o=0;o<n.length;o++)r+=n[o].setSelectedParams({newValue:e,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:t});return r},e.prototype.addEventListener=function(e,t){this.eventService||(this.eventService=new we),this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService&&(this.eventService.removeEventListener(e,t),this.eventService.noRegisteredListenersExist()&&(this.eventService=null))},e.prototype.onMouseEnter=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_ENTER))},e.prototype.onMouseLeave=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_LEAVE))},e.prototype.getFirstChildOfFirstChild=function(e){for(var t=this,n=!0,r=!1,i=null;n&&!r;){var a=t.parent;o(a)&&t.firstChild?a.rowGroupColumn===e&&(r=!0,i=a):n=!1,t=a}return r?i:null},e.prototype.isFullWidthCell=function(){var e=this.beans.gridOptionsWrapper.getIsFullWidthCellFunc();return!!e&&e(this)},e.prototype.getRoute=function(){if(null!=this.key){for(var e=[],t=this;null!=t.key;)e.push(t.key),t=t.parent;return e.reverse()}},e.ID_PREFIX_ROW_GROUP="row-group-",e.ID_PREFIX_TOP_PINNED="t-",e.ID_PREFIX_BOTTOM_PINNED="b-",e.OBJECT_ID_SEQUENCE=0,e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_DATA_CHANGED="dataChanged",e.EVENT_CELL_CHANGED="cellChanged",e.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",e.EVENT_MASTER_CHANGED="masterChanged",e.EVENT_MOUSE_ENTER="mouseEnter",e.EVENT_MOUSE_LEAVE="mouseLeave",e.EVENT_HEIGHT_CHANGED="heightChanged",e.EVENT_TOP_CHANGED="topChanged",e.EVENT_DISPLAYED_CHANGED="displayedChanged",e.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",e.EVENT_LAST_CHILD_CHANGED="lastChildChanged",e.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",e.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged",e.EVENT_SELECTABLE_CHANGED="selectableChanged",e.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",e.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",e.EVENT_DRAGGING_CHANGED="draggingChanged",e}(),Zi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ji=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ea=function(e){function t(){return e.call(this,'\n <div class="ag-selection-checkbox" role="presentation">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>')||this}return Zi(t,e),t.prototype.postConstruct=function(){this.eCheckbox.setPassive(!0)},t.prototype.getCheckboxId=function(){return this.eCheckbox.getInputElement().id},t.prototype.onDataChanged=function(){this.onSelectionChanged()},t.prototype.onSelectableChanged=function(){this.showOrHideSelect()},t.prototype.onSelectionChanged=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=this.rowNode.isSelected(),n=void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),r=e("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(r+" ("+n+")")},t.prototype.onCheckedClicked=function(e){var t=this.gridOptionsWrapper.isGroupSelectsFiltered();return this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:t})},t.prototype.onUncheckedClicked=function(e){var t=this.gridOptionsWrapper.isGroupSelectsFiltered();return this.rowNode.setSelectedParams({newValue:!0,rangeSelect:e.shiftKey,groupSelectsFiltered:t})},t.prototype.init=function(e){var t=this;if(this.rowNode=e.rowNode,this.column=e.column,this.onSelectionChanged(),this.addGuiEventListener("click",(function(e){return Ne(e)})),this.addGuiEventListener("dblclick",(function(e){return Ne(e)})),this.addManagedListener(this.eCheckbox.getInputElement(),"click",(function(e){var n=t.eCheckbox.getValue();void 0===t.eCheckbox.getPreviousValue()?0===t.onUncheckedClicked(e||{})&&t.onCheckedClicked(e):n?t.onCheckedClicked(e):t.onUncheckedClicked(e||{})})),this.addManagedListener(this.rowNode,Qi.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gridOptionsWrapper.getIsRowSelectableFunc()||this.checkboxCallbackExists()){var n=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,n),this.addManagedListener(this.rowNode,Qi.EVENT_DATA_CHANGED,n),this.addManagedListener(this.rowNode,Qi.EVENT_CELL_CHANGED,n),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")},t.prototype.showOrHideSelect=function(){var e=this.rowNode.selectable;e&&this.checkboxCallbackExists()&&(e=this.column.isCellCheckboxSelection(this.rowNode)),this.setVisible(e)},t.prototype.checkboxCallbackExists=function(){var e=this.column?this.column.getColDef():null;return!!e&&"function"===typeof e.checkboxSelection},Ji([ao("eCheckbox")],t.prototype,"eCheckbox",void 0),Ji([ce],t.prototype,"postConstruct",null),t}(io),ta=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),na=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};(qi=t.DragSourceType||(t.DragSourceType={}))[qi.ToolPanel=0]="ToolPanel",qi[qi.HeaderCell=1]="HeaderCell",qi[qi.RowDrag=2]="RowDrag",qi[qi.ChartPanel=3]="ChartPanel",(Ki=t.VerticalDirection||(t.VerticalDirection={}))[Ki.Up=0]="Up",Ki[Ki.Down=1]="Down",($i=t.HorizontalDirection||(t.HorizontalDirection={}))[$i.Left=0]="Left",$i[$i.Right=1]="Right";var ra=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.dragSourceAndParamsList=[],t.dropTargets=[],t}var r;return ta(n,e),r=n,n.prototype.init=function(){this.ePinnedIcon=kr("columnMovePin",this.gridOptionsWrapper,null),this.eHideIcon=kr("columnMoveHide",this.gridOptionsWrapper,null),this.eMoveIcon=kr("columnMoveMove",this.gridOptionsWrapper,null),this.eLeftIcon=kr("columnMoveLeft",this.gridOptionsWrapper,null),this.eRightIcon=kr("columnMoveRight",this.gridOptionsWrapper,null),this.eGroupIcon=kr("columnMoveGroup",this.gridOptionsWrapper,null),this.eAggregateIcon=kr("columnMoveValue",this.gridOptionsWrapper,null),this.ePivotIcon=kr("columnMovePivot",this.gridOptionsWrapper,null),this.eDropNotAllowedIcon=kr("dropNotAllowed",this.gridOptionsWrapper,null)},n.prototype.addDragSource=function(e,t){void 0===t&&(t=!1);var n={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this)};this.dragSourceAndParamsList.push({params:n,dragSource:e}),this.dragService.addDragSource(n,t)},n.prototype.removeDragSource=function(e){var t=p(this.dragSourceAndParamsList,(function(t){return t.dragSource===e}));t&&(this.dragService.removeDragSource(t.params),b(this.dragSourceAndParamsList,t))},n.prototype.clearDragSourceParamsList=function(){var e=this;this.dragSourceAndParamsList.forEach((function(t){return e.dragService.removeDragSource(t.params)})),this.dragSourceAndParamsList.length=0},n.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},n.prototype.onDragStart=function(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()},n.prototype.onDragStop=function(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){var t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},n.prototype.onDragging=function(e,t){var n=this,r=this.getHorizontalDirection(e),o=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);var i=this.dropTargets.filter((function(t){return n.isMouseOnDropTarget(e,t)})),a=i.length,s=null;if(a>0&&(s=1===a?i[0]:i.reduce((function(e,t){if(!e)return t;var n=e.getContainer(),r=t.getContainer();return n.contains(r)?t:e}))),s!==this.lastDropTarget)this.leaveLastTargetIfExists(e,r,o,t),this.enterDragTargetIfExists(s,e,r,o,t),this.lastDropTarget=s;else if(s&&s.onDragging){var l=this.createDropTargetEvent(s,e,r,o,t);s.onDragging(l)}},n.prototype.enterDragTargetIfExists=function(e,t,n,r,o){if(e){if(e.onDragEnter){var i=this.createDropTargetEvent(e,t,n,r,o);e.onDragEnter(i)}this.setGhostIcon(e.getIconName?e.getIconName():null)}},n.prototype.leaveLastTargetIfExists=function(e,t,n,r){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){var o=this.createDropTargetEvent(this.lastDropTarget,e,t,n,r);this.lastDropTarget.onDragLeave(o)}this.setGhostIcon(null)}},n.prototype.getAllContainersFromDropTarget=function(e){var t=e.getSecondaryContainers?e.getSecondaryContainers():null,n=[[e.getContainer()]];return t?n.concat(t):n},n.prototype.allContainersIntersect=function(e,t){for(var n=0,r=t;n<r.length;n++){var o=r[n].getBoundingClientRect();if(0===o.width||0===o.height)return!1;var i=e.clientX>=o.left&&e.clientX<o.right,a=e.clientY>=o.top&&e.clientY<o.bottom;if(!i||!a)return!1}return!0},n.prototype.isMouseOnDropTarget=function(e,t){for(var n=!1,r=0,o=this.getAllContainersFromDropTarget(t);r<o.length;r++){var i=o[r];if(this.allContainersIntersect(e,i)){n=!0;break}}return n&&t.isInterestedIn(this.dragSource.type)},n.prototype.addDropTarget=function(e){this.dropTargets.push(e)},n.prototype.removeDropTarget=function(e){this.dropTargets=this.dropTargets.filter((function(t){return t.getContainer()!==e.getContainer()}))},n.prototype.hasExternalDropZones=function(){return this.dropTargets.some((function(e){return e.external}))},n.prototype.findExternalZone=function(e){return p(this.dropTargets.filter((function(e){return e.external})),(function(t){return t.getContainer()===e.getContainer()}))},n.prototype.getHorizontalDirection=function(e){var n=this.eventLastTime&&this.eventLastTime.clientX,r=e.clientX;return n===r?null:n>r?t.HorizontalDirection.Left:t.HorizontalDirection.Right},n.prototype.getVerticalDirection=function(e){var n=this.eventLastTime&&this.eventLastTime.clientY,r=e.clientY;return n===r?null:n>r?t.VerticalDirection.Up:t.VerticalDirection.Down},n.prototype.createDropTargetEvent=function(e,t,n,r,o){var i=e.getContainer(),a=i.getBoundingClientRect(),s=this,l=s.gridApi,c=s.columnApi,u=s.dragItem,p=s.dragSource;return{event:t,x:t.clientX-a.left,y:t.clientY-a.top,vDirection:r,hDirection:n,dragSource:p,fromNudge:o,dragItem:u,api:l,columnApi:c,dropZoneTarget:i}},n.prototype.positionGhost=function(e){var t=this.eGhost;if(t){var n=t.getBoundingClientRect().height,r=an()-2,o=sn()-2,i=e.pageY-n/2,a=e.pageX-10,s=this.gridOptionsWrapper.getDocument(),l=window.pageYOffset||s.documentElement.scrollTop,c=window.pageXOffset||s.documentElement.scrollLeft;r>0&&a+t.clientWidth>r+c&&(a=r+c-t.clientWidth),a<0&&(a=0),o>0&&i+t.clientHeight>o+l&&(i=o+l-t.clientHeight),i<0&&(i=0),t.style.left=a+"px",t.style.top=i+"px"}},n.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},n.prototype.createGhost=function(){this.eGhost=Tn(r.GHOST_TEMPLATE);var e=this.environment.getTheme().theme;e&&un(this.eGhost,e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);var t=this.eGhost.querySelector(".ag-dnd-ghost-label"),n=this.dragSource.dragItemName;Q(n)&&(n=n()),t.innerHTML=ot(n)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var o=this.gridOptionsWrapper.getDocument(),i=o.fullscreenElement||o.querySelector("body");this.eGhostParent=i,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")},n.prototype.setGhostIcon=function(e,t){void 0===t&&(t=!1),On(this.eGhostIcon);var n=null;switch(e||(e=this.dragSource.defaultIconName||r.ICON_NOT_ALLOWED),e){case r.ICON_PINNED:n=this.ePinnedIcon;break;case r.ICON_MOVE:n=this.eMoveIcon;break;case r.ICON_LEFT:n=this.eLeftIcon;break;case r.ICON_RIGHT:n=this.eRightIcon;break;case r.ICON_GROUP:n=this.eGroupIcon;break;case r.ICON_AGGREGATE:n=this.eAggregateIcon;break;case r.ICON_PIVOT:n=this.ePivotIcon;break;case r.ICON_NOT_ALLOWED:n=this.eDropNotAllowedIcon;break;case r.ICON_HIDE:n=this.eHideIcon}dn(this.eGhostIcon,"ag-shake-left-to-right",t),n===this.eHideIcon&&this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns()||n&&this.eGhostIcon.appendChild(n)},n.ICON_PINNED="pinned",n.ICON_MOVE="move",n.ICON_LEFT="left",n.ICON_RIGHT="right",n.ICON_GROUP="group",n.ICON_AGGREGATE="aggregate",n.ICON_PIVOT="pivot",n.ICON_NOT_ALLOWED="notAllowed",n.ICON_HIDE="hide",n.GHOST_TEMPLATE='<div class="ag-dnd-ghost ag-unselectable">\n <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n <div class="ag-dnd-ghost-label"></div>\n </div>',na([de("dragService")],n.prototype,"dragService",void 0),na([de("environment")],n.prototype,"environment",void 0),na([de("columnApi")],n.prototype,"columnApi",void 0),na([de("gridApi")],n.prototype,"gridApi",void 0),na([ce],n.prototype,"init",null),na([ue],n.prototype,"clearDragSourceParamsList",null),n=r=na([pe("dragAndDropService")],n)}(ze),oa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ia=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},aa=function(e){function n(t,n,r,o,i,a){var s=e.call(this)||this;return s.cellValueFn=t,s.rowNode=n,s.column=r,s.customGui=o,s.dragStartPixels=i,s.suppressVisibilityChange=a,s.dragSource=null,s}return oa(n,e),n.prototype.isCustomGui=function(){return null!=this.customGui},n.prototype.postConstruct=function(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(Nr("rowDrag",this.beans.gridOptionsWrapper,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){var e=this.beans.gridOptionsWrapper.isRowDragManaged()?new ca(this,this.beans,this.rowNode,this.column):new la(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}},n.prototype.setDragElement=function(e,t){this.setTemplateFromElement(e),this.addDragSource(t)},n.prototype.getSelectedCount=function(){if(!this.beans.gridOptionsWrapper.isRowDragMultiRow())return 1;var e=this.beans.selectionService.getSelectedNodes();return-1!==e.indexOf(this.rowNode)?e.length:1},n.prototype.checkCompatibility=function(){var e=this.beans.gridOptionsWrapper.isRowDragManaged();this.beans.gridOptionsWrapper.isTreeData()&&e&&K((function(){return console.warn("AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true")}),"RowDragComp.managedAndTreeData")},n.prototype.addDragSource=function(e){var n=this;void 0===e&&(e=4),this.dragSource&&this.removeDragSource();var r={rowNode:this.rowNode,columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()},o=this.column&&this.column.getColDef().rowDragText;this.dragSource={type:t.DragSourceType.RowDrag,eElement:this.getGui(),dragItemName:function(){var e=n.getSelectedCount();return o?o(r,e):1===e?n.cellValueFn():e+" rows"},getDragItem:function(){return r},dragStartPixels:e,dragSourceDomDataKey:this.beans.gridOptionsWrapper.getDomDataKey()},this.addMouseDownListenerIfNeeded(),this.beans.dragAndDropService.addDragSource(this.dragSource,!0)},n.prototype.addMouseDownListenerIfNeeded=function(){var e=this;!this.customGui&&this.column&&this.gridOptionsWrapper.isEnableCellTextSelect()&&this.addManagedListener(this.getGui(),"mousedown",(function(t){t.preventDefault(),e.beans.focusService.setFocusedCell(e.rowNode.rowIndex,e.column,e.rowNode.rowPinned,!0)}))},n.prototype.removeDragSource=function(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null},ia([de("beans")],n.prototype,"beans",void 0),ia([ce],n.prototype,"postConstruct",null),ia([ue],n.prototype,"removeDragSource",null),n}(io),sa=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.rowNode=n,o.column=r,o}return oa(t,e),t.prototype.setDisplayedOrVisible=function(e){if(e)this.parent.setDisplayed(!1);else{var t=!0,n=!1;this.column&&(t=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),n=Q(this.column.getColDef().rowDrag)),n?(this.parent.setDisplayed(!0),this.parent.setVisible(t)):(this.parent.setDisplayed(t),this.parent.setVisible(!0))}},t}(ze),la=function(e){function t(t,n,r,o){var i=e.call(this,t,r,o)||this;return i.beans=n,i}return oa(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.beans.gridOptionsWrapper.isSuppressRowDrag();this.setDisplayedOrVisible(e)},ia([ce],t.prototype,"postConstruct",null),t}(sa),ca=function(e){function t(t,n,r,o){var i=e.call(this,t,r,o)||this;return i.beans=n,i}return oa(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.beans.eventService,Ke.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Ke.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),t=e&&e.shouldPreventRowMove(),n=this.beans.gridOptionsWrapper.isSuppressRowDrag(),r=this.beans.dragAndDropService.hasExternalDropZones(),o=t&&!r||n;this.setDisplayedOrVisible(o)},ia([ce],t.prototype,"postConstruct",null),t}(sa),ua=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pa=function(){return pa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pa.apply(this,arguments)},da=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ha=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ua(t,e),t.prototype.init=function(e,t,n,r,o,i,a){this.params=a,this.eGui=t,this.eCheckbox=n,this.eExpanded=r,this.eContracted=o,this.comp=e,this.compClass=i;var s=this.isTopLevelFooter(),l=this.isEmbeddedRowMismatch(),c=null==a.value,u=!1;if(this.gridOptionsWrapper.isGroupIncludeFooter()&&this.gridOptionsWrapper.isGroupHideOpenParents()){var p=a.node;if(p.footer)u=(a.colDef&&a.colDef.showRowGroup)!==(p.rowGroupColumn&&p.rowGroupColumn.getColId())}this.cellIsBlank=!s&&(l||c||u),this.cellIsBlank||(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),this.addFullWidthRowDraggerIfNeeded(),this.addExpandAndContract(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent())},t.prototype.isTopLevelFooter=function(){if(!this.gridOptionsWrapper.isGroupIncludeTotalFooter())return!1;if(null!=this.params.value||-1!=this.params.node.level)return!1;var e=this.params.colDef;if(null==e)return!0;if(!0===e.showRowGroup)return!0;var t=this.columnModel.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup},t.prototype.isEmbeddedRowMismatch=function(){if(!this.params.fullWidth||!this.gridOptionsWrapper.isEmbedFullWidthRows())return!1;var e=this.params.pinned===Ce.PINNED_LEFT,t=this.params.pinned===Ce.PINNED_RIGHT,n=!e&&!t;return this.gridOptionsWrapper.isEnableRtl()?this.columnModel.isPinningLeft()?!t:!n:this.columnModel.isPinningLeft()?!e:!n},t.prototype.findDisplayedGroupNode=function(){var e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent)for(var n=t.parent;null!=n;){if(n.rowGroupColumn&&e.isRowGroupDisplayed(n.rowGroupColumn.getId())){this.displayedGroupNode=n;break}n=n.parent}i(this.displayedGroupNode)&&(this.displayedGroupNode=t)},t.prototype.setupShowingValueForOpenedParent=function(){var e=this.params.node,t=this.params.column;if(this.gridOptionsWrapper.isGroupHideOpenParents())if(e.groupData){if(null!=e.rowGroupColumn){var n=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(n))return void(this.showingValueForOpenedParent=!1)}var r=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=r}else this.showingValueForOpenedParent=!1;else this.showingValueForOpenedParent=!1},t.prototype.addValueElement=function(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())},t.prototype.addGroupValue=function(){var e=this.adjustParamsWithDetailsFromRelatedColumn(),t=this.getInnerCompDetails(e),n=e.valueFormatted,r=e.value,o=null!=n?n:r;this.comp.setInnerRenderer(t,o)},t.prototype.adjustParamsWithDetailsFromRelatedColumn=function(){var e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;var n=this.params,r=this.params,o=r.value,i=r.scope,a=r.node,s=this.valueFormatterService.formatValue(e,a,i,o);return pa(pa({},n),{valueFormatted:s})},t.prototype.addFooterValue=function(){var e=this.params.footerValueGetter,t="";if(e){var n=N(this.params);n.value=this.params.value,"function"===typeof e?t=e(n):"string"===typeof e?t=this.expressionService.evaluate(e,n):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t="Total "+(null!=this.params.value?this.params.value:"");var r=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(r,t)},t.prototype.getInnerCompDetails=function(e){var t=this;if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptions.groupRowRendererParams,e);var n=this.userComponentFactory.getInnerRendererDetails(e,e),r=function(e){return e&&e.componentClass==t.compClass};if(n&&!r(n))return n;var o=this.displayedGroupNode.rowGroupColumn,i=o?o.getColDef():void 0;if(i){var a=this.userComponentFactory.getCellRendererDetails(i,e);if(a&&!r(a))return a;if(r(a)&&i.cellRendererParams&&i.cellRendererParams.innerRenderer)return this.userComponentFactory.getInnerRendererDetails(i.cellRendererParams,e)}},t.prototype.addChildCount=function(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,Qi.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())},t.prototype.updateChildCount=function(){var e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?"("+e+")":"";this.comp.setChildCount(t)},t.prototype.isShowRowGroupForThisRow=function(){if(this.gridOptionsWrapper.isTreeData())return!0;var e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;var t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())},t.prototype.addExpandAndContract=function(){var e=this.params,t=Nr("groupExpanded",this.gridOptionsWrapper,null),n=Nr("groupContracted",this.gridOptionsWrapper,null);t&&this.eExpanded.appendChild(t),n&&this.eContracted.appendChild(n);var r=e.eGridCell;this.gridOptionsWrapper.isEnableGroupEdit()||!this.isExpandable()||e.suppressDoubleClickExpand||this.addManagedListener(r,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(r,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(e.node,Qi.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();var o=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,Qi.EVENT_ALL_CHILDREN_COUNT_CHANGED,o),this.addManagedListener(this.displayedGroupNode,Qi.EVENT_MASTER_CHANGED,o),this.addManagedListener(this.displayedGroupNode,Qi.EVENT_HAS_CHILDREN_CHANGED,o)},t.prototype.onExpandClicked=function(e){Me(e)||(Ne(e),this.onExpandOrContract())},t.prototype.onExpandOrContract=function(){var e=this.displayedGroupNode,t=!e.expanded;e.setExpanded(t)},t.prototype.isExpandable=function(){if(this.showingValueForOpenedParent)return!0;var e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;var n=this.params.column;return null==n||"string"!==typeof n.getColDef().showRowGroup||this.isShowRowGroupForThisRow()},t.prototype.showExpandAndContractIcons=function(){var e=this,t=e.params,n=e.displayedGroupNode,r=e.columnModel,o=t.node,i=this.isExpandable();if(i){var a=!!this.showingValueForOpenedParent||o.expanded;this.comp.setExpandedDisplayed(a),this.comp.setContractedDisplayed(!a)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);var s=r.isPivotMode(),l=s&&n.leafGroup,c=i&&!l,u=o.footer&&-1===o.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",c),this.comp.addOrRemoveCssClass("ag-row-group",c),s?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",l):u||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!c)},t.prototype.onRowNodeIsExpandableChanged=function(){this.showExpandAndContractIcons(),this.setIndent()},t.prototype.setupIndent=function(){var e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,Qi.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())},t.prototype.setIndent=function(){if(!this.gridOptionsWrapper.isGroupHideOpenParents()){var e=this.params,t=e.node,n=!!e.colDef,r=this.gridOptionsWrapper.isTreeData(),o=!n||r||!0===e.colDef.showRowGroup?t.uiLevel:0;e.padding>=0&&K((function(){return console.warn("AG Grid: cellRendererParams.padding no longer works, it was deprecated in since v14.2 and removed in v26, configuring padding for groupCellRenderer should be done with Sass variables and themes. Please see the AG Grid documentation page for Themes, in particular the property $row-group-indent-size.")}),"groupCellRenderer->doDeprecatedWay"),this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+o,this.comp.addOrRemoveCssClass(this.indentClass,!0)}},t.prototype.addFullWidthRowDraggerIfNeeded=function(){var e=this;if(this.params.fullWidth&&this.params.rowDrag){var t=new aa((function(){return e.params.value}),this.params.node);this.createManagedBean(t,this.context),this.eGui.insertAdjacentElement("afterbegin",t.getGui())}},t.prototype.isUserWantsSelected=function(){var e=this.params.checkbox;return"function"===typeof e?e(this.params):!0===e},t.prototype.addCheckboxIfNeeded=function(){var e=this,t=this.displayedGroupNode,n=this.isUserWantsSelected()&&!t.footer&&!t.rowPinned&&!t.detail;if(n){var r=new ea;this.getContext().createBean(r),r.init({rowNode:t,column:this.params.column}),this.eCheckbox.appendChild(r.getGui()),this.addDestroyFunc((function(){return e.getContext().destroyBean(r)}))}this.comp.setCheckboxVisible(n)},t.prototype.onKeyDown=function(e){Ir(e,mo.ENTER)&&!this.params.suppressEnterExpand&&(this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract())},t.prototype.onCellDblClicked=function(e){Me(e)||(Ge(this.eExpanded,e)||Ge(this.eContracted,e)||this.onExpandOrContract())},da([de("expressionService")],t.prototype,"expressionService",void 0),da([de("valueFormatterService")],t.prototype,"valueFormatterService",void 0),da([de("columnModel")],t.prototype,"columnModel",void 0),da([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),da([de("gridOptions")],t.prototype,"gridOptions",void 0),t}(ze),fa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ga=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},va=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return fa(t,e),t.prototype.init=function(e){var t=this,n={setInnerRenderer:function(e,n){return t.setRenderDetails(e,n)},setChildCount:function(e){return t.eChildCount.innerHTML=e},addOrRemoveCssClass:function(e,n){return t.addOrRemoveCssClass(e,n)},setContractedDisplayed:function(e){return gn(t.eContracted,e)},setExpandedDisplayed:function(e){return gn(t.eExpanded,e)},setCheckboxVisible:function(e){return dn(t.eCheckbox,"ag-invisible",!e)}},r=this.createManagedBean(new ha),o=!e.colDef,i=this.getGui();r.init(n,i,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),o&&tr(i,"gridcell")},t.prototype.setRenderDetails=function(e,t){var n=this;if(e){var r=e.newAgStackInstance();if(!r)return;r.then((function(e){if(e){var t=function(){return n.context.destroyBean(e)};n.isAlive()?(n.eValue.appendChild(e.getGui()),n.addDestroyFunc(t)):t()}}))}else this.eValue.innerText=t},t.prototype.destroy=function(){this.getContext().destroyBean(this.innerCellRenderer),e.prototype.destroy.call(this)},t.prototype.refresh=function(){return!1},t.TEMPLATE='<span class="ag-cell-wrapper">\n <span class="ag-group-expanded" ref="eExpanded"></span>\n <span class="ag-group-contracted" ref="eContracted"></span>\n <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>\n <span class="ag-group-value" ref="eValue"></span>\n <span class="ag-group-child-count" ref="eChildCount"></span>\n </span>',ga([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ga([ao("eExpanded")],t.prototype,"eExpanded",void 0),ga([ao("eContracted")],t.prototype,"eContracted",void 0),ga([ao("eCheckbox")],t.prototype,"eCheckbox",void 0),ga([ao("eValue")],t.prototype,"eValue",void 0),ga([ao("eChildCount")],t.prototype,"eChildCount",void 0),t}(io),ma=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ya=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ba=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return ma(t,e),t.prototype.init=function(e){e.node.failedLoad?this.setupFailed():this.setupLoading()},t.prototype.setupFailed=function(){this.eLoadingText.innerText="ERR"},t.prototype.setupLoading=function(){var e=Nr("groupLoading",this.gridOptionsWrapper,null);e&&this.eLoadingIcon.appendChild(e);var t=this.gridOptionsWrapper.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")},t.prototype.refresh=function(e){return!1},t.TEMPLATE='<div class="ag-loading">\n <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n <span class="ag-loading-text" ref="eLoadingText"></span>\n </div>',ya([ao("eLoadingIcon")],t.prototype,"eLoadingIcon",void 0),ya([ao("eLoadingText")],t.prototype,"eLoadingText",void 0),t}(io),wa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ca=function(e){function t(){return e.call(this)||this}return wa(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var n=this.gridOptionsWrapper.getOverlayLoadingTemplate()?this.gridOptionsWrapper.getOverlayLoadingTemplate():t.DEFAULT_LOADING_OVERLAY_TEMPLATE,r=this.gridOptionsWrapper.getLocaleTextFunc(),o=n.replace("[LOADING...]",r("loadingOoo","Loading..."));this.setTemplate(o)},t.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span class="ag-overlay-loading-center">[LOADING...]</span>',t}(io),xa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sa=function(e){function t(){return e.call(this)||this}return xa(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var n=this.gridOptionsWrapper.getOverlayNoRowsTemplate()?this.gridOptionsWrapper.getOverlayNoRowsTemplate():t.DEFAULT_NO_ROWS_TEMPLATE,r=this.gridOptionsWrapper.getLocaleTextFunc(),o=n.replace("[NO_ROWS_TO_SHOW]",r("noRowsToShow","No Rows To Show"));this.setTemplate(o)},t.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>',t}(io),Ea=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_a=function(e){function t(){return e.call(this,'<div class="ag-tooltip"></div>')||this}return Ea(t,e),t.prototype.init=function(e){var t=e.value;this.getGui().innerHTML=ot(t)},t}(Ai),Ra=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oa=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.agGridDefaults={agDateInput:ai,agColumnHeader:Si,agColumnGroupHeader:Ri,agTextColumnFloatingFilter:bi,agNumberColumnFloatingFilter:mi,agDateColumnFloatingFilter:ri,agReadOnlyFloatingFilter:po,agAnimateShowChangeCellRenderer:zi,agAnimateSlideCellRenderer:Xi,agGroupCellRenderer:va,agGroupRowRenderer:va,agLoadingCellRenderer:ba,agCellEditor:Hi,agTextCellEditor:Hi,agSelectCellEditor:Mi,agPopupTextCellEditor:Vi,agPopupSelectCellEditor:Li,agLargeTextCellEditor:Di,agTextColumnFilter:di,agNumberColumnFilter:ci,agDateColumnFilter:Zo,agLoadingOverlay:Ca,agNoRowsOverlay:Sa,agTooltipComponent:_a},t.agDeprecatedNames={set:{newComponentName:"agSetColumnFilter",propertyHolder:"filter"},text:{newComponentName:"agTextColumnFilter",propertyHolder:"filter"},number:{newComponentName:"agNumberColumnFilter",propertyHolder:"filter"},date:{newComponentName:"agDateColumnFilter",propertyHolder:"filter"},group:{newComponentName:"agGroupCellRenderer",propertyHolder:"cellRenderer"},animateShowChange:{newComponentName:"agAnimateShowChangeCellRenderer",propertyHolder:"cellRenderer"},animateSlide:{newComponentName:"agAnimateSlideCellRenderer",propertyHolder:"cellRenderer"},select:{newComponentName:"agSelectCellEditor",propertyHolder:"cellEditor"},largeText:{newComponentName:"agLargeTextCellEditor",propertyHolder:"cellEditor"},popupSelect:{newComponentName:"agPopupSelectCellEditor",propertyHolder:"cellEditor"},popupText:{newComponentName:"agPopupTextCellEditor",propertyHolder:"cellEditor"},richSelect:{newComponentName:"agRichSelectCellEditor",propertyHolder:"cellEditor"},headerComponent:{newComponentName:"agColumnHeader",propertyHolder:"headerComponent"}},t.jsComponents={},t.frameworkComponents={},t}return Ra(t,e),t.prototype.init=function(){var e=this;null!=this.gridOptions.components&&k(this.gridOptions.components,(function(t,n){return e.registerComponent(t,n)})),null!=this.gridOptions.frameworkComponents&&k(this.gridOptions.frameworkComponents,(function(t,n){return e.registerFwComponent(t,n)}))},t.prototype.registerDefaultComponent=function(e,t){var n=this.translateIfDeprecated(e);this.agGridDefaults[n]?console.error("Trying to overwrite a default component. You should call registerComponent"):this.agGridDefaults[n]=t},t.prototype.registerComponent=function(e,t){var n=this.translateIfDeprecated(e);this.frameworkComponents[n]?console.error("Trying to register a component that you have already registered for frameworks: "+n):this.jsComponents[n]=t},t.prototype.registerFwComponent=function(e,t){var n=this.translateIfDeprecated(e);this.jsComponents[n]?console.error("Trying to register a component that you have already registered for plain javascript: "+n):this.frameworkComponents[n]=t},t.prototype.retrieve=function(e){var t=this.translateIfDeprecated(e),n=this.frameworkComponents[t]||this.getFrameworkOverrides().frameworkComponent(t);if(n)return{componentFromFramework:!0,component:n};var r=this.jsComponents[t];if(r)return{componentFromFramework:!1,component:r};var o=this.agGridDefaults[t];return o?{componentFromFramework:!1,component:o}:(Object.keys(this.agGridDefaults).indexOf(t)<0&&console.warn("AG Grid: Looking for component ["+t+"] but it wasn't found."),null)},t.prototype.translateIfDeprecated=function(e){var t=this.agDeprecatedNames[e];return null!=t?(K((function(){console.warn("ag-grid. Since v15.0 component names have been renamed to be namespaced. You should rename "+t.propertyHolder+":"+e+" to "+t.propertyHolder+":"+t.newComponentName)}),"DEPRECATE_COMPONENT_"+e),t.newComponentName):e},Oa([de("gridOptions")],t.prototype,"gridOptions",void 0),Oa([ce],t.prototype,"init",null),t=Oa([pe("userComponentRegistry")],t)}(ze),Pa={propertyName:"dateComponent",isCellRenderer:function(){return!1}},Ta={propertyName:"headerComponent",isCellRenderer:function(){return!1}},Da={propertyName:"headerGroupComponent",isCellRenderer:function(){return!1}},ka={propertyName:"cellRenderer",isCellRenderer:function(){return!0}},Na={propertyName:"cellEditor",isCellRenderer:function(){return!1}},Ma={propertyName:"innerRenderer",isCellRenderer:function(){return!0}},Ia={propertyName:"loadingOverlayComponent",isCellRenderer:function(){return!1}},La={propertyName:"noRowsOverlayComponent",isCellRenderer:function(){return!1}},Fa={propertyName:"tooltipComponent",isCellRenderer:function(){return!1}},Ga={propertyName:"filter",isCellRenderer:function(){return!1}},Ha={propertyName:"floatingFilterComponent",isCellRenderer:function(){return!1}},Wa={propertyName:"toolPanel",isCellRenderer:function(){return!1}},Va={propertyName:"statusPanel",isCellRenderer:function(){return!1}},ja=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ba=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ja(t,e),t.prototype.getHeaderCompDetails=function(e,t){return this.getCompDetails(e,Ta,"agColumnHeader",t)},t.prototype.getHeaderGroupCompDetails=function(e){var t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,Da,"agColumnGroupHeader",e)},t.prototype.getFullWidthCellRendererDetails=function(e,t,n){return this.getCompDetails(this.gridOptions,{propertyName:t,isCellRenderer:function(){return!0}},n,e)},t.prototype.getInnerRendererDetails=function(e,t){return this.getCompDetails(e,Ma,null,t)},t.prototype.getFullWidthGroupRowInnerCellRenderer=function(e,t){return this.getCompDetails(e,Ma,null,t)},t.prototype.getCellRendererDetails=function(e,t){return this.getCompDetails(e,ka,null,t)},t.prototype.getCellEditorDetails=function(e,t){return this.getCompDetails(e,Na,"agCellEditor",t,!0)},t.prototype.getFilterDetails=function(e,t,n){return this.getCompDetails(e,Ga,n,t,!0)},t.prototype.getDateCompDetails=function(e){return this.getCompDetails(this.gridOptions,Pa,"agDateInput",e,!0)},t.prototype.getLoadingOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Ia,"agLoadingOverlay",e,!0)},t.prototype.getNoRowsOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,La,"agNoRowsOverlay",e,!0)},t.prototype.getTooltipCompDetails=function(e){return this.getCompDetails(e.colDef,Fa,"agTooltipComponent",e,!0)},t.prototype.getSetFilterCellRendererDetails=function(e,t){return this.getCompDetails(e,ka,null,t)},t.prototype.getFloatingFilterCompDetails=function(e,t,n){return this.getCompDetails(e,Ha,n,t)},t.prototype.getToolPanelCompDetails=function(e,t){return this.getCompDetails(e,Wa,null,t,!0)},t.prototype.getStatusPanelCompDetails=function(e,t){return this.getCompDetails(e,Va,null,t,!0)},t.prototype.getCompDetails=function(e,t,n,r,o){var i=this;void 0===o&&(o=!1);var a,s,l,c=t.propertyName;if(e){var u=e,p=u[c+"Selector"],d=p?p(r):null;d?(a=d.component,s=d.frameworkComponent,l=d.params):(a=u[c],s=u[c+"Framework"]),!0===a&&(a=void 0)}var h=function(e){var t=i.userComponentRegistry.retrieve(e);t?(a=t.componentFromFramework?void 0:t.component,s=t.componentFromFramework?t.component:void 0):(a=void 0,s=void 0)};if("string"===typeof a&&h(a),null==a&&null==s&&null!=n&&h(n),a&&!this.agComponentUtils.doesImplementIComponent(a)&&(a=this.agComponentUtils.adaptFunction(c,a)),a||s){var f=this.mergeParamsWithApplicationProvidedParams(e,c,r,l),g=null==a,v=a||s;return{componentFromFramework:g,componentClass:v,params:f,type:t,newAgStackInstance:function(e){return i.newAgStackInstance(v,g,f,t,e)}}}if(o){var m=e?e[c]:n,y=m||n;console.error("Could not find component "+y+", did you forget to configure this component?")}},t.prototype.newAgStackInstance=function(e,t,n,r,o){var i,a=r.propertyName;if(!t)i=new e;else{var s=this.componentMetadataProvider.retrieve(a);i=this.frameworkComponentWrapper.wrap(e,s.mandatoryMethodList,s.optionalMethodList,r,o)}var l=this.initComponent(i,n);return null==l?$r.resolve(i):l.then((function(){return i}))},t.prototype.mergeParamsWithApplicationProvidedParams=function(e,t,n,r){void 0===r&&(r=null);var o={};W(o,n);var i=e?e[t+"Params"]:null;null!=i&&("function"===typeof i?W(o,i(n)):"object"===typeof i&&W(o,i));return W(o,r),o},t.prototype.initComponent=function(e,t){if(this.context.createBean(e),null!=e.init)return e.init(t)},Ba([de("gridOptions")],t.prototype,"gridOptions",void 0),Ba([de("agComponentUtils")],t.prototype,"agComponentUtils",void 0),Ba([de("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),Ba([de("userComponentRegistry")],t.prototype,"userComponentRegistry",void 0),Ba([he("frameworkComponentWrapper")],t.prototype,"frameworkComponentWrapper",void 0),t=Ba([pe("userComponentFactory")],t)}(ze),Ua=function(){function e(){}return e.parse=function(t){if(!t)return null;if(!0===t)return{toolPanels:[e.DEFAULT_COLUMN_COMP,e.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if("string"===typeof t)return e.parse([t]);if(Array.isArray(t)){var n=[];return t.forEach((function(t){var r=e.DEFAULT_BY_KEY[t];r?n.push(r):console.warn("ag-grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","))})),0===n.length?null:{toolPanels:n,defaultToolPanel:n[0].id}}return{toolPanels:e.parseComponents(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}},e.parseComponents=function(t){var n=[];return t?(t.forEach((function(t){var r=null;if("string"===typeof t){var o=e.DEFAULT_BY_KEY[t];if(!o)return void console.warn("ag-grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","));r=o}else r=t;n.push(r)})),n):n},e.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},e.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},e.DEFAULT_BY_KEY={columns:e.DEFAULT_COLUMN_COMP,filters:e.DEFAULT_FILTER_COMP},e}(),Ya=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Xa=function(e,t){return function(n,r){t(n,r,e)}},qa=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function Ka(e){return!0===e||"true"===e}function $a(e){return"number"==typeof e?e:"string"==typeof e?parseInt(e,10):void 0}function Qa(e,t){var n=parseInt(e,10);return mt(n)&&n>0?n:t}var Za,Ja,es=function(){function e(){this.propertyEventService=new we,this.domDataKey="__AG_"+Math.random().toString(),this.destroyed=!1}var n;return n=e,e.prototype.agWire=function(e,t){this.gridOptions.api=e,this.gridOptions.columnApi=t,this.checkForDeprecated(),this.checkForViolations()},e.prototype.destroy=function(){this.gridOptions.api=null,this.gridOptions.columnApi=null,this.destroyed=!0},e.prototype.init=function(){var e=this;!0!==this.gridOptions.suppressPropertyNamesCheck&&(this.checkGridOptionsProperties(),this.checkColumnDefProperties()),null!=this.gridOptions.sideBar&&(this.gridOptions.sideBar=Ua.parse(this.gridOptions.sideBar));var n=this.useAsyncEvents();if(this.eventService.addGlobalListener(this.globalEventHandler.bind(this),n),this.isGroupSelectsChildren()&&this.isSuppressParentsInRowNodes()&&console.warn("AG Grid: 'groupSelectsChildren' does not work with 'suppressParentsInRowNodes', this selection method needs the part in rowNode to work"),this.isGroupSelectsChildren()&&(this.isRowSelectionMulti()||console.warn("AG Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense"),this.isRowModelServerSide()&&console.warn("AG Grid: group selects children is NOT support for Server Side Row Model. This is because the rows are lazy loaded, so selecting a group is not possible asthe grid has no way of knowing what the children are.")),this.isGroupRemoveSingleChildren()&&this.isGroupHideOpenParents()&&console.warn("AG Grid: groupRemoveSingleChildren and groupHideOpenParents do not work with each other, you need to pick one. And don't ask us how to us these together on our support forum either you will get the same answer!"),this.isRowModelServerSide()){var r=function(e){return"AG Grid: '"+e+"' is not supported on the Server-Side Row Model"};o(this.gridOptions.groupDefaultExpanded)&&console.warn(r("groupDefaultExpanded")),o(this.gridOptions.groupDefaultExpanded)&&console.warn(r("groupIncludeFooter")),o(this.gridOptions.groupDefaultExpanded)&&console.warn(r("groupIncludeTotalFooter"))}this.isEnableRangeSelection()&&xe.assertRegistered(t.ModuleNames.RangeSelectionModule,"enableRangeSelection"),this.isEnableRangeSelection()||!this.isEnableRangeHandle()&&!this.isEnableFillHandle()||console.warn("AG Grid: 'enableRangeHandle' and 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true");var i=function(t){e.gridOptions.icons&&e.gridOptions.icons[t]&&console.warn("gridOptions.icons."+t+" is no longer supported. For information on how to style checkboxes and radio buttons, see https://www.ag-grid.com/javascript-grid-icons/")};i("radioButtonOff"),i("radioButtonOn"),i("checkboxChecked"),i("checkboxUnchecked"),i("checkboxIndeterminate"),this.getScrollbarWidth()},e.prototype.checkColumnDefProperties=function(){var e=this;null!=this.gridOptions.columnDefs&&this.gridOptions.columnDefs.forEach((function(t){var n=Object.getOwnPropertyNames(t),r=qa(Lt.ALL_PROPERTIES,Lt.FRAMEWORK_PROPERTIES);e.checkProperties(n,r,r,"colDef","https://www.ag-grid.com/javascript-grid-column-properties/")}))},e.prototype.checkGridOptionsProperties=function(){var e=Object.getOwnPropertyNames(this.gridOptions),t=qa(At.ALL_PROPERTIES,At.FRAMEWORK_PROPERTIES,d(Ke).map((function(e){return Dt.getCallbackForEvent(e)}))),n=qa(t,["api","columnApi"]);this.checkProperties(e,n,t,"gridOptions","https://www.ag-grid.com/javascript-grid-properties/")},e.prototype.checkProperties=function(e,t,n,r,o){var i=_r(e,t,n);k(i,(function(e,t){console.warn("ag-grid: invalid "+r+" property '"+e+"' did you mean any of these: "+t.slice(0,8).join(", "))})),Object.keys(i).length>0&&console.warn("ag-grid: to see all the valid "+r+" properties please check: "+o)},e.prototype.getDomDataKey=function(){return this.domDataKey},e.prototype.getDomData=function(e,t){var n=e[this.getDomDataKey()];return n?n[t]:void 0},e.prototype.setDomData=function(e,t,n){var r=this.getDomDataKey(),o=e[r];i(o)&&(o={},e[r]=o),o[t]=n},e.prototype.isRowSelection=function(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection},e.prototype.isSuppressRowDeselection=function(){return Ka(this.gridOptions.suppressRowDeselection)},e.prototype.isRowSelectionMulti=function(){return"multiple"===this.gridOptions.rowSelection},e.prototype.isRowMultiSelectWithClick=function(){return Ka(this.gridOptions.rowMultiSelectWithClick)},e.prototype.getContext=function(){return this.gridOptions.context},e.prototype.isPivotMode=function(){return Ka(this.gridOptions.pivotMode)},e.prototype.isSuppressExpandablePivotGroups=function(){return Ka(this.gridOptions.suppressExpandablePivotGroups)},e.prototype.getPivotColumnGroupTotals=function(){return this.gridOptions.pivotColumnGroupTotals},e.prototype.getPivotRowTotals=function(){return this.gridOptions.pivotRowTotals},e.prototype.isRowModelInfinite=function(){return this.gridOptions.rowModelType===Ce.ROW_MODEL_TYPE_INFINITE},e.prototype.isRowModelViewport=function(){return this.gridOptions.rowModelType===Ce.ROW_MODEL_TYPE_VIEWPORT},e.prototype.isRowModelServerSide=function(){return this.gridOptions.rowModelType===Ce.ROW_MODEL_TYPE_SERVER_SIDE},e.prototype.isRowModelDefault=function(){return i(this.gridOptions.rowModelType)||this.gridOptions.rowModelType===Ce.ROW_MODEL_TYPE_CLIENT_SIDE},e.prototype.isFullRowEdit=function(){return"fullRow"===this.gridOptions.editType},e.prototype.isSuppressFocusAfterRefresh=function(){return Ka(this.gridOptions.suppressFocusAfterRefresh)},e.prototype.isSuppressBrowserResizeObserver=function(){return Ka(this.gridOptions.suppressBrowserResizeObserver)},e.prototype.isSuppressMaintainUnsortedOrder=function(){return Ka(this.gridOptions.suppressMaintainUnsortedOrder)},e.prototype.isSuppressClearOnFillReduction=function(){return Ka(this.gridOptions.suppressClearOnFillReduction)},e.prototype.isShowToolPanel=function(){return Ka(this.gridOptions.sideBar&&Array.isArray(this.getSideBar().toolPanels))},e.prototype.getSideBar=function(){return this.gridOptions.sideBar},e.prototype.isSuppressTouch=function(){return Ka(this.gridOptions.suppressTouch)},e.prototype.isMaintainColumnOrder=function(){return Ka(this.gridOptions.maintainColumnOrder)},e.prototype.isSuppressRowTransform=function(){return Ka(this.gridOptions.suppressRowTransform)},e.prototype.isSuppressColumnStateEvents=function(){return Ka(this.gridOptions.suppressColumnStateEvents)},e.prototype.isAllowDragFromColumnsToolPanel=function(){return Ka(this.gridOptions.allowDragFromColumnsToolPanel)},e.prototype.useAsyncEvents=function(){return!Ka(this.gridOptions.suppressAsyncEvents)},e.prototype.isEnableCellChangeFlash=function(){return Ka(this.gridOptions.enableCellChangeFlash)},e.prototype.getCellFlashDelay=function(){return this.gridOptions.cellFlashDelay||500},e.prototype.getCellFadeDelay=function(){return this.gridOptions.cellFadeDelay||1e3},e.prototype.isGroupSelectsChildren=function(){var e=Ka(this.gridOptions.groupSelectsChildren);return e&&this.isTreeData()?(console.warn("AG Grid: groupSelectsChildren does not work with tree data"),!1):e},e.prototype.isSuppressRowHoverHighlight=function(){return Ka(this.gridOptions.suppressRowHoverHighlight)},e.prototype.isColumnHoverHighlight=function(){return Ka(this.gridOptions.columnHoverHighlight)},e.prototype.isGroupSelectsFiltered=function(){return Ka(this.gridOptions.groupSelectsFiltered)},e.prototype.isGroupHideOpenParents=function(){return Ka(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupMaintainOrder=function(){return Ka(this.gridOptions.groupMaintainOrder)},e.prototype.getAutoGroupColumnDef=function(){return this.gridOptions.autoGroupColumnDef},e.prototype.isGroupMultiAutoColumn=function(){return this.gridOptions.groupDisplayType?this.matchesGroupDisplayType("multipleColumns",this.gridOptions.groupDisplayType):Ka(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupUseEntireRow=function(e){return!e&&(!!this.gridOptions.groupDisplayType&&this.matchesGroupDisplayType("groupRows",this.gridOptions.groupDisplayType))},e.prototype.isGroupSuppressAutoColumn=function(){return!(!this.gridOptions.groupDisplayType||!this.matchesGroupDisplayType("custom",this.gridOptions.groupDisplayType))||!!this.gridOptions.treeDataDisplayType&&this.matchesTreeDataDisplayType("custom",this.gridOptions.treeDataDisplayType)},e.prototype.isGroupRemoveSingleChildren=function(){return Ka(this.gridOptions.groupRemoveSingleChildren)},e.prototype.isGroupRemoveLowestSingleChildren=function(){return Ka(this.gridOptions.groupRemoveLowestSingleChildren)},e.prototype.isGroupIncludeFooter=function(){return Ka(this.gridOptions.groupIncludeFooter)},e.prototype.isGroupIncludeTotalFooter=function(){return Ka(this.gridOptions.groupIncludeTotalFooter)},e.prototype.isGroupSuppressBlankHeader=function(){return Ka(this.gridOptions.groupSuppressBlankHeader)},e.prototype.isSuppressRowClickSelection=function(){return Ka(this.gridOptions.suppressRowClickSelection)},e.prototype.isSuppressCellSelection=function(){return Ka(this.gridOptions.suppressCellSelection)},e.prototype.isSuppressMultiSort=function(){return Ka(this.gridOptions.suppressMultiSort)},e.prototype.isMultiSortKeyCtrl=function(){return"ctrl"===this.gridOptions.multiSortKey},e.prototype.isPivotSuppressAutoColumn=function(){return Ka(this.gridOptions.pivotSuppressAutoColumn)},e.prototype.isSuppressDragLeaveHidesColumns=function(){return Ka(this.gridOptions.suppressDragLeaveHidesColumns)},e.prototype.isSuppressScrollOnNewData=function(){return Ka(this.gridOptions.suppressScrollOnNewData)},e.prototype.isSuppressScrollWhenPopupsAreOpen=function(){return Ka(this.gridOptions.suppressScrollWhenPopupsAreOpen)},e.prototype.isRowDragEntireRow=function(){return Ka(this.gridOptions.rowDragEntireRow)},e.prototype.isSuppressRowDrag=function(){return Ka(this.gridOptions.suppressRowDrag)},e.prototype.isRowDragManaged=function(){return Ka(this.gridOptions.rowDragManaged)},e.prototype.isSuppressMoveWhenRowDragging=function(){return Ka(this.gridOptions.suppressMoveWhenRowDragging)},e.prototype.isRowDragMultiRow=function(){return Ka(this.gridOptions.rowDragMultiRow)},e.prototype.getDomLayout=function(){var e=this.gridOptions.domLayout||Ce.DOM_LAYOUT_NORMAL;return-1===[Ce.DOM_LAYOUT_PRINT,Ce.DOM_LAYOUT_AUTO_HEIGHT,Ce.DOM_LAYOUT_NORMAL].indexOf(e)?(K((function(){return console.warn("AG Grid: "+e+" is not valid for DOM Layout, valid values are "+Ce.DOM_LAYOUT_NORMAL+", "+Ce.DOM_LAYOUT_AUTO_HEIGHT+" and "+Ce.DOM_LAYOUT_PRINT)}),"warn about dom layout values"),Ce.DOM_LAYOUT_NORMAL):e},e.prototype.isSuppressHorizontalScroll=function(){return Ka(this.gridOptions.suppressHorizontalScroll)},e.prototype.isSuppressMaxRenderedRowRestriction=function(){return Ka(this.gridOptions.suppressMaxRenderedRowRestriction)},e.prototype.isExcludeChildrenWhenTreeDataFiltering=function(){return Ka(this.gridOptions.excludeChildrenWhenTreeDataFiltering)},e.prototype.isAlwaysShowHorizontalScroll=function(){return Ka(this.gridOptions.alwaysShowHorizontalScroll)},e.prototype.isAlwaysShowVerticalScroll=function(){return Ka(this.gridOptions.alwaysShowVerticalScroll)},e.prototype.isDebounceVerticalScrollbar=function(){return Ka(this.gridOptions.debounceVerticalScrollbar)},e.prototype.isSuppressLoadingOverlay=function(){return Ka(this.gridOptions.suppressLoadingOverlay)},e.prototype.isSuppressNoRowsOverlay=function(){return Ka(this.gridOptions.suppressNoRowsOverlay)},e.prototype.isSuppressFieldDotNotation=function(){return Ka(this.gridOptions.suppressFieldDotNotation)},e.prototype.getPinnedTopRowData=function(){return this.gridOptions.pinnedTopRowData},e.prototype.getPinnedBottomRowData=function(){return this.gridOptions.pinnedBottomRowData},e.prototype.isFunctionsPassive=function(){return Ka(this.gridOptions.functionsPassive)},e.prototype.isSuppressChangeDetection=function(){return Ka(this.gridOptions.suppressChangeDetection)},e.prototype.isSuppressAnimationFrame=function(){return Ka(this.gridOptions.suppressAnimationFrame)},e.prototype.getQuickFilterText=function(){return this.gridOptions.quickFilterText},e.prototype.isCacheQuickFilter=function(){return Ka(this.gridOptions.cacheQuickFilter)},e.prototype.isUnSortIcon=function(){return Ka(this.gridOptions.unSortIcon)},e.prototype.isSuppressMenuHide=function(){return Ka(this.gridOptions.suppressMenuHide)},e.prototype.isEnterMovesDownAfterEdit=function(){return Ka(this.gridOptions.enterMovesDownAfterEdit)},e.prototype.isEnterMovesDown=function(){return Ka(this.gridOptions.enterMovesDown)},e.prototype.isUndoRedoCellEditing=function(){return Ka(this.gridOptions.undoRedoCellEditing)},e.prototype.getUndoRedoCellEditingLimit=function(){return $a(this.gridOptions.undoRedoCellEditingLimit)},e.prototype.getRowStyle=function(){return this.gridOptions.rowStyle},e.prototype.getRowClass=function(){return this.gridOptions.rowClass},e.prototype.getRowStyleFunc=function(){return this.gridOptions.getRowStyle},e.prototype.getRowClassFunc=function(){return this.gridOptions.getRowClass},e.prototype.rowClassRules=function(){return this.gridOptions.rowClassRules},e.prototype.getServerSideStoreType=function(){return this.gridOptions.serverSideStoreType},e.prototype.getServerSideStoreParamsFunc=function(){return this.gridOptions.getServerSideStoreParams},e.prototype.getCreateChartContainerFunc=function(){return this.gridOptions.createChartContainer},e.prototype.getPopupParent=function(){return this.gridOptions.popupParent},e.prototype.getBlockLoadDebounceMillis=function(){return this.gridOptions.blockLoadDebounceMillis},e.prototype.getPostProcessPopupFunc=function(){return this.gridOptions.postProcessPopup},e.prototype.getPaginationNumberFormatterFunc=function(){return this.gridOptions.paginationNumberFormatter},e.prototype.getChildCountFunc=function(){return this.gridOptions.getChildCount},e.prototype.getIsApplyServerSideTransactionFunc=function(){return this.gridOptions.isApplyServerSideTransaction},e.prototype.getDefaultGroupOrderComparator=function(){return this.gridOptions.defaultGroupOrderComparator},e.prototype.getIsFullWidthCellFunc=function(){return this.gridOptions.isFullWidthCell},e.prototype.getFullWidthCellRendererParams=function(){return this.gridOptions.fullWidthCellRendererParams},e.prototype.isEmbedFullWidthRows=function(){return Ka(this.gridOptions.embedFullWidthRows)||Ka(this.gridOptions.deprecatedEmbedFullWidthRows)},e.prototype.isDetailRowAutoHeight=function(){return Ka(this.gridOptions.detailRowAutoHeight)},e.prototype.getSuppressKeyboardEventFunc=function(){return this.gridOptions.suppressKeyboardEvent},e.prototype.getBusinessKeyForNodeFunc=function(){return this.gridOptions.getBusinessKeyForNode},e.prototype.getApi=function(){return this.gridOptions.api},e.prototype.getColumnApi=function(){return this.gridOptions.columnApi},e.prototype.isImmutableData=function(){return Ka(this.gridOptions.immutableData)},e.prototype.isEnsureDomOrder=function(){return Ka(this.gridOptions.ensureDomOrder)},e.prototype.isEnableCharts=function(){return!!Ka(this.gridOptions.enableCharts)&&xe.assertRegistered(t.ModuleNames.GridChartsModule,"enableCharts")},e.prototype.getColResizeDefault=function(){return this.gridOptions.colResizeDefault},e.prototype.isSingleClickEdit=function(){return Ka(this.gridOptions.singleClickEdit)},e.prototype.isSuppressClickEdit=function(){return Ka(this.gridOptions.suppressClickEdit)},e.prototype.isStopEditingWhenCellsLoseFocus=function(){return Ka(this.gridOptions.stopEditingWhenCellsLoseFocus)},e.prototype.getGroupDefaultExpanded=function(){return this.gridOptions.groupDefaultExpanded},e.prototype.getMaxConcurrentDatasourceRequests=function(){return this.gridOptions.maxConcurrentDatasourceRequests},e.prototype.getMaxBlocksInCache=function(){return this.gridOptions.maxBlocksInCache},e.prototype.getCacheOverflowSize=function(){return this.gridOptions.cacheOverflowSize},e.prototype.getPaginationPageSize=function(){return $a(this.gridOptions.paginationPageSize)},e.prototype.isPaginateChildRows=function(){return!(!this.isGroupRemoveSingleChildren()&&!this.isGroupRemoveLowestSingleChildren())||Ka(this.gridOptions.paginateChildRows)},e.prototype.getCacheBlockSize=function(){return Qa(this.gridOptions.cacheBlockSize)},e.prototype.getInfiniteInitialRowCount=function(){return this.gridOptions.infiniteInitialRowCount},e.prototype.isPurgeClosedRowNodes=function(){return Ka(this.gridOptions.purgeClosedRowNodes)},e.prototype.isSuppressPaginationPanel=function(){return Ka(this.gridOptions.suppressPaginationPanel)},e.prototype.getRowData=function(){return this.gridOptions.rowData},e.prototype.isEnableRtl=function(){return Ka(this.gridOptions.enableRtl)},e.prototype.getRowGroupPanelShow=function(){return this.gridOptions.rowGroupPanelShow},e.prototype.getPivotPanelShow=function(){return this.gridOptions.pivotPanelShow},e.prototype.isAngularCompileRows=function(){return Ka(this.gridOptions.angularCompileRows)},e.prototype.isAngularCompileFilters=function(){return Ka(this.gridOptions.angularCompileFilters)},e.prototype.isDebug=function(){return Ka(this.gridOptions.debug)},e.prototype.getColumnDefs=function(){return this.gridOptions.columnDefs},e.prototype.getColumnTypes=function(){return this.gridOptions.columnTypes},e.prototype.getDatasource=function(){return this.gridOptions.datasource},e.prototype.getViewportDatasource=function(){return this.gridOptions.viewportDatasource},e.prototype.getServerSideDatasource=function(){return this.gridOptions.serverSideDatasource},e.prototype.isAccentedSort=function(){return Ka(this.gridOptions.accentedSort)},e.prototype.isEnableBrowserTooltips=function(){return Ka(this.gridOptions.enableBrowserTooltips)},e.prototype.isEnableCellExpressions=function(){return Ka(this.gridOptions.enableCellExpressions)},e.prototype.isEnableGroupEdit=function(){return Ka(this.gridOptions.enableGroupEdit)},e.prototype.isSuppressMiddleClickScrolls=function(){return Ka(this.gridOptions.suppressMiddleClickScrolls)},e.prototype.isPreventDefaultOnContextMenu=function(){return Ka(this.gridOptions.preventDefaultOnContextMenu)},e.prototype.isSuppressPreventDefaultOnMouseWheel=function(){return Ka(this.gridOptions.suppressPreventDefaultOnMouseWheel)},e.prototype.isSuppressColumnVirtualisation=function(){return Ka(this.gridOptions.suppressColumnVirtualisation)},e.prototype.isSuppressContextMenu=function(){return Ka(this.gridOptions.suppressContextMenu)},e.prototype.isAllowContextMenuWithControlKey=function(){return Ka(this.gridOptions.allowContextMenuWithControlKey)},e.prototype.isSuppressCopyRowsToClipboard=function(){return Ka(this.gridOptions.suppressCopyRowsToClipboard)},e.prototype.isCopyHeadersToClipboard=function(){return Ka(this.gridOptions.copyHeadersToClipboard)},e.prototype.isSuppressClipboardPaste=function(){return Ka(this.gridOptions.suppressClipboardPaste)},e.prototype.isSuppressLastEmptyLineOnPaste=function(){return Ka(this.gridOptions.suppressLastEmptyLineOnPaste)},e.prototype.isPagination=function(){return Ka(this.gridOptions.pagination)},e.prototype.isSuppressEnterpriseResetOnNewColumns=function(){return Ka(this.gridOptions.suppressEnterpriseResetOnNewColumns)},e.prototype.getProcessDataFromClipboardFunc=function(){return this.gridOptions.processDataFromClipboard},e.prototype.getAsyncTransactionWaitMillis=function(){return o(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:Ce.BATCH_WAIT_MILLIS},e.prototype.isSuppressMovableColumns=function(){return Ka(this.gridOptions.suppressMovableColumns)},e.prototype.isAnimateRows=function(){return!this.isEnsureDomOrder()&&Ka(this.gridOptions.animateRows)},e.prototype.isSuppressColumnMoveAnimation=function(){return Ka(this.gridOptions.suppressColumnMoveAnimation)},e.prototype.isSuppressAggFuncInHeader=function(){return Ka(this.gridOptions.suppressAggFuncInHeader)},e.prototype.isSuppressAggAtRootLevel=function(){return Ka(this.gridOptions.suppressAggAtRootLevel)},e.prototype.isSuppressAggFilteredOnly=function(){return Ka(this.gridOptions.suppressAggFilteredOnly)},e.prototype.isShowOpenedGroup=function(){return Ka(this.gridOptions.showOpenedGroup)},e.prototype.isReactUi=function(){return Ka(this.gridOptions.reactUi)},e.prototype.isEnableRangeSelection=function(){return xe.isRegistered(t.ModuleNames.RangeSelectionModule)&&Ka(this.gridOptions.enableRangeSelection)},e.prototype.isEnableRangeHandle=function(){return Ka(this.gridOptions.enableRangeHandle)},e.prototype.isEnableFillHandle=function(){return Ka(this.gridOptions.enableFillHandle)},e.prototype.getFillHandleDirection=function(){var e=this.gridOptions.fillHandleDirection;return e?"x"!==e&&"y"!==e&&"xy"!==e?(K((function(){return console.warn("AG Grid: valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'.")}),"warn invalid fill direction"),"xy"):e:"xy"},e.prototype.getFillOperation=function(){return this.gridOptions.fillOperation},e.prototype.isSuppressMultiRangeSelection=function(){return Ka(this.gridOptions.suppressMultiRangeSelection)},e.prototype.isPaginationAutoPageSize=function(){return Ka(this.gridOptions.paginationAutoPageSize)},e.prototype.isRememberGroupStateWhenNewData=function(){return Ka(this.gridOptions.rememberGroupStateWhenNewData)},e.prototype.getIcons=function(){return this.gridOptions.icons},e.prototype.getAggFuncs=function(){return this.gridOptions.aggFuncs},e.prototype.getSortingOrder=function(){return this.gridOptions.sortingOrder},e.prototype.getAlignedGrids=function(){return this.gridOptions.alignedGrids},e.prototype.isMasterDetail=function(){return!!Ka(this.gridOptions.masterDetail)&&xe.assertRegistered(t.ModuleNames.MasterDetailModule,"masterDetail")},e.prototype.isKeepDetailRows=function(){return Ka(this.gridOptions.keepDetailRows)},e.prototype.getKeepDetailRowsCount=function(){var e=this.gridOptions.keepDetailRowsCount;return o(e)&&e>0?this.gridOptions.keepDetailRowsCount:10},e.prototype.getIsRowMasterFunc=function(){return this.gridOptions.isRowMaster},e.prototype.getIsRowSelectableFunc=function(){return this.gridOptions.isRowSelectable},e.prototype.getGroupRowRendererParams=function(){return this.gridOptions.groupRowRendererParams},e.prototype.getOverlayLoadingTemplate=function(){return this.gridOptions.overlayLoadingTemplate},e.prototype.getOverlayNoRowsTemplate=function(){return this.gridOptions.overlayNoRowsTemplate},e.prototype.isSuppressAutoSize=function(){return Ka(this.gridOptions.suppressAutoSize)},e.prototype.isEnableCellTextSelection=function(){return Ka(this.gridOptions.enableCellTextSelection)},e.prototype.isSuppressParentsInRowNodes=function(){return Ka(this.gridOptions.suppressParentsInRowNodes)},e.prototype.isSuppressClipboardApi=function(){return Ka(this.gridOptions.suppressClipboardApi)},e.prototype.isFunctionsReadOnly=function(){return Ka(this.gridOptions.functionsReadOnly)},e.prototype.isFloatingFilter=function(){return this.gridOptions.floatingFilter},e.prototype.isEnableCellTextSelect=function(){return Ka(this.gridOptions.enableCellTextSelection)},e.prototype.isEnableOldSetFilterModel=function(){return Ka(this.gridOptions.enableOldSetFilterModel)},e.prototype.getDefaultColDef=function(){return this.gridOptions.defaultColDef},e.prototype.getDefaultColGroupDef=function(){return this.gridOptions.defaultColGroupDef},e.prototype.getDefaultExportParams=function(e){return this.gridOptions.defaultExportParams?(console.warn("AG Grid: Since v25.2 `defaultExportParams` has been replaced by `default"+rt(e)+"ExportParams`'"),this.gridOptions.defaultExportParams):"csv"===e&&this.gridOptions.defaultCsvExportParams?this.gridOptions.defaultCsvExportParams:"excel"===e&&this.gridOptions.defaultExcelExportParams?this.gridOptions.defaultExcelExportParams:void 0},e.prototype.isSuppressCsvExport=function(){return Ka(this.gridOptions.suppressCsvExport)},e.prototype.isAllowShowChangeAfterFilter=function(){return Ka(this.gridOptions.allowShowChangeAfterFilter)},e.prototype.isSuppressExcelExport=function(){return Ka(this.gridOptions.suppressExcelExport)},e.prototype.isSuppressMakeColumnVisibleAfterUnGroup=function(){return Ka(this.gridOptions.suppressMakeColumnVisibleAfterUnGroup)},e.prototype.getDataPathFunc=function(){return this.gridOptions.getDataPath},e.prototype.getIsServerSideGroupFunc=function(){return this.gridOptions.isServerSideGroup},e.prototype.getIsServerSideGroupOpenByDefaultFunc=function(){return this.gridOptions.isServerSideGroupOpenByDefault},e.prototype.getIsGroupOpenByDefaultFunc=function(){return this.gridOptions.isGroupOpenByDefault},e.prototype.getServerSideGroupKeyFunc=function(){return this.gridOptions.getServerSideGroupKey},e.prototype.getGroupRowAggNodesFunc=function(){return this.gridOptions.groupRowAggNodes},e.prototype.getContextMenuItemsFunc=function(){return this.gridOptions.getContextMenuItems},e.prototype.getMainMenuItemsFunc=function(){return this.gridOptions.getMainMenuItems},e.prototype.getRowNodeIdFunc=function(){return this.gridOptions.getRowNodeId},e.prototype.getNavigateToNextHeaderFunc=function(){return this.gridOptions.navigateToNextHeader},e.prototype.getTabToNextHeaderFunc=function(){return this.gridOptions.tabToNextHeader},e.prototype.getNavigateToNextCellFunc=function(){return this.gridOptions.navigateToNextCell},e.prototype.getTabToNextCellFunc=function(){return this.gridOptions.tabToNextCell},e.prototype.getGridTabIndex=function(){return(this.gridOptions.tabIndex||0).toString()},e.prototype.isTreeData=function(){return!!Ka(this.gridOptions.treeData)&&xe.assertRegistered(t.ModuleNames.RowGroupingModule,"Tree Data")},e.prototype.isValueCache=function(){return Ka(this.gridOptions.valueCache)},e.prototype.isValueCacheNeverExpires=function(){return Ka(this.gridOptions.valueCacheNeverExpires)},e.prototype.isDeltaSort=function(){return Ka(this.gridOptions.deltaSort)},e.prototype.isAggregateOnlyChangedColumns=function(){return Ka(this.gridOptions.aggregateOnlyChangedColumns)},e.prototype.getProcessSecondaryColDefFunc=function(){return this.gridOptions.processSecondaryColDef},e.prototype.getProcessSecondaryColGroupDefFunc=function(){return this.gridOptions.processSecondaryColGroupDef},e.prototype.getSendToClipboardFunc=function(){return this.gridOptions.sendToClipboard},e.prototype.getProcessRowPostCreateFunc=function(){return this.gridOptions.processRowPostCreate},e.prototype.getProcessCellForClipboardFunc=function(){return this.gridOptions.processCellForClipboard},e.prototype.getProcessHeaderForClipboardFunc=function(){return this.gridOptions.processHeaderForClipboard},e.prototype.getProcessCellFromClipboardFunc=function(){return this.gridOptions.processCellFromClipboard},e.prototype.getViewportRowModelPageSize=function(){return Qa(this.gridOptions.viewportRowModelPageSize,5)},e.prototype.getViewportRowModelBufferSize=function(){return e=this.gridOptions.viewportRowModelBufferSize,t=5,e>=0?e:t;var e,t},e.prototype.isServerSideSortingAlwaysResets=function(){return Ka(this.gridOptions.serverSideSortingAlwaysResets)},e.prototype.isServerSideFilteringAlwaysResets=function(){return Ka(this.gridOptions.serverSideFilteringAlwaysResets)},e.prototype.getPostSortFunc=function(){return this.gridOptions.postSort},e.prototype.getChartToolbarItemsFunc=function(){return this.gridOptions.getChartToolbarItems},e.prototype.getChartThemeOverrides=function(){return this.gridOptions.chartThemeOverrides},e.prototype.getCustomChartThemes=function(){return this.gridOptions.customChartThemes},e.prototype.getChartThemes=function(){return this.gridOptions.chartThemes||["ag-default","ag-material","ag-pastel","ag-vivid","ag-solar"]},e.prototype.getClipboardDeliminator=function(){return o(this.gridOptions.clipboardDeliminator)?this.gridOptions.clipboardDeliminator:"\t"},e.prototype.setProperty=function(e,t,n){void 0===n&&(n=!1);var r=this.gridOptions,o=r[e];if(n||o!==t){r[e]=t;var i={type:e,currentValue:t,previousValue:o};this.propertyEventService.dispatchEvent(i)}},e.prototype.addEventListener=function(e,t){this.propertyEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.propertyEventService.removeEventListener(e,t)},e.prototype.isSkipHeaderOnAutoSize=function(){return!!this.gridOptions.skipHeaderOnAutoSize},e.prototype.getAutoSizePadding=function(){var e=this.gridOptions.autoSizePadding;return null!=e&&e>=0?e:20},e.prototype.getHeaderHeight=function(){return"number"===typeof this.gridOptions.headerHeight?this.gridOptions.headerHeight:this.getFromTheme(25,"headerHeight")},e.prototype.getFloatingFiltersHeight=function(){return"number"===typeof this.gridOptions.floatingFiltersHeight?this.gridOptions.floatingFiltersHeight:this.getFromTheme(25,"headerHeight")},e.prototype.getGroupHeaderHeight=function(){return"number"===typeof this.gridOptions.groupHeaderHeight?this.gridOptions.groupHeaderHeight:this.getHeaderHeight()},e.prototype.getPivotHeaderHeight=function(){return"number"===typeof this.gridOptions.pivotHeaderHeight?this.gridOptions.pivotHeaderHeight:this.getHeaderHeight()},e.prototype.getPivotGroupHeaderHeight=function(){return"number"===typeof this.gridOptions.pivotGroupHeaderHeight?this.gridOptions.pivotGroupHeaderHeight:this.getGroupHeaderHeight()},e.prototype.isExternalFilterPresent=function(){return"function"===typeof this.gridOptions.isExternalFilterPresent&&this.gridOptions.isExternalFilterPresent()},e.prototype.doesExternalFilterPass=function(e){return"function"===typeof this.gridOptions.doesExternalFilterPass&&this.gridOptions.doesExternalFilterPass(e)},e.prototype.getTooltipShowDelay=function(){var e=this.gridOptions.tooltipShowDelay;return o(e)?(e<0&&console.warn("ag-grid: tooltipShowDelay should not be lower than 0"),Math.max(200,e)):null},e.prototype.isTooltipMouseTrack=function(){return Ka(this.gridOptions.tooltipMouseTrack)},e.prototype.isSuppressModelUpdateAfterUpdateTransaction=function(){return Ka(this.gridOptions.suppressModelUpdateAfterUpdateTransaction)},e.prototype.getDocument=function(){var e=null;return this.gridOptions.getDocument&&o(this.gridOptions.getDocument)&&(e=this.gridOptions.getDocument()),e&&o(e)?e:document},e.prototype.getMinColWidth=function(){var e=this.gridOptions.minColWidth;if(o(e)&&e>n.MIN_COL_WIDTH)return this.gridOptions.minColWidth;var t=this.getFromTheme(null,"headerCellMinWidth");return o(t)?Math.max(t,n.MIN_COL_WIDTH):n.MIN_COL_WIDTH},e.prototype.getMaxColWidth=function(){return this.gridOptions.maxColWidth&&this.gridOptions.maxColWidth>n.MIN_COL_WIDTH?this.gridOptions.maxColWidth:null},e.prototype.getColWidth=function(){return"number"!==typeof this.gridOptions.colWidth||this.gridOptions.colWidth<n.MIN_COL_WIDTH?200:this.gridOptions.colWidth},e.prototype.getRowBuffer=function(){var e=this.gridOptions.rowBuffer;return"number"===typeof e?e<0&&(K((function(){return console.warn("AG Grid: rowBuffer should not be negative")}),"warn rowBuffer negative"),this.gridOptions.rowBuffer=e=0):e=Ce.ROW_BUFFER_SIZE,e},e.prototype.getRowBufferInPixels=function(){return this.getRowBuffer()*this.getRowHeightAsNumber()},e.prototype.getScrollbarWidth=function(){if(null==this.scrollbarWidth){var e="number"===typeof this.gridOptions.scrollbarWidth&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:nn();null!=e&&(this.scrollbarWidth=e,this.eventService.dispatchEvent({type:Ke.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth},e.prototype.checkForDeprecated=function(){var e=this.gridOptions;e.deprecatedEmbedFullWidthRows&&console.warn("AG Grid: since v21.2, deprecatedEmbedFullWidthRows has been replaced with embedFullWidthRows."),e.enableOldSetFilterModel&&console.warn("AG Grid: since v22.x, enableOldSetFilterModel is deprecated. Please move to the new Set Filter Model as the old one may not be supported in v23 onwards."),e.floatingFilter&&(console.warn("AG Grid: since v23.1, floatingFilter on the gridOptions is deprecated. Please use floatingFilter on the colDef instead."),e.defaultColDef||(e.defaultColDef={}),null==e.defaultColDef.floatingFilter&&(e.defaultColDef.floatingFilter=!0)),e.rowDeselection&&console.warn("AG Grid: since v24.x, rowDeselection is deprecated and the behaviour is true by default. Please use `suppressRowDeselection` to prevent rows from being deselected."),e.enableMultiRowDragging&&(e.rowDragMultiRow=!0,delete e.enableMultiRowDragging,console.warn("AG Grid: since v26.1, `enableMultiRowDragging` is deprecated. Please use `rowDragMultiRow`."));var t=function(t,n,r){null!=e[t]&&(console.warn("ag-grid: since version "+r+", '"+t+"' is deprecated / renamed, please use the new property name '"+n+"' instead."),null==e[n]&&(e[n]=e[t]))};if(t("batchUpdateWaitMillis","asyncTransactionWaitMillis","23.1.x"),t("deltaRowDataMode","immutableData","23.1.x"),(e.immutableColumns||e.deltaColumnMode)&&console.warn("AG Grid: since v24.0, immutableColumns and deltaColumnMode properties are gone. The grid now works like this as default. To keep column order maintained, set grid property applyColumnDefOrder=true"),t("suppressSetColumnStateEvents","suppressColumnStateEvents","24.0.x"),e.groupRowInnerRenderer||e.groupRowInnerRendererParams||e.groupRowInnerRendererFramework){console.warn("AG Grid: since v24.0, grid properties groupRowInnerRenderer, groupRowInnerRendererFramework and groupRowInnerRendererParams are no longer used."),console.warn(" Instead use the grid properties groupRowRendererParams.innerRenderer, groupRowRendererParams.innerRendererFramework and groupRowRendererParams.innerRendererParams."),console.warn(" For example instead of this:"),console.warn(' groupRowInnerRenderer: "myRenderer"'),console.warn(" groupRowInnerRendererParams: {x: a}"),console.warn(" Replace with this:"),console.warn(" groupRowRendererParams: {"),console.warn(' innerRenderer: "myRenderer",'),console.warn(" innerRendererParams: {x: a}"),console.warn(" }"),console.warn(" We have copied the properties over for you. However to stop this error message, please change your application code."),e.groupRowRendererParams||(e.groupRowRendererParams={});var n=e.groupRowRendererParams;e.groupRowInnerRenderer&&(n.innerRenderer=e.groupRowInnerRenderer),e.groupRowInnerRendererParams&&(n.innerRendererParams=e.groupRowInnerRendererParams),e.groupRowInnerRendererFramework&&(n.innerRendererFramework=e.groupRowInnerRendererFramework)}if(e.rememberGroupStateWhenNewData&&console.warn("AG Grid: since v24.0, grid property rememberGroupStateWhenNewData is deprecated. This feature was provided before Transaction Updates worked (which keep group state). Now that transaction updates are possible and they keep group state, this feature is no longer needed."),e.detailCellRendererParams&&e.detailCellRendererParams.autoHeight&&(console.warn("AG Grid: since v24.1, grid property detailCellRendererParams.autoHeight is replaced with grid property detailRowAutoHeight. This allows this feature to work when you provide a custom DetailCellRenderer"),e.detailRowAutoHeight=!0),e.suppressKeyboardEvent&&console.warn("AG Grid: since v24.1 suppressKeyboardEvent in the gridOptions has been deprecated and will be removed in\n future versions of AG Grid. If you need this to be set for every column use the defaultColDef property."),e.suppressEnterpriseResetOnNewColumns&&console.warn("AG Grid: since v25, grid property suppressEnterpriseResetOnNewColumns is deprecated. This was a temporary property to allow changing columns in Server Side Row Model without triggering a reload. Now that it is possible to dynamically change columns in the grid, this is no longer needed."),e.suppressColumnStateEvents&&console.warn('AG Grid: since v25, grid property suppressColumnStateEvents no longer works due to a refactor that we did. It should be possible to achieve similar using event.source, which would be "api" if the event was due to setting column state via the API'),e.defaultExportParams&&console.warn("AG Grid: since v25.2, the grid property `defaultExportParams` has been replaced by `defaultCsvExportParams` and `defaultExcelExportParams`."),e.stopEditingWhenGridLosesFocus&&(console.warn("AG Grid: since v25.2.2, the grid property `stopEditingWhenGridLosesFocus` has been replaced by `stopEditingWhenCellsLoseFocus`."),e.stopEditingWhenCellsLoseFocus=!0),e.applyColumnDefOrder&&console.warn("AG Grid: since v26.0, the grid property `applyColumnDefOrder` is no longer needed, as this is the default behaviour. To turn this behaviour off, set maintainColumnOrder=true"),e.groupMultiAutoColumn&&(console.warn("AG Grid: since v26.0, the grid property `groupMultiAutoColumn` has been replaced by `groupDisplayType = 'multipleColumns'`"),e.groupDisplayType="multipleColumns"),e.groupUseEntireRow&&(console.warn("AG Grid: since v26.0, the grid property `groupUseEntireRow` has been replaced by `groupDisplayType = 'groupRows'`"),e.groupDisplayType="groupRows"),e.groupSuppressAutoColumn){var r=e.treeData?"treeDataDisplayType":"groupDisplayType";console.warn("AG Grid: since v26.0, the grid property `groupSuppressAutoColumn` has been replaced by `"+r+" = 'custom'`"),e.groupDisplayType="custom"}e.defaultGroupSortComparator&&(console.warn("AG Grid: since v26.0, the grid property `defaultGroupSortComparator` has been replaced by `defaultGroupOrderComparator`"),e.defaultGroupOrderComparator=e.defaultGroupSortComparator),e.colWidth&&console.warn("AG Grid: since v26.1, the grid property `colWidth` is deprecated and should be set via `defaultColDef.width`."),e.minColWidth&&console.warn("AG Grid: since v26.1, the grid property `minColWidth` is deprecated and should be set via `defaultColDef.minWidth`."),e.maxColWidth&&console.warn("AG Grid: since v26.1, the grid property `maxColWidth` is deprecated and should be set via `defaultColDef.maxWidth`.")},e.prototype.checkForViolations=function(){this.isTreeData()&&this.treeDataViolations()},e.prototype.treeDataViolations=function(){this.isRowModelDefault()&&i(this.getDataPathFunc())&&console.warn("AG Grid: property usingTreeData=true with rowModel=clientSide, but you did not provide getDataPath function, please provide getDataPath function if using tree data."),this.isRowModelServerSide()&&(i(this.getIsServerSideGroupFunc())&&console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide isServerSideGroup function, please provide isServerSideGroup function if using tree data."),i(this.getServerSideGroupKeyFunc())&&console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data."))},e.prototype.getLocaleTextFunc=function(){if(this.gridOptions.localeTextFunc)return this.gridOptions.localeTextFunc;var e=this.gridOptions.localeText;return function(t,n){return e&&e[t]?e[t]:n}},e.prototype.globalEventHandler=function(e,t){if(!this.destroyed){var n=Dt.getCallbackForEvent(e);"function"===typeof this.gridOptions[n]&&this.gridOptions[n](t)}},e.prototype.getRowHeightAsNumber=function(){return!this.gridOptions.rowHeight||i(this.gridOptions.rowHeight)?this.getDefaultRowHeight():this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:(console.warn("AG Grid row height must be a number if not using standard row model"),this.getDefaultRowHeight())},e.prototype.getRowHeightForNode=function(e,t,n){if(void 0===t&&(t=!1),null==n&&(n=this.getDefaultRowHeight()),"function"===typeof this.gridOptions.getRowHeight){if(t)return{height:n,estimated:!0};var r={node:e,data:e.data,api:this.gridOptions.api,context:this.gridOptions.context},o=this.gridOptions.getRowHeight(r);if(this.isNumeric(o))return 0===o&&K((function(){return console.warn("AG Grid: The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.")}),"invalidRowHeight"),{height:Math.max(1,o),estimated:!1}}return e.detail&&this.isMasterDetail()?this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}:{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:n,estimated:!1}},e.prototype.isDynamicRowHeight=function(){return"function"===typeof this.gridOptions.getRowHeight},e.prototype.getListItemHeight=function(){return this.getFromTheme(20,"listItemHeight")},e.prototype.chartMenuPanelWidth=function(){return this.environment.chartMenuPanelWidth()},e.prototype.isNumeric=function(e){return!isNaN(e)&&"number"===typeof e&&isFinite(e)},e.prototype.getFromTheme=function(e,t){var n=this.environment.getTheme().theme;return n&&0===n.indexOf("ag-theme")?this.environment.getSassVariable(n,t):e},e.prototype.getDefaultRowHeight=function(){return this.getFromTheme(25,"rowHeight")},e.prototype.matchesGroupDisplayType=function(e,t){var n=["groupRows","multipleColumns","custom","singleColumn"];return n.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid groupDisplayType value - possible values are: '"+n.join("', '")+"'"),!1):t===e},e.prototype.matchesTreeDataDisplayType=function(e,t){var n=["auto","custom"];return n.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid treeDataDisplayType value - possible values are: '"+n.join("', '")+"'"),!1):t===e},e.MIN_COL_WIDTH=10,e.PROP_HEADER_HEIGHT="headerHeight",e.PROP_GROUP_REMOVE_SINGLE_CHILDREN="groupRemoveSingleChildren",e.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN="groupRemoveLowestSingleChildren",e.PROP_PIVOT_HEADER_HEIGHT="pivotHeaderHeight",e.PROP_SUPPRESS_CLIPBOARD_PASTE="suppressClipboardPaste",e.PROP_GROUP_HEADER_HEIGHT="groupHeaderHeight",e.PROP_PIVOT_GROUP_HEADER_HEIGHT="pivotGroupHeaderHeight",e.PROP_NAVIGATE_TO_NEXT_CELL="navigateToNextCell",e.PROP_TAB_TO_NEXT_CELL="tabToNextCell",e.PROP_NAVIGATE_TO_NEXT_HEADER="navigateToNextHeader",e.PROP_TAB_TO_NEXT_HEADER="tabToNextHeader",e.PROP_IS_EXTERNAL_FILTER_PRESENT="isExternalFilterPresent",e.PROP_DOES_EXTERNAL_FILTER_PASS="doesExternalFilterPass",e.PROP_FLOATING_FILTERS_HEIGHT="floatingFiltersHeight",e.PROP_SUPPRESS_ROW_CLICK_SELECTION="suppressRowClickSelection",e.PROP_SUPPRESS_ROW_DRAG="suppressRowDrag",e.PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG="suppressMoveWhenRowDragging",e.PROP_GET_ROW_CLASS="getRowClass",e.PROP_GET_ROW_STYLE="getRowStyle",e.PROP_GET_ROW_HEIGHT="getRowHeight",e.PROP_POPUP_PARENT="popupParent",e.PROP_DOM_LAYOUT="domLayout",e.PROP_FILL_HANDLE_DIRECTION="fillHandleDirection",e.PROP_GROUP_ROW_AGG_NODES="groupRowAggNodes",e.PROP_GET_BUSINESS_KEY_FOR_NODE="getBusinessKeyForNode",e.PROP_GET_CHILD_COUNT="getChildCount",e.PROP_PROCESS_ROW_POST_CREATE="processRowPostCreate",e.PROP_GET_ROW_NODE_ID="getRowNodeId",e.PROP_IS_FULL_WIDTH_CELL="isFullWidthCell",e.PROP_IS_ROW_SELECTABLE="isRowSelectable",e.PROP_IS_ROW_MASTER="isRowMaster",e.PROP_POST_SORT="postSort",e.PROP_GET_DOCUMENT="getDocument",e.PROP_POST_PROCESS_POPUP="postProcessPopup",e.PROP_DEFAULT_GROUP_ORDER_COMPARATOR="defaultGroupOrderComparator",e.PROP_PAGINATION_NUMBER_FORMATTER="paginationNumberFormatter",e.PROP_GET_CONTEXT_MENU_ITEMS="getContextMenuItems",e.PROP_GET_MAIN_MENU_ITEMS="getMainMenuItems",e.PROP_PROCESS_CELL_FOR_CLIPBOARD="processCellForClipboard",e.PROP_PROCESS_CELL_FROM_CLIPBOARD="processCellFromClipboard",e.PROP_SEND_TO_CLIPBOARD="sendToClipboard",e.PROP_PROCESS_TO_SECONDARY_COLDEF="processSecondaryColDef",e.PROP_PROCESS_SECONDARY_COL_GROUP_DEF="processSecondaryColGroupDef",e.PROP_GET_CHART_TOOLBAR_ITEMS="getChartToolbarItems",e.PROP_GET_SERVER_SIDE_STORE_PARAMS="getServerSideStoreParams",e.PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT="isServerSideGroupOpenByDefault",e.PROP_IS_APPLY_SERVER_SIDE_TRANSACTION="isApplyServerSideTransaction",e.PROP_IS_SERVER_SIDE_GROUP="isServerSideGroup",e.PROP_GET_SERVER_SIDE_GROUP_KEY="getServerSideGroupKey",Ya([de("gridOptions")],e.prototype,"gridOptions",void 0),Ya([de("eventService")],e.prototype,"eventService",void 0),Ya([de("environment")],e.prototype,"environment",void 0),Ya([Xa(0,ge("gridApi")),Xa(1,ge("columnApi"))],e.prototype,"agWire",null),Ya([ue],e.prototype,"destroy",null),Ya([ce],e.prototype,"init",null),e=n=Ya([pe("gridOptionsWrapper")],e)}(),ts=function(){function e(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}return e.prototype.setInactive=function(){this.active=!1},e.prototype.isActive=function(){return this.active},e.prototype.depthFirstSearchChangedPath=function(e,t){if(e.children)for(var n=0;n<e.children.length;n++)this.depthFirstSearchChangedPath(e.children[n],t);t(e.rowNode)},e.prototype.depthFirstSearchEverything=function(e,t,n){if(e.childrenAfterGroup)for(var r=0;r<e.childrenAfterGroup.length;r++){var o=e.childrenAfterGroup[r];o.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[r],t,n):n&&t(o)}t(e)},e.prototype.forEachChangedNodeDepthFirst=function(e,t){void 0===t&&(t=!1),this.active?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)},e.prototype.executeFromRootNode=function(e){e(this.pathRoot.rowNode)},e.prototype.createPathItems=function(e){for(var t=e,n=0;!this.mapToItems[t.id];){var r={rowNode:t,children:null};this.mapToItems[t.id]=r,n++,t=t.parent}return n},e.prototype.populateColumnsMap=function(e,t){var n=this;if(this.keepingColumns&&t)for(var r=e;r;)this.nodeIdsToColumns[r.id]||(this.nodeIdsToColumns[r.id]={}),t.forEach((function(e){return n.nodeIdsToColumns[r.id][e.getId()]=!0})),r=r.parent},e.prototype.linkPathItems=function(e,t){for(var n=e,r=0;r<t;r++){var o=this.mapToItems[n.id],i=this.mapToItems[n.parent.id];i.children||(i.children=[]),i.children.push(o),n=n.parent}},e.prototype.addParentNode=function(e,t){if(e&&!e.isRowPinned()){var n=this.createPathItems(e);this.linkPathItems(e,n),this.populateColumnsMap(e,t)}},e.prototype.canSkip=function(e){return this.active&&!this.mapToItems[e.id]},e.prototype.getValueColumnsForNode=function(e,t){if(!this.keepingColumns)return t;var n=this.nodeIdsToColumns[e.id];return t.filter((function(e){return n[e.getId()]}))},e.prototype.getNotValueColumnsForNode=function(e,t){if(!this.keepingColumns)return null;var n=this.nodeIdsToColumns[e.id];return t.filter((function(e){return!n[e.getId()]}))},e}(),ns=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rs=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},os=function(e,t){return function(n,r){t(n,r,e)}},is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ns(t,e),t.prototype.setBeans=function(e){this.logger=e.create("selectionService"),this.reset(),this.gridOptionsWrapper.isRowModelDefault()&&this.addManagedListener(this.eventService,Ke.EVENT_ROW_DATA_CHANGED,this.reset.bind(this))},t.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsWrapper.isGroupSelectsChildren(),this.addManagedListener(this.eventService,Ke.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))},t.prototype.setLastSelectedNode=function(e){this.lastSelectedNode=e},t.prototype.getLastSelectedNode=function(){return this.lastSelectedNode},t.prototype.getSelectedNodes=function(){var e=[];return k(this.selectedNodes,(function(t,n){n&&e.push(n)})),e},t.prototype.getSelectedRows=function(){var e=[];return k(this.selectedNodes,(function(t,n){n&&n.data&&e.push(n.data)})),e},t.prototype.removeGroupsFromSelection=function(){var e=this;k(this.selectedNodes,(function(t,n){n&&n.group&&(e.selectedNodes[n.id]=void 0)}))},t.prototype.updateGroupsFromChildrenSelections=function(e){if(this.gridOptionsWrapper.isGroupSelectsChildren()&&this.rowModel.getType()===Ce.ROW_MODEL_TYPE_CLIENT_SIDE){var t=this.rowModel.getRootNode();e||(e=new ts(!0,t)).setInactive(),e.forEachChangedNodeDepthFirst((function(e){e!==t&&e.calculateSelectedFromChildren()}))}},t.prototype.getNodeForIdIfSelected=function(e){return this.selectedNodes[e]},t.prototype.clearOtherNodes=function(e){var t=this,n={},r=0;return k(this.selectedNodes,(function(o,i){if(i&&i.id!==e.id){var a=t.selectedNodes[i.id];r+=a.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0}),t.groupSelectsChildren&&i.parent&&(n[i.parent.id]=i.parent)}})),k(n,(function(e,t){t.calculateSelectedFromChildren()})),r},t.prototype.onRowSelected=function(e){var t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes[t.id]=t:this.selectedNodes[t.id]=void 0)},t.prototype.syncInRowNode=function(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)},t.prototype.syncInOldRowNode=function(e,t){if(o(t)&&e.id!==t.id&&t){var n=t.id;this.selectedNodes[n]==e&&(this.selectedNodes[t.id]=t)}},t.prototype.syncInNewRowNode=function(e){o(this.selectedNodes[e.id])?(e.setSelectedInitialValue(!0),this.selectedNodes[e.id]=e):e.setSelectedInitialValue(!1)},t.prototype.reset=function(){this.logger.log("reset"),this.selectedNodes={},this.lastSelectedNode=null},t.prototype.getBestCostNodeSelection=function(){if(this.rowModel.getType()===Ce.ROW_MODEL_TYPE_CLIENT_SIDE){var e=this.rowModel.getTopLevelNodes();if(null!==e){var t=[];return function e(n){for(var r=0,o=n.length;r<o;r++){var i=n[r];if(i.isSelected())t.push(i);else{var a=i;a.group&&a.children&&e(a.children)}}}(e),t}console.warn("selectAll not available doing rowModel=virtual")}else console.warn("getBestCostNodeSelection is only available when using normal row model")},t.prototype.setRowModel=function(e){this.rowModel=e},t.prototype.isEmpty=function(){var e=0;return k(this.selectedNodes,(function(t,n){n&&e++})),0===e},t.prototype.deselectAllRowNodes=function(e){void 0===e&&(e=!1);var t=function(e){return e.selectThisNode(!1)},n=this.rowModel.getType()===Ce.ROW_MODEL_TYPE_CLIENT_SIDE;if(e){if(!n)return void console.error("AG Grid: selecting just filtered only works with In Memory Row Model");this.rowModel.forEachNodeAfterFilter(t)}else k(this.selectedNodes,(function(e,n){n&&t(n)})),this.reset();n&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var r={type:Ke.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)},t.prototype.selectAllRowNodes=function(e){if(void 0===e&&(e=!1),this.rowModel.getType()!==Ce.ROW_MODEL_TYPE_CLIENT_SIDE)throw new Error("selectAll only available with normal row model, ie not "+this.rowModel.getType());var t=this.rowModel,n=function(e){return e.selectThisNode(!0)};e?t.forEachNodeAfterFilter(n):t.forEachNode(n),this.rowModel.getType()===Ce.ROW_MODEL_TYPE_CLIENT_SIDE&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var r={type:Ke.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)},t.prototype.selectNode=function(e,t){e&&e.setSelectedParams({newValue:!0,clearSelection:!t})},t.prototype.deselectIndex=function(e){var t=this.rowModel.getRow(e);this.deselectNode(t)},t.prototype.deselectNode=function(e){e&&e.setSelectedParams({newValue:!1,clearSelection:!1})},t.prototype.selectIndex=function(e,t){var n=this.rowModel.getRow(e);this.selectNode(n,t)},rs([de("rowModel")],t.prototype,"rowModel",void 0),rs([de("columnApi")],t.prototype,"columnApi",void 0),rs([de("gridApi")],t.prototype,"gridApi",void 0),rs([os(0,ge("loggerFactory"))],t.prototype,"setBeans",null),rs([ce],t.prototype,"init",null),t=rs([pe("selectionService")],t)}(ze),as=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ss=function(){function e(){}return e.prototype.sizeColumnsToFit=function(e){"undefined"===typeof e&&console.error("AG Grid: missing parameter to columnApi.sizeColumnsToFit(gridWidth)"),this.columnModel.sizeColumnsToFit(e,"api")},e.prototype.setColumnGroupOpened=function(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")},e.prototype.getColumnGroup=function(e,t){return this.columnModel.getColumnGroup(e,t)},e.prototype.getOriginalColumnGroup=function(e){return this.columnModel.getOriginalColumnGroup(e)},e.prototype.getDisplayNameForColumn=function(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""},e.prototype.getColumn=function(e){return this.columnModel.getPrimaryColumn(e)},e.prototype.applyColumnState=function(e){return this.columnModel.applyColumnState(e,"api")},e.prototype.getColumnState=function(){return this.columnModel.getColumnState()},e.prototype.resetColumnState=function(){this.columnModel.resetColumnState("api")},e.prototype.getColumnGroupState=function(){return this.columnModel.getColumnGroupState()},e.prototype.setColumnGroupState=function(e){this.columnModel.setColumnGroupState(e,"api")},e.prototype.resetColumnGroupState=function(){this.columnModel.resetColumnGroupState("api")},e.prototype.isPinning=function(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()},e.prototype.isPinningLeft=function(){return this.columnModel.isPinningLeft()},e.prototype.isPinningRight=function(){return this.columnModel.isPinningRight()},e.prototype.getDisplayedColAfter=function(e){return this.columnModel.getDisplayedColAfter(e)},e.prototype.getDisplayedColBefore=function(e){return this.columnModel.getDisplayedColBefore(e)},e.prototype.setColumnVisible=function(e,t){this.columnModel.setColumnVisible(e,t,"api")},e.prototype.setColumnsVisible=function(e,t){this.columnModel.setColumnsVisible(e,t,"api")},e.prototype.setColumnPinned=function(e,t){this.columnModel.setColumnPinned(e,t,"api")},e.prototype.setColumnsPinned=function(e,t){this.columnModel.setColumnsPinned(e,t,"api")},e.prototype.getAllColumns=function(){return this.columnModel.getAllPrimaryColumns()},e.prototype.getAllGridColumns=function(){return this.columnModel.getAllGridColumns()},e.prototype.getDisplayedLeftColumns=function(){return this.columnModel.getDisplayedLeftColumns()},e.prototype.getDisplayedCenterColumns=function(){return this.columnModel.getDisplayedCenterColumns()},e.prototype.getDisplayedRightColumns=function(){return this.columnModel.getDisplayedRightColumns()},e.prototype.getAllDisplayedColumns=function(){return this.columnModel.getAllDisplayedColumns()},e.prototype.getAllDisplayedVirtualColumns=function(){return this.columnModel.getViewportColumns()},e.prototype.moveColumn=function(e,t){"number"===typeof e?(console.warn("AG Grid: you are using moveColumn(fromIndex, toIndex) - moveColumn takes a column key and a destination index, not two indexes, to move with indexes use moveColumnByIndex(from,to) instead"),this.columnModel.moveColumnByIndex(e,t,"api")):this.columnModel.moveColumn(e,t,"api")},e.prototype.moveColumnByIndex=function(e,t){this.columnModel.moveColumnByIndex(e,t,"api")},e.prototype.moveColumns=function(e,t){this.columnModel.moveColumns(e,t,"api")},e.prototype.moveRowGroupColumn=function(e,t){this.columnModel.moveRowGroupColumn(e,t)},e.prototype.setColumnAggFunc=function(e,t){this.columnModel.setColumnAggFunc(e,t)},e.prototype.setColumnWidth=function(e,t,n,r){void 0===n&&(n=!0),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,n,r)},e.prototype.setColumnWidths=function(e,t,n){void 0===t&&(t=!0),this.columnModel.setColumnWidths(e,!1,t,n)},e.prototype.setPivotMode=function(e){this.columnModel.setPivotMode(e)},e.prototype.isPivotMode=function(){return this.columnModel.isPivotMode()},e.prototype.getSecondaryPivotColumn=function(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)},e.prototype.setValueColumns=function(e){this.columnModel.setValueColumns(e,"api")},e.prototype.getValueColumns=function(){return this.columnModel.getValueColumns()},e.prototype.removeValueColumn=function(e){this.columnModel.removeValueColumn(e,"api")},e.prototype.removeValueColumns=function(e){this.columnModel.removeValueColumns(e,"api")},e.prototype.addValueColumn=function(e){this.columnModel.addValueColumn(e,"api")},e.prototype.addValueColumns=function(e){this.columnModel.addValueColumns(e,"api")},e.prototype.setRowGroupColumns=function(e){this.columnModel.setRowGroupColumns(e,"api")},e.prototype.removeRowGroupColumn=function(e){this.columnModel.removeRowGroupColumn(e,"api")},e.prototype.removeRowGroupColumns=function(e){this.columnModel.removeRowGroupColumns(e,"api")},e.prototype.addRowGroupColumn=function(e){this.columnModel.addRowGroupColumn(e,"api")},e.prototype.addRowGroupColumns=function(e){this.columnModel.addRowGroupColumns(e,"api")},e.prototype.getRowGroupColumns=function(){return this.columnModel.getRowGroupColumns()},e.prototype.setPivotColumns=function(e){this.columnModel.setPivotColumns(e,"api")},e.prototype.removePivotColumn=function(e){this.columnModel.removePivotColumn(e,"api")},e.prototype.removePivotColumns=function(e){this.columnModel.removePivotColumns(e,"api")},e.prototype.addPivotColumn=function(e){this.columnModel.addPivotColumn(e,"api")},e.prototype.addPivotColumns=function(e){this.columnModel.addPivotColumns(e,"api")},e.prototype.getPivotColumns=function(){return this.columnModel.getPivotColumns()},e.prototype.getLeftDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeLeft()},e.prototype.getCenterDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeCentre()},e.prototype.getRightDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeRight()},e.prototype.getAllDisplayedColumnGroups=function(){return this.columnModel.getAllDisplayedTrees()},e.prototype.autoSizeColumn=function(e,t){return this.columnModel.autoSizeColumn(e,t,"api")},e.prototype.autoSizeColumns=function(e,t){return this.columnModel.autoSizeColumns(e,t,"api")},e.prototype.autoSizeAllColumns=function(e){this.columnModel.autoSizeAllColumns(e,"api")},e.prototype.setSecondaryColumns=function(e){this.columnModel.setSecondaryColumns(e,"api")},e.prototype.getSecondaryColumns=function(){return this.columnModel.getSecondaryColumns()},e.prototype.getPrimaryColumns=function(){return this.columnModel.getAllPrimaryColumns()},e.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid=function(){setTimeout(Xr.removeAllReferences.bind(window,this,"Column API"),100)},e.prototype.columnGroupOpened=function(e,t){console.error("AG Grid: columnGroupOpened no longer exists, use setColumnGroupOpened"),this.setColumnGroupOpened(e,t)},e.prototype.hideColumns=function(e,t){console.error("AG Grid: hideColumns is deprecated, use setColumnsVisible"),this.columnModel.setColumnsVisible(e,!t,"api")},e.prototype.hideColumn=function(e,t){console.error("AG Grid: hideColumn is deprecated, use setColumnVisible"),this.columnModel.setColumnVisible(e,!t,"api")},e.prototype.setState=function(e){return console.error("AG Grid: setState is deprecated, use setColumnState"),this.setColumnState(e)},e.prototype.getState=function(){return console.error("AG Grid: getState is deprecated, use getColumnState"),this.getColumnState()},e.prototype.resetState=function(){console.error("AG Grid: resetState is deprecated, use resetColumnState"),this.resetColumnState()},e.prototype.getAggregationColumns=function(){return console.error("AG Grid: getAggregationColumns is deprecated, use getValueColumns"),this.columnModel.getValueColumns()},e.prototype.removeAggregationColumn=function(e){console.error("AG Grid: removeAggregationColumn is deprecated, use removeValueColumn"),this.columnModel.removeValueColumn(e,"api")},e.prototype.removeAggregationColumns=function(e){console.error("AG Grid: removeAggregationColumns is deprecated, use removeValueColumns"),this.columnModel.removeValueColumns(e,"api")},e.prototype.addAggregationColumn=function(e){console.error("AG Grid: addAggregationColumn is deprecated, use addValueColumn"),this.columnModel.addValueColumn(e,"api")},e.prototype.addAggregationColumns=function(e){console.error("AG Grid: addAggregationColumns is deprecated, use addValueColumns"),this.columnModel.addValueColumns(e,"api")},e.prototype.setColumnAggFunction=function(e,t){console.error("AG Grid: setColumnAggFunction is deprecated, use setColumnAggFunc"),this.columnModel.setColumnAggFunc(e,t,"api")},e.prototype.getDisplayNameForCol=function(e){return console.error("AG Grid: getDisplayNameForCol is deprecated, use getDisplayNameForColumn"),this.getDisplayNameForColumn(e,null)},e.prototype.setColumnState=function(e){return console.error("AG Grid: setColumnState is deprecated, use applyColumnState"),this.columnModel.applyColumnState({state:e,applyOrder:!0},"api")},as([de("columnModel")],e.prototype,"columnModel",void 0),as([ue],e.prototype,"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid",null),e=as([pe("columnApi")],e)}();(Za=t.SelectionHandleType||(t.SelectionHandleType={}))[Za.FILL=0]="FILL",Za[Za.RANGE=1]="RANGE",(Ja=t.CellRangeType||(t.CellRangeType={}))[Ja.VALUE=0]="VALUE",Ja[Ja.DIMENSION=1]="DIMENSION";var ls,cs="ag-cell-range-selected",us=function(){function e(e,t){this.beans=e,this.cellCtrl=t}return e.prototype.setComp=function(e){this.cellComp=e,this.onRangeSelectionChanged()},e.prototype.onRangeSelectionChanged=function(){this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(cs,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass("ag-cell-range-selected-1",1===this.rangeCount),this.cellComp.addOrRemoveCssClass("ag-cell-range-selected-2",2===this.rangeCount),this.cellComp.addOrRemoveCssClass("ag-cell-range-selected-3",3===this.rangeCount),this.cellComp.addOrRemoveCssClass("ag-cell-range-selected-4",this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),this.cellComp.setAriaSelected(this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle()},e.prototype.updateRangeBorders=function(){var e=this.getRangeBorders(),t=this.isSingleCell(),n=!t&&e.top,r=!t&&e.right,o=!t&&e.bottom,i=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",n),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",r),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",o),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",i)},e.prototype.isSingleCell=function(){var e=this.beans.rangeService;return 1===this.rangeCount&&e&&!e.isMoreThanOneCell()},e.prototype.getHasChartRange=function(){var e=this.beans.rangeService;if(!this.rangeCount||!e)return!1;var n=e.getCellRanges();return n.length>0&&n.every((function(e){return S([t.CellRangeType.DIMENSION,t.CellRangeType.VALUE],e.type)}))},e.prototype.updateRangeBordersIfRangeCount=function(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())},e.prototype.getRangeBorders=function(){var e,t,n=this,r=this.beans.gridOptionsWrapper.isEnableRtl(),o=!1,i=!1,a=!1,s=!1,l=this.cellCtrl.getCellPosition().column,c=this.beans,u=c.rangeService,p=c.columnModel;r?(e=p.getDisplayedColAfter(l),t=p.getDisplayedColBefore(l)):(e=p.getDisplayedColBefore(l),t=p.getDisplayedColAfter(l));var d=u.getCellRanges().filter((function(e){return u.isCellInSpecificRange(n.cellCtrl.getCellPosition(),e)}));e||(s=!0),t||(i=!0);for(var h=0;h<d.length&&!(o&&i&&a&&s);h++){var f=d[h],g=u.getRangeStartRow(f),v=u.getRangeEndRow(f);!o&&this.beans.rowPositionUtils.sameRow(g,this.cellCtrl.getCellPosition())&&(o=!0),!a&&this.beans.rowPositionUtils.sameRow(v,this.cellCtrl.getCellPosition())&&(a=!0),!s&&e&&f.columns.indexOf(e)<0&&(s=!0),!i&&t&&f.columns.indexOf(t)<0&&(i=!0)}return{top:o,right:i,bottom:a,left:s}},e.prototype.refreshHandle=function(){if(this.beans.rangeService){var e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle)}},e.prototype.shouldHaveSelectionHandle=function(){var e=this.beans,n=e.gridOptionsWrapper,r=e.rangeService,o=r.getCellRanges(),i=o.length;if(this.rangeCount<1||i<1)return!1;var a=v(o),s=this.cellCtrl.getCellPosition(),l=n.isEnableFillHandle()&&!this.cellCtrl.isSuppressFillHandle(),c=n.isEnableRangeHandle(),u=1===i&&!this.cellCtrl.isEditing()&&(l||c);if(this.hasChartRange){var p=o[0].type===t.CellRangeType.DIMENSION&&r.isCellInSpecificRange(s,o[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",p),u=a.type===t.CellRangeType.VALUE}return u&&null!=a.endRow&&r.isContiguousRange(a)&&r.isBottomRightCell(a,s)},e.prototype.addSelectionHandle=function(){var e=this.beans,n=e.gridOptionsWrapper,r=v(e.rangeService.getCellRanges()).type,o=n.isEnableFillHandle()&&i(r)?t.SelectionHandleType.FILL:t.SelectionHandleType.RANGE;this.selectionHandle&&this.selectionHandle.getType()!==o&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.beans.selectionHandleFactory.createSelectionHandle(o)),this.selectionHandle.refresh(this.cellCtrl)},e.prototype.destroy=function(){this.beans.context.destroyBean(this.selectionHandle)},e}(),ps=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ds=function(e){function t(t,n){var r=e.call(this)||this;return r.cellCtrl=t,r.beans=n,r.column=t.getColumn(),r.rowNode=t.getRowNode(),r.setupColSpan(),r.setupRowSpan(),r}return ps(t,e),t.prototype.setupRowSpan=function(){this.rowSpan=this.column.getRowSpan(this.rowNode)},t.prototype.setComp=function(e){this.cellComp=e,this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()},t.prototype.onDisplayColumnsChanged=function(){var e=this.getColSpanningList();m(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())},t.prototype.setupColSpan=function(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))},t.prototype.onWidthChanged=function(){if(this.cellComp){var e=this.getCellWidth();this.cellComp.setWidth(e+"px")}},t.prototype.getCellWidth=function(){return this.colsSpanning?this.colsSpanning.reduce((function(e,t){return e+t.getActualWidth()}),0):this.column.getActualWidth()},t.prototype.getColSpanningList=function(){var e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else for(var n=this.column,r=this.column.getPinned(),o=0;n&&o<e&&(t.push(n),(n=this.beans.columnModel.getDisplayedColAfter(n))&&!i(n))&&r===n.getPinned();o++);return t},t.prototype.onLeftChanged=function(){if(this.cellComp){var e=this.modifyLeftForPrintLayout(this.getCellLeft());this.cellComp.setLeft(e+"px")}},t.prototype.getCellLeft=function(){return(this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?v(this.colsSpanning):this.column).getLeft()},t.prototype.modifyLeftForPrintLayout=function(e){if(!this.cellCtrl.isPrintLayout()||this.column.getPinned()===Ce.PINNED_LEFT)return e;var t=this.beans.columnModel.getDisplayedColumnsLeftWidth();return this.column.getPinned()===Ce.PINNED_RIGHT?t+this.beans.columnModel.getBodyContainerWidth()+(e||0):t+(e||0)},t.prototype.applyRowSpan=function(){if(1!==this.rowSpan){var e=this.beans.gridOptionsWrapper.getRowHeightAsNumber()*this.rowSpan;this.cellComp.setHeight(e+"px"),this.cellComp.setZIndex("1")}},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(ze),hs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fs=function(e){function t(t,n){var r=e.call(this)||this;return r.staticClasses=[],r.cellCtrl=t,r.beans=n,r.column=t.getColumn(),r.rowNode=t.getRowNode(),r}return hs(t,e),t.prototype.setComp=function(e,t){this.cellComp=e,this.scope=t,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()},t.prototype.applyCellClassRules=function(){var e=this,t=this.column.getColDef(),n={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:t,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext()};this.beans.stylingService.processClassRules(t.cellClassRules,n,(function(t){return e.cellComp.addOrRemoveCssClass(t,!0)}),(function(t){return e.cellComp.addOrRemoveCssClass(t,!1)}))},t.prototype.applyUserStyles=function(){var e=this.column.getColDef();if(e.cellStyle){var t;if("function"===typeof e.cellStyle){var n={column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex,$scope:this.scope,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()};t=(0,e.cellStyle)(n)}else t=e.cellStyle;this.cellComp.setUserStyles(t)}},t.prototype.applyClassesFromColDef=function(){var e=this,t=this.column.getColDef(),n={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:t,rowIndex:this.rowNode.rowIndex,$scope:this.scope,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()};this.staticClasses.length&&this.staticClasses.forEach((function(t){return e.cellComp.addOrRemoveCssClass(t,!1)})),this.staticClasses=this.beans.stylingService.getStaticCellClasses(t,n),this.staticClasses.length&&this.staticClasses.forEach((function(t){return e.cellComp.addOrRemoveCssClass(t,!0)}))},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(ze),gs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vs=function(e){function t(t,n){var r=e.call(this)||this;return r.ctrl=t,r.beans=n,r}return gs(t,e),t.prototype.setComp=function(e){this.comp=e,this.setupTooltip()},t.prototype.setupTooltip=function(){this.browserTooltips=this.beans.gridOptionsWrapper.isEnableBrowserTooltips(),this.updateTooltipText(),this.browserTooltips?this.comp.setTitle(null!=this.tooltipSanatised?this.tooltipSanatised:void 0):this.createTooltipFeatureIfNeeded()},t.prototype.updateTooltipText=function(){this.tooltip=this.ctrl.getTooltipValue(),this.tooltipSanatised=ot(this.tooltip)},t.prototype.createTooltipFeatureIfNeeded=function(){var e=this;if(null==this.genericTooltipFeature){var t={getTooltipParams:function(){return e.getTooltipParams()},getGui:function(){return e.ctrl.getGui()}};this.genericTooltipFeature=this.createManagedBean(new to(t),this.beans.context)}},t.prototype.refreshToolTip=function(){this.updateTooltipText(),this.browserTooltips&&this.comp.setTitle(null!=this.tooltipSanatised?this.tooltipSanatised:void 0)},t.prototype.getTooltipParams=function(){var e=this.ctrl,t=e.getColumn?e.getColumn():void 0,n=e.getColDef?e.getColDef():void 0,r=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:n,column:t,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:r,data:r?r.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0}},t.prototype.getTooltipText=function(){return this.tooltip},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(ze),ms=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ys=function(){function e(){}return e.prototype.postConstruct=function(){this.doingMasterDetail=this.gridOptionsWrapper.isMasterDetail(),this.gridOptionsWrapper.isRowModelDefault()&&(this.clientSideRowModel=this.rowModel),this.gridOptionsWrapper.isRowModelServerSide()&&(this.serverSideRowModel=this.rowModel)},ms([de("resizeObserverService")],e.prototype,"resizeObserverService",void 0),ms([de("paginationProxy")],e.prototype,"paginationProxy",void 0),ms([de("context")],e.prototype,"context",void 0),ms([de("columnApi")],e.prototype,"columnApi",void 0),ms([de("gridApi")],e.prototype,"gridApi",void 0),ms([de("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),ms([de("expressionService")],e.prototype,"expressionService",void 0),ms([de("rowRenderer")],e.prototype,"rowRenderer",void 0),ms([de("$compile")],e.prototype,"$compile",void 0),ms([de("templateService")],e.prototype,"templateService",void 0),ms([de("valueService")],e.prototype,"valueService",void 0),ms([de("eventService")],e.prototype,"eventService",void 0),ms([de("columnModel")],e.prototype,"columnModel",void 0),ms([de("headerNavigationService")],e.prototype,"headerNavigationService",void 0),ms([de("navigationService")],e.prototype,"navigationService",void 0),ms([de("columnAnimationService")],e.prototype,"columnAnimationService",void 0),ms([he("rangeService")],e.prototype,"rangeService",void 0),ms([de("focusService")],e.prototype,"focusService",void 0),ms([he("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),ms([de("popupService")],e.prototype,"popupService",void 0),ms([de("valueFormatterService")],e.prototype,"valueFormatterService",void 0),ms([de("stylingService")],e.prototype,"stylingService",void 0),ms([de("columnHoverService")],e.prototype,"columnHoverService",void 0),ms([de("userComponentFactory")],e.prototype,"userComponentFactory",void 0),ms([de("userComponentRegistry")],e.prototype,"userComponentRegistry",void 0),ms([de("animationFrameService")],e.prototype,"animationFrameService",void 0),ms([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),ms([de("sortController")],e.prototype,"sortController",void 0),ms([de("filterManager")],e.prototype,"filterManager",void 0),ms([de("rowContainerHeightService")],e.prototype,"rowContainerHeightService",void 0),ms([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),ms([de("cellPositionUtils")],e.prototype,"cellPositionUtils",void 0),ms([de("rowPositionUtils")],e.prototype,"rowPositionUtils",void 0),ms([de("selectionService")],e.prototype,"selectionService",void 0),ms([he("selectionHandleFactory")],e.prototype,"selectionHandleFactory",void 0),ms([de("rowCssClassCalculator")],e.prototype,"rowCssClassCalculator",void 0),ms([de("rowModel")],e.prototype,"rowModel",void 0),ms([de("ctrlsService")],e.prototype,"ctrlsService",void 0),ms([de("ctrlsFactory")],e.prototype,"ctrlsFactory",void 0),ms([de("agStackComponentsRegistry")],e.prototype,"agStackComponentsRegistry",void 0),ms([de("valueCache")],e.prototype,"valueCache",void 0),ms([de("rowNodeEventThrottle")],e.prototype,"rowNodeEventThrottle",void 0),ms([ce],e.prototype,"postConstruct",null),e=ms([pe("beans")],e)}(),bs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ws=function(e){function t(t,n,r){var o=e.call(this)||this;return o.cellCtrl=t,o.beans=n,o.column=r,o}return bs(t,e),t.prototype.onMouseEvent=function(e,t){if(!Me(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}},t.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();var t=this.beans,n=t.eventService,r=t.gridOptionsWrapper,o=this.cellCtrl.createEvent(e,Ke.EVENT_CELL_CLICKED);n.dispatchEvent(o);var i=this.column.getColDef();i.onCellClicked&&window.setTimeout((function(){return i.onCellClicked(o)}),0),(r.isSingleClickEdit()||i.singleClickEdit)&&!r.isSuppressClickEdit()&&this.cellCtrl.startRowOrCellEdit()},t.prototype.isDoubleClickOnIPad=function(){if(!Jt()||Ie("dblclick"))return!1;var e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t},t.prototype.onCellDoubleClicked=function(e){var t=this.column.getColDef(),n=this.cellCtrl.createEvent(e,Ke.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(n),"function"===typeof t.onCellDoubleClicked&&window.setTimeout((function(){return t.onCellDoubleClicked(n)}),0),!this.beans.gridOptionsWrapper.isSingleClickEdit()&&!this.beans.gridOptionsWrapper.isSuppressClickEdit()&&this.cellCtrl.startRowOrCellEdit()},t.prototype.onMouseDown=function(e){var t=e.ctrlKey,n=e.metaKey,r=e.shiftKey,o=e.target,i=this.beans,a=i.eventService,s=i.rangeService;if(!this.isRightClickInExistingRange(e)){var l=s&&0!=s.getCellRanges().length;if(!r||!l){var c=(qt()||Kt())&&!this.cellCtrl.isEditing()&&!fn(o);this.cellCtrl.focusCell(c)}if(r&&l&&e.preventDefault(),!this.containsWidget(o)){if(s){var u=this.cellCtrl.getCellPosition();if(r)s.extendLatestRangeToCell(u);else{var p=t||n;s.setRangeToCell(u,p)}}a.dispatchEvent(this.cellCtrl.createEvent(e,Ke.EVENT_CELL_MOUSE_DOWN))}}},t.prototype.isRightClickInExistingRange=function(e){var t=this.beans.rangeService;if(t&&(t.isCellInAnyRange(this.cellCtrl.getCellPosition())&&2===e.button))return!0;return!1},t.prototype.containsWidget=function(e){return yn(e,"ag-selection-checkbox",3)},t.prototype.onMouseOut=function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,Ke.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}},t.prototype.onMouseOver=function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,Ke.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}},t.prototype.mouseStayingInsideCell=function(e){if(!e.target||!e.relatedTarget)return!1;var t=this.cellCtrl.getGui(),n=t.contains(e.target),r=t.contains(e.relatedTarget);return n&&r},t.prototype.destroy=function(){},t}(ys),Cs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xs=function(e){function t(t,n,r,o,i,a){var s=e.call(this)||this;return s.cellCtrl=t,s.beans=n,s.column=r,s.rowNode=o,s.rowCtrl=a,s}return Cs(t,e),t.prototype.setComp=function(e){this.eGui=e},t.prototype.onKeyDown=function(e){var t=e.which||e.keyCode;switch(t){case mo.ENTER:this.onEnterKeyDown(e);break;case mo.F2:this.onF2KeyDown();break;case mo.ESCAPE:this.onEscapeKeyDown();break;case mo.TAB:this.onTabKeyDown(e);break;case mo.BACKSPACE:case mo.DELETE:this.onBackspaceOrDeleteKeyPressed(t);break;case mo.DOWN:case mo.UP:case mo.RIGHT:case mo.LEFT:this.onNavigationKeyPressed(e,t)}},t.prototype.onNavigationKeyPressed=function(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(t):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())},t.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeService){var t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}},t.prototype.onTabKeyDown=function(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)},t.prototype.onBackspaceOrDeleteKeyPressed=function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(e)},t.prototype.onEnterKeyDown=function(e){this.cellCtrl.isEditing()||this.rowCtrl.isEditing()?this.cellCtrl.stopEditingAndFocus():this.beans.gridOptionsWrapper.isEnterMovesDown()?this.beans.navigationService.navigateToNextCell(null,mo.DOWN,this.cellCtrl.getCellPosition(),!1):(this.cellCtrl.startRowOrCellEdit(mo.ENTER),this.cellCtrl.isEditing()&&e.preventDefault())},t.prototype.onF2KeyDown=function(){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(mo.F2)},t.prototype.onEscapeKeyDown=function(){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))},t.prototype.onKeyPress=function(e){if(!(Fe(e)!==this.eGui)&&!this.cellCtrl.isEditing()){var t=String.fromCharCode(e.charCode);" "===t?this.onSpaceKeyPressed(e):Lr(e)&&(this.cellCtrl.startRowOrCellEdit(null,t),e.preventDefault())}},t.prototype.onSpaceKeyPressed=function(e){var t=this.beans.gridOptionsWrapper;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){var n=this.rowNode.isSelected(),r=!n;if(r||!t.isSuppressRowDeselection()){var o=this.beans.gridOptionsWrapper.isGroupSelectsFiltered(),i=this.rowNode.setSelectedParams({newValue:r,rangeSelect:e.shiftKey,groupSelectsFiltered:o});void 0===n&&0===i&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:o})}}e.preventDefault()},t.prototype.destroy=function(){},t}(ze),Ss=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Es=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_s=function(e){function t(t,n,r,o){var i=e.call(this,'<div class="ag-drag-handle ag-row-drag" draggable="true"></div>')||this;return i.rowNode=t,i.column=n,i.beans=r,i.eCell=o,i}return Ss(t,e),t.prototype.postConstruct=function(){this.getGui().appendChild(Nr("rowDrag",this.beans.gridOptionsWrapper,null)),this.addGuiEventListener("mousedown",(function(e){e.stopPropagation()})),this.addDragSource(),this.checkVisibility()},t.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))},t.prototype.onDragStart=function(e){var t=this,n=this.column.getColDef().dndSourceOnRowDrag,r=qt();r||e.dataTransfer.setDragImage(this.eCell,0,0);n?n({rowNode:this.rowNode,dragEvent:e}):function(){try{var n=JSON.stringify(t.rowNode.data);r?e.dataTransfer.setData("text",n):(e.dataTransfer.setData("application/json",n),e.dataTransfer.setData("text/plain",n))}catch(o){}}()},t.prototype.checkVisibility=function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)},Es([ce],t.prototype,"postConstruct",null),t}(io),Rs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Os=function(){return Os=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Os.apply(this,arguments)},As="ag-cell-not-inline-editing",Ps=0,Ts=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.suppressRefreshCell=!1,i.column=t,i.rowNode=n,i.beans=r,i.rowCtrl=o,i.instanceId=t.getId()+"-"+Ps++,i.createCellPosition(),i.addFeatures(),i}return Rs(t,e),t.prototype.addFeatures=function(){var e=this;this.cellPositionFeature=new ds(this,this.beans),this.addDestroyFunc((function(){return e.cellPositionFeature.destroy()})),this.cellCustomStyleFeature=new fs(this,this.beans),this.addDestroyFunc((function(){return e.cellCustomStyleFeature.destroy()})),this.cellMouseListenerFeature=new ws(this,this.beans,this.column),this.addDestroyFunc((function(){return e.cellMouseListenerFeature.destroy()})),this.cellKeyboardListenerFeature=new xs(this,this.beans,this.column,this.rowNode,this.scope,this.rowCtrl),this.addDestroyFunc((function(){return e.cellKeyboardListenerFeature.destroy()})),this.beans.rangeService&&this.beans.gridOptionsWrapper.isEnableRangeSelection()&&(this.cellRangeFeature=new us(this.beans,this),this.addDestroyFunc((function(){return e.cellRangeFeature.destroy()}))),this.addTooltipFeature()},t.prototype.addTooltipFeature=function(){var e=this,t={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getRowIndex:function(){return e.cellPosition.rowIndex},getRowNode:function(){return e.rowNode},getGui:function(){return e.getGui()},getLocation:function(){return"cell"},getTooltipValue:function(){var t=e.column.getColDef(),n=e.rowNode.data;if(t.tooltipField&&o(n))return j(n,t.tooltipField,e.column.isTooltipFieldContainsDots());var r=t.tooltipValueGetter;return r?r({location:"cell",api:e.beans.gridOptionsWrapper.getApi(),columnApi:e.beans.gridOptionsWrapper.getColumnApi(),context:e.beans.gridOptionsWrapper.getContext(),colDef:e.column.getColDef(),column:e.column,rowIndex:e.cellPosition.rowIndex,node:e.rowNode,data:e.rowNode.data,value:e.value,valueFormatted:e.valueFormatted}):null},getValueFormatted:function(){return e.valueFormatted}};this.tooltipFeature=new vs(t,this.beans),this.addDestroyFunc((function(){return e.tooltipFeature.destroy()}))},t.prototype.setComp=function(e,t,n,r,o){this.cellComp=e,this.gow=this.beans.gridOptionsWrapper,this.scope=t,this.eGui=n,this.printLayout=r,this.updateAndFormatValue(!0),this.addDomData(),this.onCellFocused(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAriaExpanded(),this.setupAutoHeight();var i=ot(this.column.getId()),a=this.beans.columnModel.getAriaColumnIndex(this.column);this.cellComp.setTabIndex(-1),this.cellComp.setRole("gridcell"),this.cellComp.setAriaColIndex(a),this.cellComp.setColId(i),this.cellComp.setUnselectable(this.beans.gridOptionsWrapper.isEnableCellTextSelection()?null:"on"),this.cellPositionFeature.setComp(e),this.cellCustomStyleFeature.setComp(e,t),this.tooltipFeature.setComp(e),this.cellKeyboardListenerFeature.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e),o&&this.isCellEditable()?this.startEditing():this.showValue()},t.prototype.setupAutoHeight=function(){var e=this;if(this.column.getColDef().autoHeight){var t=function t(n){var r=e.beans.gridOptionsWrapper.getDocument();if(r&&r.contains(e.eGui)||!(n<5)){var o=e.eGui.offsetHeight;e.rowNode.setRowAutoHeight(o,e.column)}else e.beans.frameworkOverrides.setTimeout((function(){return t(n++)}),0)},n=function(){return t(0)};n();var r=this.beans.resizeObserverService.observeResize(this.eGui,n);this.addDestroyFunc((function(){r(),e.rowNode.setRowAutoHeight(void 0,e.column)}))}},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.showValue=function(e){void 0===e&&(e=!1);var t=null!=this.valueFormatted?this.valueFormatted:this.value,n=this.createCellRendererParams(),r=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),n);this.cellComp.setRenderDetails(r,t,e),this.refreshHandle()},t.prototype.setupControlComps=function(){var e=this.column.getColDef();this.includeSelection=this.isIncludeControl(e.checkboxSelection),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource);var t=this.beans.gridOptionsWrapper.isEnableCellTextSelection()||1==this.column.getColDef().autoHeight;this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag),this.cellComp.setForceWrapper(t)},t.prototype.isIncludeControl=function(e){return!(null!=this.rowNode.rowPinned)&&("function"===typeof e||!0===e)},t.prototype.setupAriaExpanded=function(){var e=this,t=this.column.getColDef();if(this.rowNode.isExpandable()){var n=t.showRowGroup,r=this.rowNode.rowGroupColumn,o=!0===n,i=r&&r.getColId()===n;if(o||i){var a=function(){e.cellComp.setAriaExpanded(!!e.rowNode.expanded)};this.addManagedListener(this.rowNode,Qi.EVENT_EXPANDED_CHANGED,a),a()}}},t.prototype.refreshShouldDestroy=function(){var e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(e.checkboxSelection),n=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),r=this.includeDndSource!=this.isIncludeControl(e.dndSource);return t||n||r},t.prototype.startEditing=function(e,t,n){if(void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=!1),this.isCellEditable()&&!this.editing){var r=this.createCellEditorParams(e,t,n),o=this.column.getColDef(),i=this.beans.userComponentFactory.getCellEditorDetails(o,r),a=!!o.cellEditorPopup,s=o.cellEditorPopupPosition;this.setEditing(!0,a),this.cellComp.setEditDetails(i,a,s);var l=this.createEvent(null,Ke.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(l)}},t.prototype.setEditing=function(e,t){void 0===t&&(t=!1),this.editing!==e&&(this.editing=e,this.editingInPopup=t,this.setInlineEditingClass())},t.prototype.stopRowOrCellEdit=function(e){void 0===e&&(e=!1),this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowCtrl.stopRowEditing(e):this.stopEditing(e)},t.prototype.onPopupEditorClosed=function(){this.isEditing()&&this.stopEditingAndFocus()},t.prototype.takeValueFromCellEditor=function(e){var t={newValueExists:!1};if(e)return t;var n=this.cellComp.getCellEditor();return n?n.isCancelAfterEnd&&n.isCancelAfterEnd()?t:{newValue:n.getValue(),newValueExists:!0}:t},t.prototype.saveNewValue=function(e,t){t!==e&&(this.suppressRefreshCell=!0,this.rowNode.setDataValue(this.column,t),this.suppressRefreshCell=!1)},t.prototype.stopEditing=function(e){if(void 0===e&&(e=!1),this.editing){var t=this.takeValueFromCellEditor(e),n=t.newValue,r=t.newValueExists,o=this.getValueFromValueService();r&&this.saveNewValue(o,n),this.setEditing(!1),this.cellComp.setEditDetails(),this.updateAndFormatValue(),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(o,n)}},t.prototype.dispatchEditingStoppedEvent=function(e,t){var n=Os(Os({},this.createEvent(null,Ke.EVENT_CELL_EDITING_STOPPED)),{oldValue:e,newValue:t});this.beans.eventService.dispatchEvent(n)},t.prototype.setInlineEditingClass=function(){if(this.isAlive()){var e=this.editing&&!this.editingInPopup,t=this.editing&&this.editingInPopup;this.cellComp.addOrRemoveCssClass("ag-cell-inline-editing",e),this.cellComp.addOrRemoveCssClass(As,!e),this.cellComp.addOrRemoveCssClass("ag-cell-popup-editing",t),this.rowCtrl.setInlineEditingCss(this.editing)}},t.prototype.hackSayEditingInPopup=function(){this.editingInPopup||(this.editingInPopup=!0,this.setInlineEditingClass())},t.prototype.createCellEditorParams=function(e,t,n){var r={value:this.getValueFromValueService(),keyPress:e,charPress:t,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,api:this.beans.gridOptionsWrapper.getApi(),cellStartedEdit:n,columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)};return this.scope&&(r.$scope=this.scope),r},t.prototype.createCellRendererParams=function(){var e=this,t={value:this.value,valueFormatted:this.valueFormatted,getValue:this.getValueFromValueService.bind(this),setValue:function(t){return e.beans.valueService.setValue(e.rowNode,e.column,t)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:function(t,n,r,o){return e.registerRowDragger(t,n,o)},addRowCompListener:function(t,n){console.warn("AG Grid: since AG Grid v26, params.addRowCompListener() is deprecated. If you need this functionality, please contact AG Grid support and advise why so that we can revert with an appropriate workaround, as we dont have any valid use cases for it. This method was originally provided as a work around to know when cells were destroyed in AG Grid before custom Cell Renderers could be provided."),e.rowCtrl.addEventListener(t,n)}};return this.scope&&(t.$scope=this.scope),t},t.prototype.parseValue=function(e){var t=this.column.getColDef(),n={node:this.rowNode,data:this.rowNode.data,oldValue:this.getValue(),newValue:e,colDef:t,column:this.column,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()},r=t.valueParser;return o(r)?this.beans.expressionService.evaluate(r,n):e},t.prototype.setFocusOutOnEditor=function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusOut&&e.focusOut()}},t.prototype.setFocusInOnEditor=function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusIn?e.focusIn():this.focusCell(!0)}},t.prototype.onCellChanged=function(e){e.column===this.column&&this.refreshCell({})},t.prototype.refreshCell=function(e){if(!this.suppressRefreshCell&&!this.editing){var t=this.column.getColDef(),n=null!=e&&!!e.newData,r=null!=e&&!!e.suppressFlash||!!t.suppressCellFlash,o=null==t.field&&null==t.valueGetter&&null==t.showRowGroup,i=e&&e.forceRefresh||o||n,a=this.updateAndFormatValue();if(i||a){this.showValue(n);var s=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!r&&!s&&(this.beans.gridOptionsWrapper.isEnableCellChangeFlash()||t.enableCellChangeFlash)&&this.flashCell(),this.cellCustomStyleFeature.applyUserStyles(),this.cellCustomStyleFeature.applyClassesFromColDef()}this.refreshToolTip(),this.cellCustomStyleFeature.applyCellClassRules()}},t.prototype.stopEditingAndFocus=function(e){void 0===e&&(e=!1),this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit()},t.prototype.navigateAfterEdit=function(){this.beans.gridOptionsWrapper.isFullRowEdit()||this.beans.gridOptionsWrapper.isEnterMovesDownAfterEdit()&&this.beans.navigationService.navigateToNextCell(null,mo.DOWN,this.getCellPosition(),!1)},t.prototype.flashCell=function(e){var t=e&&e.flashDelay,n=e&&e.fadeDelay;this.animateCell("data-changed",t,n)},t.prototype.animateCell=function(e,t,n){var r=this,i="ag-cell-"+e,a="ag-cell-"+e+"-animation",s=this.beans.gridOptionsWrapper;t||(t=s.getCellFlashDelay()),o(n)||(n=s.getCellFadeDelay()),this.cellComp.addOrRemoveCssClass(i,!0),this.cellComp.addOrRemoveCssClass(a,!1),window.setTimeout((function(){r.cellComp.addOrRemoveCssClass(i,!1),r.cellComp.addOrRemoveCssClass(a,!0),r.cellComp.setTransition("background-color "+n+"ms"),window.setTimeout((function(){r.cellComp.addOrRemoveCssClass(a,!1),r.cellComp.setTransition("transition")}),n)}),t)},t.prototype.onFlashCells=function(e){var t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")},t.prototype.isCellEditable=function(){return this.column.isCellEditable(this.rowNode)},t.prototype.isSuppressFillHandle=function(){return this.column.isSuppressFillHandle()},t.prototype.formatValue=function(e){var t=this.callValueFormatter(e);return null!=t?t:e},t.prototype.callValueFormatter=function(e){return this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,e)},t.prototype.updateAndFormatValue=function(e){void 0===e&&(e=!1);var t=this.value,n=this.valueFormatted;return this.value=this.getValueFromValueService(),this.valueFormatted=this.callValueFormatter(this.value),!!e||(!this.valuesAreEqual(t,this.value)||this.valueFormatted!=n)},t.prototype.valuesAreEqual=function(e,t){var n=this.column.getColDef();return n.equals?n.equals(e,t):e===t},t.prototype.getComp=function(){return this.cellComp},t.prototype.getValueFromValueService=function(){var e=this.rowNode.leafGroup&&this.beans.columnModel.isPivotMode(),t=this.rowNode.group&&this.rowNode.expanded&&!this.rowNode.footer&&!e,n=this.beans.gridOptionsWrapper.isGroupIncludeFooter(),r=this.beans.gridOptionsWrapper.isGroupSuppressBlankHeader(),o=t&&n&&!r;return this.beans.valueService.getValue(this.column,this.rowNode,!1,o)},t.prototype.getValue=function(){return this.value},t.prototype.getValueFormatted=function(){return this.valueFormatted},t.prototype.addDomData=function(){var e=this,n=this.getGui();this.beans.gridOptionsWrapper.setDomData(n,t.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc((function(){return e.beans.gridOptionsWrapper.setDomData(n,t.DOM_DATA_KEY_CELL_CTRL,null)}))},t.prototype.createEvent=function(e,t){var n={type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex};return this.scope&&(n.$scope=this.scope),n},t.prototype.onKeyPress=function(e){this.cellKeyboardListenerFeature.onKeyPress(e)},t.prototype.onKeyDown=function(e){this.cellKeyboardListenerFeature.onKeyDown(e)},t.prototype.onMouseEvent=function(e,t){this.cellMouseListenerFeature.onMouseEvent(e,t)},t.prototype.getGui=function(){return this.eGui},t.prototype.refreshToolTip=function(){this.tooltipFeature.refreshToolTip()},t.prototype.getColSpanningList=function(){return this.cellPositionFeature.getColSpanningList()},t.prototype.onLeftChanged=function(){this.cellPositionFeature.onLeftChanged(),this.refreshAriaIndex()},t.prototype.refreshAriaIndex=function(){var e=this.beans.columnModel.getAriaColumnIndex(this.column);this.cellComp.setAriaColIndex(e)},t.prototype.isSuppressNavigable=function(){return this.column.isSuppressNavigable(this.rowNode)},t.prototype.onWidthChanged=function(){return this.cellPositionFeature.onWidthChanged()},t.prototype.getColumn=function(){return this.column},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getBeans=function(){return this.beans},t.prototype.isPrintLayout=function(){return this.printLayout},t.prototype.appendChild=function(e){this.eGui.appendChild(e)},t.prototype.refreshHandle=function(){this.editing||this.cellRangeFeature&&this.cellRangeFeature.refreshHandle()},t.prototype.getCellPosition=function(){return this.cellPosition},t.prototype.isEditing=function(){return this.editing},t.prototype.startRowOrCellEdit=function(e,t){this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowCtrl.startRowEditing(e,t,this):this.startEditing(e,t,!0)},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getRowPosition=function(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}},t.prototype.updateRangeBordersIfRangeCount=function(){this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()},t.prototype.onRangeSelectionChanged=function(){this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()},t.prototype.isRangeSelectionEnabled=function(){return null!=this.cellRangeFeature},t.prototype.focusCell=function(e){void 0===e&&(e=!1),this.beans.focusService.setFocusedCell(this.getCellPosition().rowIndex,this.column,this.rowNode.rowPinned,e)},t.prototype.onRowIndexChanged=function(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()},t.prototype.onFirstRightPinnedChanged=function(){if(this.cellComp){var e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",e)}},t.prototype.onLastLeftPinnedChanged=function(){if(this.cellComp){var e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",e)}},t.prototype.onCellFocused=function(e){if(this.cellComp){var t=this.beans.focusService.isCellFocused(this.cellPosition);if(this.gow.isSuppressCellSelection()||this.cellComp.addOrRemoveCssClass("ag-cell-focus",t),t&&e&&e.forceBrowserFocus){var n=this.cellComp.getFocusableElement();n.focus(),document.activeElement&&document.activeElement!==document.body||n.focus()}var r=this.beans.gridOptionsWrapper.isFullRowEdit();t||r||!this.editing||this.stopRowOrCellEdit()}},t.prototype.createCellPosition=function(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,column:this.column}},t.prototype.applyStaticCssClasses=function(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass(As,!0);var e=1==this.column.getColDef().autoHeight;this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",e),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!e)},t.prototype.onColumnHover=function(){if(this.cellComp&&this.beans.gridOptionsWrapper.isColumnHoverHighlight()){var e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",e)}},t.prototype.onNewColumnsLoaded=function(){this.cellComp&&(this.setWrapText(),this.editing||this.refreshCell({forceRefresh:!0,suppressFlash:!0}))},t.prototype.setWrapText=function(){var e=1==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",e)},t.prototype.dispatchCellContextMenuEvent=function(e){var t=this.column.getColDef(),n=this.createEvent(e,Ke.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(n),t.onCellContextMenu&&window.setTimeout((function(){return t.onCellContextMenu(n)}),0)},t.prototype.getCellRenderer=function(){return this.cellComp?this.cellComp.getCellRenderer():null},t.prototype.getCellEditor=function(){return this.cellComp?this.cellComp.getCellEditor():null},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.createSelectionCheckbox=function(){var e=new ea;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e},t.prototype.createDndSource=function(){var e=new _s(this.rowNode,this.column,this.beans,this.eGui);return this.beans.context.createBean(e),e},t.prototype.registerRowDragger=function(e,t,n){var r=this;if(this.customRowDragComp)this.customRowDragComp.setDragElement(e,t);else{var o=this.createRowDragComp(e,t,n);o&&(this.customRowDragComp=o,this.addDestroyFunc((function(){return r.beans.context.destroyBean(o)})))}},t.prototype.createRowDragComp=function(e,t,n){var r=this,o=this.beans.gridOptionsWrapper.isPagination(),i=this.beans.gridOptionsWrapper.isRowDragManaged(),a=this.beans.gridOptionsWrapper.isRowModelDefault();if(i){if(!a)return void K((function(){return console.warn("AG Grid: managed row dragging is only allowed in the Client Side Row Model")}),"CellComp.addRowDragging");if(o)return void K((function(){return console.warn("AG Grid: managed row dragging is not possible when doing pagination")}),"CellComp.addRowDragging")}var s=new aa((function(){return r.value}),this.rowNode,this.column,e,t,n);return this.beans.context.createBean(s),s},t.DOM_DATA_KEY_CELL_CTRL="cellCtrl",t}(ze),Ds=function(){return Ds=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ds.apply(this,arguments)},ks=function(){function e(){}return e.createChildScopeOrNull=function(e,t,n){if(!n.isAngularCompileRows())return null;var r=t.$new();r.data=Ds({},e.data),r.rowNode=e,r.context=n.getContext();return{scope:r,scopeDestroyFunc:function(){r.$destroy(),r.data=null,r.rowNode=null,r.context=null}}},e}(),Ns=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ms=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};!function(e){e.Normal="Normal",e.FullWidth="FullWidth",e.FullWidthLoading="FullWidthLoading",e.FullWidthGroup="FullWidthGroup",e.FullWidthDetail="FullWidthDetail"}(ls||(ls={}));var Is,Ls=lt([[ls.FullWidthLoading,"agLoadingCellRenderer"],[ls.FullWidthGroup,"agGroupRowRenderer"],[ls.FullWidthDetail,"agDetailCellRenderer"]]),Fs=lt([[ls.FullWidth,"fullWidthCellRenderer"],[ls.FullWidthLoading,"loadingCellRenderer"],[ls.FullWidthGroup,"groupRowRenderer"],[ls.FullWidthDetail,"detailCellRenderer"]]),Gs=0,Hs=function(e){function n(t,n,r,o,i,a){var s=e.call(this)||this;return s.allRowGuis=[],s.active=!0,s.centerCellCtrls={list:[],map:{}},s.leftCellCtrls={list:[],map:{}},s.rightCellCtrls={list:[],map:{}},s.lastMouseDownOnDragger=!1,s.updateColumnListsPending=!1,s.parentScope=t,s.beans=r,s.rowNode=n,s.paginationPage=s.beans.paginationProxy.getCurrentPage(),s.useAnimationFrameForCreate=i,s.printLayout=a,s.instanceId=n.id+"-"+Gs++,s.setAnimateFlags(o),s.rowFocused=s.beans.focusService.isRowFocused(s.rowNode.rowIndex,s.rowNode.rowPinned),s.setupAngular1Scope(),s.rowLevel=s.beans.rowCssClassCalculator.calculateRowLevel(s.rowNode),s.setRowType(),s.addListeners(),s.setInitialRowTop(),s}return Ns(n,e),n.prototype.getBeans=function(){return this.beans},n.prototype.getInstanceId=function(){return this.instanceId},n.prototype.setComp=function(e,t,n){var r={rowComp:e,element:t,pinned:n};this.allRowGuis.push(r),n===Ce.PINNED_LEFT?this.leftGui=r:n===Ce.PINNED_RIGHT?this.rightGui=r:this.isFullWidth()&&!this.beans.gridOptionsWrapper.isEmbedFullWidthRows()?this.fullWidthGui=r:this.centerGui=r;var o=null!=this.leftGui&&null!=this.rightGui&&null!=this.centerGui,i=null!=this.fullWidthGui;(o||i)&&this.initialiseRowComps()},n.prototype.isCacheable=function(){return this.rowType===ls.FullWidthDetail&&this.beans.gridOptionsWrapper.isKeepDetailRows()},n.prototype.setCached=function(e){var t=e?"none":void 0;this.allRowGuis.forEach((function(e){return e.rowComp.setDisplay(t)}))},n.prototype.initialiseRowComps=function(){var e=this,t=this.beans.gridOptionsWrapper;this.onRowHeightChanged(),this.updateRowIndexes(),this.setFocusedClasses(),this.setStylesFromGridOptions(),t.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(),this.updateColumnLists(!this.useAnimationFrameForCreate),this.slideRowIn&&te(this.onTopChanged.bind(this)),this.fadeRowIn&&te((function(){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}))}));var r=this.getRowBusinessKey(),o=ot(this.rowNode.id),i=ot(r);this.allRowGuis.forEach((function(r){var a=r.rowComp;a.setRole("row"),e.getInitialRowClasses(r.pinned).forEach((function(e){return a.addOrRemoveCssClass(e,!0)})),e.rowNode.group&&a.setAriaExpanded(1==e.rowNode.expanded),null!=o&&a.setRowId(o),null!=i&&a.setRowBusinessKey(i),e.isFullWidth()&&a.setTabIndex(-1),t.setDomData(r.element,n.DOM_DATA_KEY_ROW_CTRL,e),e.addDestroyFunc((function(){return t.setDomData(r.element,n.DOM_DATA_KEY_ROW_CTRL,null)})),e.useAnimationFrameForCreate?e.beans.animationFrameService.createTask(e.addHoverFunctionality.bind(e,r.element),e.rowNode.rowIndex,"createTasksP2"):e.addHoverFunctionality(r.element),e.isFullWidth()&&e.setupFullWidth(r),t.isRowDragEntireRow()&&e.addRowDraggerToRow(r),e.beans.animationFrameService.addDestroyTask((function(){e.isAlive()&&r.rowComp.addOrRemoveCssClass("ag-after-created",!0)}))})),this.executeProcessRowPostCreateFunc()},n.prototype.addRowDraggerToRow=function(e){if(this.beans.gridOptionsWrapper.isEnableRangeSelection())K((function(){console.warn("AG Grid: Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`")}),"rowDragAndRangeSelectionEnabled");else{var t=new aa((function(){return"1 row"}),this.rowNode,void 0,e.element,void 0,!0);this.createManagedBean(t,this.beans.context)}},n.prototype.getFullWidthCellRendererType=function(){return Fs.get(this.rowType)},n.prototype.getFullWidthCellRendererName=function(){return Ls.get(this.rowType)},n.prototype.setupFullWidth=function(e){var n=this.createFullWidthParams(e.element,e.pinned),r=this.getFullWidthCellRendererType(),o=this.getFullWidthCellRendererName(),i=this.beans.userComponentFactory.getFullWidthCellRendererDetails(n,r,o);if(i)e.rowComp.showFullWidth(i);else{var a=xe.isRegistered(t.ModuleNames.MasterDetailModule);"agDetailCellRenderer"!==o||a?console.error("AG Grid: fullWidthCellRenderer "+o+" not found"):console.warn("AG Grid: cell renderer agDetailCellRenderer (for master detail) not found. Did you forget to include the master detail module?")}},n.prototype.getScope=function(){return this.scope},n.prototype.isPrintLayout=function(){return this.printLayout},n.prototype.setupAngular1Scope=function(){var e=ks.createChildScopeOrNull(this.rowNode,this.parentScope,this.beans.gridOptionsWrapper);e&&(this.scope=e.scope,this.addDestroyFunc(e.scopeDestroyFunc))},n.prototype.getCellElement=function(e){var t=this.getCellCtrl(e);return t?t.getGui():null},n.prototype.executeProcessRowPostCreateFunc=function(){var e=this.beans.gridOptionsWrapper.getProcessRowPostCreateFunc();e&&e({eRow:this.centerGui?this.centerGui.element:void 0,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,api:this.beans.gridOptionsWrapper.getApi(),rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()})},n.prototype.setRowType=function(){var e=this.rowNode.stub,t=this.rowNode.isFullWidthCell(),n=this.beans.doingMasterDetail&&this.rowNode.detail,r=this.beans.columnModel.isPivotMode(),o=!!this.rowNode.group&&!this.rowNode.footer&&this.beans.gridOptionsWrapper.isGroupUseEntireRow(r);this.rowType=e?ls.FullWidthLoading:n?ls.FullWidthDetail:t?ls.FullWidth:o?ls.FullWidthGroup:ls.Normal},n.prototype.updateColumnLists=function(e){var t=this;(void 0===e&&(e=!1),this.isFullWidth())||(e||this.beans.gridOptionsWrapper.isSuppressAnimationFrame()||this.printLayout?this.updateColumnListsImpl():this.updateColumnListsPending||(this.beans.animationFrameService.createTask((function(){t.active&&t.updateColumnListsImpl()}),this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0))},n.prototype.createCellCtrls=function(e,t,n){var r=this;void 0===n&&(n=null);var o={list:[],map:{}},i=function(e,t){o.list.push(t),o.map[e]=t};return t.forEach((function(t){var n=t.getInstanceId(),o=e.map[n];o||(o=new Ts(t,r.rowNode,r.beans,r)),i(n,o)})),e.list.forEach((function(e){null!=o.map[e.getColumn().getInstanceId()]||(!r.isCellEligibleToBeRemoved(e,n)?i(e.getColumn().getInstanceId(),e):e.destroy())})),o},n.prototype.updateColumnListsImpl=function(){var e=this;this.updateColumnListsPending=!1;var t=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{var n=t.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,n);var r=t.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,r,Ce.PINNED_LEFT);var o=t.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,Ce.PINNED_RIGHT)}this.allRowGuis.forEach((function(t){var n=t.pinned===Ce.PINNED_LEFT?e.leftCellCtrls:t.pinned===Ce.PINNED_RIGHT?e.rightCellCtrls:e.centerCellCtrls;t.rowComp.setCellCtrls(n.list)}))},n.prototype.isCellEligibleToBeRemoved=function(e,t){var n=!0;if(e.getColumn().getPinned()!=t)return n;var r=e.isEditing(),o=this.beans.focusService.isCellFocused(e.getCellPosition());if(r||o){var i=e.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(i)>=0)&&n}return n},n.prototype.setAnimateFlags=function(e){if(e){var t=o(this.rowNode.oldRowTop);this.slideRowIn=t,this.fadeRowIn=!t}else this.slideRowIn=!1,this.fadeRowIn=!1},n.prototype.isEditing=function(){return this.editingRow},n.prototype.stopRowEditing=function(e){this.stopEditing(e)},n.prototype.isFullWidth=function(){return this.rowType!==ls.Normal},n.prototype.getRowType=function(){return this.rowType},n.prototype.refreshFullWidth=function(){var e=this,t=function(t,n){if(!t)return!0;var r=t.rowComp.getFullWidthCellRenderer();if(!r)return!1;if(!r.refresh)return!1;var o=e.createFullWidthParams(t.element,n);return r.refresh(o)},n=t(this.fullWidthGui,null),r=t(this.centerGui,null),o=t(this.leftGui,Ce.PINNED_LEFT),i=t(this.rightGui,Ce.PINNED_RIGHT);return n&&r&&o&&i},n.prototype.addListeners=function(){this.addManagedListener(this.rowNode,Qi.EVENT_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_ROW_SELECTED,this.onRowSelected.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,Qi.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var e=this.beans.eventService;this.addManagedListener(e,Ke.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(e,Ke.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(e,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(e,Ke.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(e,Ke.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(e,Ke.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(e,Ke.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(e,Ke.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this)),this.addListenersForCellComps()},n.prototype.onColumnMoved=function(){this.updateColumnLists()},n.prototype.addListenersForCellComps=function(){var e=this;this.addManagedListener(this.rowNode,Qi.EVENT_ROW_INDEX_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onRowIndexChanged()}))})),this.addManagedListener(this.rowNode,Qi.EVENT_CELL_CHANGED,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onCellChanged(t)}))}))},n.prototype.onRowNodeDataChanged=function(e){this.getAllCellCtrls().forEach((function(t){return t.refreshCell({suppressFlash:!e.update,newData:!e.update})})),this.onRowSelected(),this.postProcessCss()},n.prototype.onRowNodeCellChanged=function(){this.postProcessCss()},n.prototype.postProcessCss=function(){this.setStylesFromGridOptions(),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},n.prototype.onRowNodeHighlightChanged=function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach((function(n){var r=e===t.RowHighlightPosition.Above,o=e===t.RowHighlightPosition.Below;n.rowComp.addOrRemoveCssClass("ag-row-highlight-above",r),n.rowComp.addOrRemoveCssClass("ag-row-highlight-below",o)}))},n.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},n.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-dragging",e)}))},n.prototype.updateExpandedCss=function(){var e=this.rowNode.isExpandable(),t=1==this.rowNode.expanded;this.allRowGuis.forEach((function(n){n.rowComp.addOrRemoveCssClass("ag-row-group",e),n.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),n.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),n.rowComp.setAriaExpanded(e&&t)}))},n.prototype.onDisplayedColumnsChanged=function(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()},n.prototype.onVirtualColumnsChanged=function(){this.updateColumnLists()},n.prototype.getRowPosition=function(){return{rowPinned:this.rowNode.rowPinned,rowIndex:this.rowNode.rowIndex}},n.prototype.onKeyboardNavigate=function(e){var t=p(this.allRowGuis,(function(t){return t.element.contains(e.target)}));if((t?t.element:null)===e.target){var n=this.rowNode,r=this.beans.focusService.getFocusedCell(),o={rowIndex:n.rowIndex,rowPinned:n.rowPinned,column:r&&r.column};this.beans.navigationService.navigateToNextCell(e,e.keyCode,o,!0),e.preventDefault()}},n.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented&&!Me(e)){var t=p(this.allRowGuis,(function(t){return t.element.contains(e.target)})),n=t?t.element:null,r=n===e.target,o=null;r||(o=this.beans.focusService.findNextFocusableElement(n,!1,e.shiftKey)),(this.isFullWidth()&&r||!o)&&this.beans.navigationService.onTabKeyDown(this,e)}},n.prototype.onFullWidthRowFocused=function(e){var t=this.rowNode,n=this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned,r=this.fullWidthGui?this.fullWidthGui.element:this.centerGui.element;dn(r,"ag-full-width-focus",n),n&&r.focus({preventScroll:!0})},n.prototype.refreshCell=function(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),this.updateColumnLists()},n.prototype.removeCellCtrl=function(e,t){var n={list:[],map:{}};return e.list.forEach((function(e){e!==t&&(n.list.push(e),n.map[e.getInstanceId()]=e)})),n},n.prototype.onMouseEvent=function(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}},n.prototype.createRowEvent=function(e,t){return{type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),event:t}},n.prototype.createRowEventWithSource=function(e,t){var n=this.createRowEvent(e,t);return n.source=this,n},n.prototype.onRowDblClick=function(e){if(!Me(e)){var t=this.createRowEventWithSource(Ke.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}},n.prototype.onRowMouseDown=function(e){if(this.lastMouseDownOnDragger=yn(e.target,"ag-row-drag",3),this.isFullWidth()){var t=this.rowNode,n=this.beans.columnModel;this.beans.focusService.setFocusedCell(t.rowIndex,n.getAllDisplayedColumns()[0],t.rowPinned,!0)}},n.prototype.onRowClick=function(e){if(!(Me(e)||this.lastMouseDownOnDragger)){var t=this.createRowEventWithSource(Ke.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(t);var n=e.ctrlKey||e.metaKey,r=e.shiftKey;if(!(this.beans.gridOptionsWrapper.isGroupSelectsChildren()&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.beans.gridOptionsWrapper.isRowSelection()||this.beans.gridOptionsWrapper.isSuppressRowClickSelection())){var o=this.beans.gridOptionsWrapper.isRowMultiSelectWithClick(),i=!this.beans.gridOptionsWrapper.isSuppressRowDeselection();if(this.rowNode.isSelected())o?this.rowNode.setSelectedParams({newValue:!1}):n?i&&this.rowNode.setSelectedParams({newValue:!1}):this.rowNode.setSelectedParams({newValue:!r,clearSelection:!r,rangeSelect:r});else{var a=!o&&!n;this.rowNode.setSelectedParams({newValue:!0,clearSelection:a,rangeSelect:r})}}}},n.prototype.setupDetailRowAutoHeight=function(e){var t=this;if(this.beans.gridOptionsWrapper.isDetailRowAutoHeight()){var n=function(){var n=e.clientHeight;if(null!=n&&n>0){t.beans.frameworkOverrides.setTimeout((function(){t.rowNode.setRowHeight(n),t.beans.clientSideRowModel?t.beans.clientSideRowModel.onRowHeightChanged():t.beans.serverSideRowModel&&t.beans.serverSideRowModel.onRowHeightChanged()}),0)}},r=this.beans.resizeObserverService.observeResize(e,n);this.addDestroyFunc(r),n()}},n.prototype.createFullWidthParams=function(e,t){var n=this;return{fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,$scope:this.scope?this.scope:this.parentScope,$compile:this.beans.$compile,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:function(e,t,r,o){return n.addFullWidthRowDragging(e,t,r,o)}}},n.prototype.addFullWidthRowDragging=function(e,t,n,r){if(void 0===n&&(n=""),this.isFullWidth()){var o=new aa((function(){return n}),this.rowNode,void 0,e,t,r);this.createManagedBean(o,this.beans.context)}},n.prototype.onUiLevelChanged=function(){var e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){var t="ag-row-level-"+e,n="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach((function(e){e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(n,!1)}))}this.rowLevel=e},n.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()},n.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()},n.prototype.onModelUpdated=function(){var e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-first",e)}))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-row-last",t)})))},n.prototype.stopEditing=function(e){if(void 0===e&&(e=!1),this.getAllCellCtrls().forEach((function(t){return t.stopEditing(e)})),this.editingRow){if(!e){var t=this.createRowEvent(Ke.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(t)}this.setEditingRow(!1)}},n.prototype.setInlineEditingCss=function(e){this.allRowGuis.forEach((function(t){t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)}))},n.prototype.setEditingRow=function(e){this.editingRow=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-editing",e)}));var t=e?this.createRowEvent(Ke.EVENT_ROW_EDITING_STARTED):this.createRowEvent(Ke.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)},n.prototype.startRowEditing=function(e,t,n){void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=null),this.editingRow||(this.getAllCellCtrls().forEach((function(r){var o=r===n;o?r.startEditing(e,t,o):r.startEditing(null,null,o)})),this.setEditingRow(!0))},n.prototype.getAllCellCtrls=function(){return Ms(this.centerCellCtrls.list,this.leftCellCtrls.list,this.rightCellCtrls.list)},n.prototype.postProcessClassesFromGridOptions=function(){var e=this,t=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode,this.scope);t&&t.length&&t.forEach((function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}))},n.prototype.postProcessRowClassRules=function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,this.scope,(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}),(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!1)}))}))},n.prototype.setStylesFromGridOptions=function(){var e=this.processStylesFromGridOptions();this.allRowGuis.forEach((function(t){return t.rowComp.setUserStyles(e)}))},n.prototype.getRowBusinessKey=function(){var e=this.beans.gridOptionsWrapper.getBusinessKeyForNodeFunc();if("function"===typeof e)return e(this.rowNode)},n.prototype.getInitialRowClasses=function(e){var t={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeRowIn,rowIsEven:this.rowNode.rowIndex%2===0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),scope:this.scope,pinned:e};return this.beans.rowCssClassCalculator.getInitialRowClasses(t)},n.prototype.processStylesFromGridOptions=function(){var e=this.beans.gridOptionsWrapper.getRowStyle();if(!e||"function"!==typeof e){var t,n=this.beans.gridOptionsWrapper.getRowStyleFunc();if(n)t=n({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex,$scope:this.scope,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()});return V({},e,t)}console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead")},n.prototype.onRowSelected=function(){var e=this,t=this.rowNode.isSelected();this.allRowGuis.forEach((function(n){n.rowComp.setAriaSelected(!!t||void 0),n.rowComp.addOrRemoveCssClass("ag-row-selected",t),n.rowComp.setAriaLabel(e.createAriaLabel())}))},n.prototype.createAriaLabel=function(){var e=this.rowNode.isSelected();if(!e||!this.beans.gridOptionsWrapper.isSuppressRowDeselection())return this.beans.gridOptionsWrapper.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect","Press SPACE to "+(e?"deselect":"select")+" this row.")},n.prototype.isUseAnimationFrameForCreate=function(){return this.useAnimationFrameForCreate},n.prototype.addHoverFunctionality=function(e){var t=this;this.active&&(this.addManagedListener(e,"mouseenter",(function(){return t.rowNode.onMouseEnter()})),this.addManagedListener(e,"mouseleave",(function(){return t.rowNode.onMouseLeave()})),this.addManagedListener(this.rowNode,Qi.EVENT_MOUSE_ENTER,(function(){t.beans.gridOptionsWrapper.isSuppressRowHoverHighlight()||un(e,"ag-row-hover")})),this.addManagedListener(this.rowNode,Qi.EVENT_MOUSE_LEAVE,(function(){pn(e,"ag-row-hover")})))},n.prototype.roundRowTopToBounds=function(e){var t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),n=this.applyPaginationOffset(t.top,!0)-100,r=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(n,e),r)},n.prototype.getFrameworkOverrides=function(){return this.beans.frameworkOverrides},n.prototype.onRowHeightChanged=function(){if(o(this.rowNode.rowHeight)){var e=this.rowNode.rowHeight+"px";this.allRowGuis.forEach((function(t){return t.rowComp.setHeight(e)}))}},n.prototype.addEventListener=function(t,n){"renderedRowRemoved"!==t&&"rowRemoved"!==t||(t=Ke.EVENT_VIRTUAL_ROW_REMOVED,console.warn("AG Grid: Since version 11, event renderedRowRemoved is now called "+Ke.EVENT_VIRTUAL_ROW_REMOVED)),e.prototype.addEventListener.call(this,t,n)},n.prototype.removeEventListener=function(t,n){"renderedRowRemoved"!==t&&"rowRemoved"!==t||(t=Ke.EVENT_VIRTUAL_ROW_REMOVED,console.warn("AG Grid: Since version 11, event renderedRowRemoved and rowRemoved is now called "+Ke.EVENT_VIRTUAL_ROW_REMOVED)),e.prototype.removeEventListener.call(this,t,n)},n.prototype.destroyFirstPass=function(){this.active=!1,this.setupRemoveAnimation();var t=this.createRowEvent(Ke.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(t),this.beans.eventService.dispatchEvent(t),e.prototype.destroy.call(this)},n.prototype.setupRemoveAnimation=function(){if(null!=this.rowNode.rowTop){var e=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(e)}else this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)}))},n.prototype.destroySecondPass=function(){this.allRowGuis.length=0;var e=function(e){return e.list.forEach((function(e){return e.destroy()})),{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)},n.prototype.setFocusedClasses=function(){var e=this;this.allRowGuis.forEach((function(t){t.rowComp.addOrRemoveCssClass("ag-row-focus",e.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!e.rowFocused)}))},n.prototype.onCellFocusChanged=function(){var e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)},n.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged())},n.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},n.prototype.onPaginationPixelOffsetChanged=function(){this.onTopChanged()},n.prototype.applyPaginationOffset=function(e,t){return void 0===t&&(t=!1),this.rowNode.isRowPinned()?e:e+this.beans.paginationProxy.getPixelOffset()*(t?1:-1)},n.prototype.setRowTop=function(e){if(!this.printLayout&&o(e)){var t=this.applyPaginationOffset(e),n=(this.rowNode.isRowPinned()?t:this.beans.rowContainerHeightService.getRealPixelPosition(t))+"px";this.setRowTopStyle(n)}},n.prototype.getInitialRowTop=function(){return this.initialTop},n.prototype.getInitialTransform=function(){return this.initialTransform},n.prototype.setInitialRowTop=function(){if(this.printLayout)return"";var e=this.slideRowIn?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,t=this.applyPaginationOffset(e),n=(this.rowNode.isRowPinned()?t:this.beans.rowContainerHeightService.getRealPixelPosition(t))+"px";this.beans.gridOptionsWrapper.isSuppressRowTransform()?this.initialTop=n:this.initialTransform="translateY("+n+")"},n.prototype.setRowTopStyle=function(e){var t=this.beans.gridOptionsWrapper.isSuppressRowTransform();this.allRowGuis.forEach((function(n){return t?n.rowComp.setTop(e):n.rowComp.setTransform("translateY("+e+")")}))},n.prototype.getRowNode=function(){return this.rowNode},n.prototype.getCellCtrl=function(e){var t=null;return this.getAllCellCtrls().forEach((function(n){n.getColumn()==e&&(t=n)})),null!=t||this.getAllCellCtrls().forEach((function(n){n.getColSpanningList().indexOf(e)>=0&&(t=n)})),t},n.prototype.onRowIndexChanged=function(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes())},n.prototype.updateRowIndexes=function(){var e=this,t=this.rowNode.getRowIndexString(),n=this.beans.headerNavigationService.getHeaderRowCount(),r=this.rowNode.rowIndex%2===0;this.allRowGuis.forEach((function(o){o.rowComp.setRowIndex(t),o.rowComp.setAriaRowIndex(n+e.rowNode.rowIndex+1),o.rowComp.addOrRemoveCssClass("ag-row-even",r),o.rowComp.addOrRemoveCssClass("ag-row-odd",!r)}))},n.prototype.getPinnedLeftRowElement=function(){return this.leftGui?this.leftGui.element:void 0},n.prototype.getPinnedRightRowElement=function(){return this.rightGui?this.rightGui.element:void 0},n.prototype.getBodyRowElement=function(){return this.centerGui?this.centerGui.element:void 0},n.prototype.getFullWidthRowElement=function(){return this.fullWidthGui?this.fullWidthGui.element:void 0},n.DOM_DATA_KEY_ROW_CTRL="renderedRow",n}(ze),Ws=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vs=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},js=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},Bs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.destroyFuncsForColumnListeners=[],t.rowCtrlsByRowIndex={},t.zombieRowCtrls={},t.allRowCtrls=[],t.topRowCtrls=[],t.bottomRowCtrls=[],t.refreshInProgress=!1,t}return Ws(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.initialise()}))},t.prototype.initialise=function(){this.addManagedListener(this.eventService,Ke.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_BODY_SCROLL,this.redrawAfterScroll.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_BODY_HEIGHT_CHANGED,this.redrawAfterScroll.bind(this)),this.addManagedListener(this.gridOptionsWrapper,es.PROP_DOM_LAYOUT,this.onDomLayoutChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_PRINT,this.embedFullWidthRows=this.printLayout||this.gridOptionsWrapper.isEmbedFullWidthRows(),this.redrawAfterModelUpdate()},t.prototype.initialiseCache=function(){if(this.gridOptionsWrapper.isKeepDetailRows()){var e=this.gridOptionsWrapper.getKeepDetailRowsCount(),t=null!=e?e:3;this.cachedRowCtrls=new zs(t)}},t.prototype.getRowCtrls=function(){return this.allRowCtrls},t.prototype.updateAllRowCtrls=function(){var e=H(this.rowCtrlsByRowIndex);this.beans.gridOptionsWrapper.isEnsureDomOrder()&&e.sort((function(e,t){return e.getRowNode().rowIndex-t.getRowNode.rowIndex}));var t=H(this.zombieRowCtrls),n=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];this.allRowCtrls=js(e,t,n)},t.prototype.registerCellEventListeners=function(){var e=this;this.addManagedListener(this.eventService,Ke.EVENT_CELL_FOCUSED,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onCellFocused(t)})),e.getAllRowCtrls().forEach((function(e){e.isFullWidth()&&e.onFullWidthRowFocused(t)}))})),this.addManagedListener(this.eventService,Ke.EVENT_FLASH_CELLS,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onFlashCells(t)}))})),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_HOVER_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onColumnHover()}))})),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){e.printLayout&&e.getAllCellCtrls().forEach((function(e){return e.onLeftChanged()}))})),this.gridOptionsWrapper.isEnableRangeSelection()&&(this.addManagedListener(this.eventService,Ke.EVENT_RANGE_SELECTION_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onRangeSelectionChanged()}))})),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_MOVED,(function(){e.getAllCellCtrls().forEach((function(e){return e.updateRangeBordersIfRangeCount()}))})),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_PINNED,(function(){e.getAllCellCtrls().forEach((function(e){return e.updateRangeBordersIfRangeCount()}))})),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_VISIBLE,(function(){e.getAllCellCtrls().forEach((function(e){return e.updateRangeBordersIfRangeCount()}))}))),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,Ke.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))},t.prototype.removeGridColumnListeners=function(){this.destroyFuncsForColumnListeners.forEach((function(e){return e()})),this.destroyFuncsForColumnListeners.length=0},t.prototype.refreshListenersToColumnsForCellComps=function(){var e=this;this.removeGridColumnListeners();var t=this.columnModel.getAllGridColumns();t&&t.forEach((function(t){var n=function(n){e.getAllCellCtrls().forEach((function(e){e.getColumn()===t&&n(e)}))},r=function(){n((function(e){return e.onLeftChanged()}))},o=function(){n((function(e){return e.onWidthChanged()}))},i=function(){n((function(e){return e.onFirstRightPinnedChanged()}))},a=function(){n((function(e){return e.onLastLeftPinnedChanged()}))};t.addEventListener(_e.EVENT_LEFT_CHANGED,r),t.addEventListener(_e.EVENT_WIDTH_CHANGED,o),t.addEventListener(_e.EVENT_FIRST_RIGHT_PINNED_CHANGED,i),t.addEventListener(_e.EVENT_LAST_LEFT_PINNED_CHANGED,a),e.destroyFuncsForColumnListeners.push((function(){t.removeEventListener(_e.EVENT_LEFT_CHANGED,r),t.removeEventListener(_e.EVENT_WIDTH_CHANGED,o),t.removeEventListener(_e.EVENT_FIRST_RIGHT_PINNED_CHANGED,i),t.removeEventListener(_e.EVENT_LAST_LEFT_PINNED_CHANGED,a)}))}))},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_PRINT,t=e||this.gridOptionsWrapper.isEmbedFullWidthRows(),n=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,n&&this.redrawAfterModelUpdate()},t.prototype.datasourceChanged=function(){this.firstRenderedRow=0,this.lastRenderedRow=-1;var e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)},t.prototype.onPageLoaded=function(e){var t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)},t.prototype.getAllCellsForColumn=function(e){var t=[];return this.getAllRowCtrls().forEach((function(n){var r=n.getCellElement(e);r&&t.push(r)})),t},t.prototype.refreshFloatingRowComps=function(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())},t.prototype.getTopRowCtrls=function(){return this.topRowCtrls},t.prototype.getBottomRowCtrls=function(){return this.bottomRowCtrls},t.prototype.refreshFloatingRows=function(e,t){var n=this;e.forEach((function(e){e.destroyFirstPass(),e.destroySecondPass()})),e.length=0,t&&t.forEach((function(t){var r=new Hs(n.$scope,t,n.beans,!1,!1,n.printLayout);e.push(r)}))},t.prototype.onPinnedRowDataChanged=function(){this.redrawAfterModelUpdate({recycleRows:!0})},t.prototype.getRenderedIndexesForRowNodes=function(e){var t=[];return i(e)||k(this.rowCtrlsByRowIndex,(function(n,r){var o=r.getRowNode();e.indexOf(o)>=0&&t.push(n)})),t},t.prototype.redrawRows=function(e){var t=null!=e&&e.length>0;if(t){var n=this.getRenderedIndexesForRowNodes(e);this.removeRowCtrls(n)}this.redrawAfterModelUpdate({recycleRows:t})},t.prototype.getCellToRestoreFocusToAfterRefresh=function(e){var t=e.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;var n=document.activeElement,r=this.gridOptionsWrapper.getDomData(n,Ts.DOM_DATA_KEY_CELL_CTRL),o=this.gridOptionsWrapper.getDomData(n,Hs.DOM_DATA_KEY_ROW_CTRL);return r||o?t:null},t.prototype.redrawAfterModelUpdate=function(e){void 0===e&&(e={}),this.getLockOnRefresh();var t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);var n=!this.printLayout&&!!e.recycleRows,r=e.animate&&this.gridOptionsWrapper.isAnimateRows(),o=n?this.recycleRows():null;n||this.removeAllRowComps();var i=function(){if(null==t||null==o)return!1;var e=!1;return k(o,(function(n,r){var o=r.getRowNode(),i=o.rowIndex==t.rowIndex,a=o.rowPinned==t.rowPinned;i&&a&&(e=!0)})),e}();this.redraw(o,r),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),i||this.restoreFocusedCell(t),this.releaseLockOnRefresh()},t.prototype.scrollToTopIfNewData=function(e){var t=e.newData||e.newPage,n=this.gridOptionsWrapper.isSuppressScrollOnNewData();t&&!n&&this.gridBodyCtrl.getScrollFeature().scrollToTop()},t.prototype.updateContainerHeights=function(){if(this.printLayout)this.rowContainerHeightService.setModelHeight(null);else{var e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainerHeightService.setModelHeight(e)}},t.prototype.getLockOnRefresh=function(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.refreshView(), call setTimeout(function() { api.refreshView(); }, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0},t.prototype.releaseLockOnRefresh=function(){this.refreshInProgress=!1},t.prototype.restoreFocusedCell=function(e){e&&this.focusService.setFocusedCell(e.rowIndex,e.column,e.rowPinned,!0)},t.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.getAllRowCtrls().forEach((function(t){t.stopEditing(e)}))},t.prototype.onNewColumnsLoaded=function(){this.getAllCellCtrls().forEach((function(e){return e.onNewColumnsLoaded()}))},t.prototype.getAllCellCtrls=function(){var e=[];return this.getAllRowCtrls().forEach((function(t){return e=e.concat(t.getAllCellCtrls())})),e},t.prototype.getAllRowCtrls=function(){var e=this,t=js(this.topRowCtrls,this.bottomRowCtrls);return Object.keys(this.rowCtrlsByRowIndex).forEach((function(n){return t.push(e.rowCtrlsByRowIndex[n])})),t},t.prototype.addRenderedRowListener=function(e,t,n){var r=this.rowCtrlsByRowIndex[t];r&&r.addEventListener(e,n)},t.prototype.flashCells=function(e){void 0===e&&(e={});var t=e.flashDelay,n=e.fadeDelay;this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){return e.flashCell({flashDelay:t,fadeDelay:n})}))},t.prototype.refreshCells=function(e){void 0===e&&(e={});var t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){if(e.refreshShouldDestroy()){var n=e.getRowCtrl();n&&n.refreshCell(e)}else e.refreshCell(t)}))},t.prototype.getCellRendererInstances=function(e){return this.getCellCtrls(e.rowNodes,e.columns).map((function(e){return e.getCellRenderer()})).filter((function(e){return null!=e}))},t.prototype.getCellEditorInstances=function(e){var t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach((function(e){var n=e.getCellEditor();n&&t.push(n)})),t},t.prototype.getEditingCells=function(){var e=[];return this.getAllCellCtrls().forEach((function(t){if(t.isEditing()){var n=t.getCellPosition();e.push(n)}})),e},t.prototype.getCellCtrls=function(e,t){var n,r,i=this,a=[];o(e)&&(n={top:{},bottom:{},normal:{}},e.forEach((function(e){var t=e.id;e.rowPinned===Ce.PINNED_TOP?n.top[t]=!0:e.rowPinned===Ce.PINNED_BOTTOM?n.bottom[t]=!0:n.normal[t]=!0}))),o(t)&&(r={},t.forEach((function(e){var t=i.columnModel.getGridColumn(e);o(t)&&(r[t.getId()]=!0)})));var s=function(e){var t=e.getRowNode(),i=t.id,s=t.rowPinned;if(o(n))if(s===Ce.PINNED_BOTTOM){if(!n.bottom[i])return}else if(s===Ce.PINNED_TOP){if(!n.top[i])return}else if(!n.normal[i])return;e.getAllCellCtrls().forEach((function(e){var t=e.getColumn().getId();r&&!r[t]||a.push(e)}))};return k(this.rowCtrlsByRowIndex,(function(e,t){s(t)})),this.topRowCtrls&&this.topRowCtrls.forEach(s),this.bottomRowCtrls&&this.bottomRowCtrls.forEach(s),a},t.prototype.destroy=function(){this.removeAllRowComps(),e.prototype.destroy.call(this)},t.prototype.removeAllRowComps=function(){var e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)},t.prototype.recycleRows=function(){var e=[];k(this.rowCtrlsByRowIndex,(function(t,n){null==n.getRowNode().id&&e.push(t)})),this.removeRowCtrls(e);var t={};return k(this.rowCtrlsByRowIndex,(function(e,n){var r=n.getRowNode();t[r.id]=n})),this.rowCtrlsByRowIndex={},t},t.prototype.removeRowCtrls=function(e){var t=this;e.forEach((function(e){var n=t.rowCtrlsByRowIndex[e];n&&(n.destroyFirstPass(),n.destroySecondPass()),delete t.rowCtrlsByRowIndex[e]}))},t.prototype.redrawAfterScroll=function(){this.getLockOnRefresh(),this.redraw(null,!1,!0),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged()},t.prototype.removeRowCompsNotToDraw=function(e){var t={};e.forEach((function(e){return t[e]=!0}));var n=Object.keys(this.rowCtrlsByRowIndex).filter((function(e){return!t[e]}));this.removeRowCtrls(n)},t.prototype.calculateIndexesToDraw=function(e){var t=this,n=vt(this.firstRenderedRow,this.lastRenderedRow),r=function(e,r){var o=r.getRowNode().rowIndex;null!=o&&(o<t.firstRenderedRow||o>t.lastRenderedRow)&&t.doNotUnVirtualiseRow(r)&&n.push(o)};return k(this.rowCtrlsByRowIndex,r),k(e,r),n.sort((function(e,t){return e-t})),n},t.prototype.redraw=function(e,t,n){var r=this;void 0===t&&(t=!1),void 0===n&&(n=!1),this.rowContainerHeightService.updateOffset(),this.workOutFirstAndLastRowsToRender();var i=this.calculateIndexesToDraw(e);(this.removeRowCompsNotToDraw(i),this.printLayout&&(t=!1),i.forEach((function(i){o(r.createOrUpdateRowCtrl(i,e,t,n))})),e)&&(n&&!this.gridOptionsWrapper.isSuppressAnimationFrame()&&!this.printLayout?this.beans.animationFrameService.addDestroyTask((function(){r.destroyRowCtrls(e,t),r.updateAllRowCtrls(),r.dispatchDisplayedRowsChanged()})):this.destroyRowCtrls(e,t));this.updateAllRowCtrls(),this.checkAngularCompile(),this.gridBodyCtrl.updateRowCount()},t.prototype.dispatchDisplayedRowsChanged=function(){var e={type:Ke.EVENT_DISPLAYED_ROWS_CHANGED};this.eventService.dispatchEvent(e)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())},t.prototype.redrawFullWidthEmbeddedRows=function(){var e=[];k(this.rowCtrlsByRowIndex,(function(t,n){if(n.isFullWidth()){var r=n.getRowNode().rowIndex;e.push(r.toString())}})),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redrawAfterScroll()},t.prototype.refreshFullWidthRows=function(e){var t=[],n=!!e,r=n?{}:void 0;n&&r&&e.forEach((function(e){return r[e.id]=!0})),k(this.rowCtrlsByRowIndex,(function(e,o){if(o.isFullWidth()){var i=o.getRowNode();if(n&&r){var a=i.level>0&&i.parent?i.parent.id:void 0;if(!r[i.id]&&!r[a])return}if(!o.refreshFullWidth()){var s=o.getRowNode().rowIndex;t.push(s.toString())}}})),this.removeRowCtrls(t),this.redrawAfterScroll()},t.prototype.createOrUpdateRowCtrl=function(e,t,n,r){var i,a=this.rowCtrlsByRowIndex[e];if(a||o(i=this.paginationProxy.getRow(e))&&o(t)&&t[i.id]&&i.alreadyRendered&&(a=t[i.id],t[i.id]=null),!a){if(i||(i=this.paginationProxy.getRow(e)),!o(i))return;a=this.createRowCon(i,n,r)}return i&&(i.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=a,a},t.prototype.destroyRowCtrls=function(e,t){var n=this,r=[];k(e,(function(e,o){o&&(n.cachedRowCtrls&&o.isCacheable()?n.cachedRowCtrls.addRow(o):(o.destroyFirstPass(),t?(n.zombieRowCtrls[o.getInstanceId()]=o,r.push((function(){o.destroySecondPass(),delete n.zombieRowCtrls[o.getInstanceId()]}))):o.destroySecondPass()))})),t&&(r.push((function(){n.updateAllRowCtrls(),n.dispatchDisplayedRowsChanged()})),Z(r))},t.prototype.checkAngularCompile=function(){var e=this;this.gridOptionsWrapper.isAngularCompileRows()&&window.setTimeout((function(){e.$scope.$apply()}),0)},t.prototype.workOutFirstAndLastRowsToRender=function(){var e,t,n=this;if(this.paginationProxy.isRowsToRender())if(this.printLayout)e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{var r=this.gridOptionsWrapper.getRowBufferInPixels(),o=this.ctrlsService.getGridBodyCtrl(),i=!1,a=void 0,s=void 0;do{var l=this.paginationProxy.getPixelOffset(),c=this.paginationProxy.getCurrentPagePixelRange(),u=c.pageFirstPixel,p=c.pageLastPixel,d=this.rowContainerHeightService.getDivStretchOffset(),h=o.getScrollFeature().getVScrollPosition(),f=h.top,g=h.bottom;a=Math.max(f+l-r,u)+d,s=Math.min(g+l+r,p)+d,i=this.ensureAllRowsInRangeHaveHeightsCalculated(a,s)}while(i);var v=this.paginationProxy.getRowIndexAtPixel(a),m=this.paginationProxy.getRowIndexAtPixel(s),y=this.paginationProxy.getPageFirstRow(),b=this.paginationProxy.getPageLastRow();v<y&&(v=y),m>b&&(m=b),e=v,t=m}else e=0,t=-1;var w=this.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_NORMAL,C=this.gridOptionsWrapper.isSuppressMaxRenderedRowRestriction(),x=Math.max(this.gridOptionsWrapper.getRowBuffer(),500);w&&!C&&t-e>x&&(t=e+x);var S=e!==this.firstRenderedRow,E=t!==this.lastRenderedRow;if(S||E){this.firstRenderedRow=e,this.lastRenderedRow=t;var _={type:Ke.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(_)}if(this.paginationProxy.isRowsToRender()){var R={type:Ke.EVENT_FIRST_DATA_RENDERED,firstRow:e,lastRow:t,api:this.gridApi,columnApi:this.columnApi};window.setTimeout((function(){return n.eventService.dispatchEventOnce(R)}),50)}},t.prototype.ensureAllRowsInRangeHaveHeightsCalculated=function(e,t){var n=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return n&&this.updateContainerHeights(),n},t.prototype.getFirstVirtualRenderedRow=function(){return this.firstRenderedRow},t.prototype.getLastVirtualRenderedRow=function(){return this.lastRenderedRow},t.prototype.doNotUnVirtualiseRow=function(e){var t=e.getRowNode(),n=this.focusService.isRowNodeFocused(t),r=e.isEditing(),o=t.detail;return!!(n||r||o)&&!!this.paginationProxy.isRowPresent(t)},t.prototype.createRowCon=function(e,t,n){var r=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(r)return r;var o=this.gridOptionsWrapper.isSuppressAnimationFrame(),i=n&&!o&&!this.printLayout;return new Hs(this.$scope,e,this.beans,t,i,this.printLayout)},t.prototype.getRenderedNodes=function(){var e=this.rowCtrlsByRowIndex;return Object.keys(e).map((function(t){return e[t].getRowNode()}))},t.prototype.getRowByPosition=function(e){var t;switch(e.rowPinned){case Ce.PINNED_TOP:t=this.topRowCtrls[e.rowIndex];break;case Ce.PINNED_BOTTOM:t=this.bottomRowCtrls[e.rowIndex];break;default:t=this.rowCtrlsByRowIndex[e.rowIndex]}return t},t.prototype.getRowNode=function(e){switch(e.rowPinned){case Ce.PINNED_TOP:return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case Ce.PINNED_BOTTOM:return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},t.prototype.isRangeInRenderedViewport=function(e,t){if(null==e||null==t)return!1;var n=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!n},Vs([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Vs([de("columnModel")],t.prototype,"columnModel",void 0),Vs([de("$scope")],t.prototype,"$scope",void 0),Vs([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Vs([de("rowModel")],t.prototype,"rowModel",void 0),Vs([de("focusService")],t.prototype,"focusService",void 0),Vs([de("columnApi")],t.prototype,"columnApi",void 0),Vs([de("gridApi")],t.prototype,"gridApi",void 0),Vs([de("beans")],t.prototype,"beans",void 0),Vs([de("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),Vs([he("ctrlsService")],t.prototype,"ctrlsService",void 0),Vs([ce],t.prototype,"postConstruct",null),t=Vs([pe("rowRenderer")],t)}(ze),zs=function(){function e(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}return e.prototype.toString=function(){return this.entriesList.map((function(e){return e.getRowNode().data.name})).join(", ")},e.prototype.addRow=function(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){var t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}},e.prototype.getRow=function(e){if(null==e||null==e.id)return null;var t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null},e.prototype.removeFromCache=function(e){var t=e.getRowNode().id;delete this.entriesMap[t],b(this.entriesList,e)},e.prototype.getEntries=function(){return this.entriesList},e}(),Us=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ys=function(e){function t(t,n){var r=e.call(this,t)||this;return r.ctrl=n,r}return Us(t,e),t.prototype.getCtrl=function(){return this.ctrl},t}(io),Xs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qs=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ks=function(e){function t(n){var r=e.call(this,t.TEMPLATE,n)||this;return r.headerCompVersion=0,r.column=n.getColumnGroupChild(),r.pinned=n.getPinned(),r}return Xs(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),n=function(e,n,r){var o=r||t;null!=n&&""!=n?o.setAttribute(e,n):o.removeAttribute(e)},r={setWidth:function(e){return t.style.width=e},addOrRemoveCssClass:function(t,n){return e.addOrRemoveCssClass(t,n)},setAriaSort:function(e){return e?mr(t,e):yr(t)},setColId:function(e){return n("col-id",e)},setTitle:function(e){return n("title",e)},setAriaDescribedBy:function(e){return ar(t,e)},setUserCompDetails:function(t){return e.setUserCompDetails(t)},getUserCompInstance:function(){return e.headerComp}};this.ctrl.setComp(r,this.getGui(),this.eResize);var o=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",o)},t.prototype.destroyHeaderComp=function(){this.headerComp&&(this.getGui().removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)},t.prototype.setUserCompDetails=function(e){var t=this;this.headerCompVersion++;var n=this.headerCompVersion;e.newAgStackInstance().then((function(e){return t.afterCompCreated(n,e)}))},t.prototype.afterCompCreated=function(e,t){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.getGui().appendChild(this.headerCompGui),this.ctrl.setDragSource(this.headerCompGui)):this.destroyBean(t)},t.TEMPLATE='<div class="ag-header-cell" role="columnheader" unselectable="on" tabindex="-1">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n </div>',qs([ao("eResize")],t.prototype,"eResize",void 0),qs([ce],t.prototype,"postConstruct",null),qs([ue],t.prototype,"destroyHeaderComp",null),t}(Ys),$s=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qs=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Zs=function(e){function t(n){return e.call(this,t.TEMPLATE,n)||this}return $s(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),n=function(e,n){return void 0!=n?t.setAttribute(e,n):t.removeAttribute(e)},r={addOrRemoveCssClass:function(t,n){return e.addOrRemoveCssClass(t,n)},addOrRemoveResizableCssClass:function(t,n){return dn(e.eResize,t,n)},setWidth:function(e){return t.style.width=e},setColId:function(e){return t.setAttribute("col-id",e)},setAriaExpanded:function(e){return n("aria-expanded",e)},setTitle:function(e){return n("title",e)},setUserCompDetails:function(t){return e.setUserCompDetails(t)}};this.ctrl.setComp(r,t,this.eResize)},t.prototype.setUserCompDetails=function(e){var t=this;e.newAgStackInstance().then((function(e){return t.afterHeaderCompCreated(e)}))},t.prototype.afterHeaderCompCreated=function(e){var t=this,n=function(){return t.destroyBean(e)};this.isAlive()?(this.getGui().appendChild(e.getGui()),this.addDestroyFunc(n),this.ctrl.setDragSource(e.getGui())):n()},t.TEMPLATE='<div class="ag-header-group-cell" role="columnheader" tabindex="-1">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n </div>',Qs([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Qs([ao("eResize")],t.prototype,"eResize",void 0),Qs([ce],t.prototype,"postConstruct",null),t}(Ys),Js=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),el=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},tl=function(e){function t(n){return e.call(this,t.TEMPLATE,n)||this}return Js(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),n={addOrRemoveCssClass:function(t,n){return e.addOrRemoveCssClass(t,n)},addOrRemoveBodyCssClass:function(t,n){return dn(e.eFloatingFilterBody,t,n)},addOrRemoveButtonWrapperCssClass:function(t,n){return dn(e.eButtonWrapper,t,n)},setCompDetails:function(t){return e.setCompDetails(t)},getFloatingFilterComp:function(){return e.compPromise},setWidth:function(e){return t.style.width=e},setMenuIcon:function(t){return e.eButtonShowMainFilter.appendChild(t)}};this.ctrl.setComp(n,t,this.eButtonShowMainFilter,this.eFloatingFilterBody)},t.prototype.setCompDetails=function(e){var t=this;this.compPromise=e.newAgStackInstance(),this.compPromise.then((function(e){return t.afterCompCreated(e)}))},t.prototype.afterCompCreated=function(e){var t=this;e&&(this.addDestroyFunc((function(){return t.context.destroyBean(e)})),this.isAlive()&&(this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()))},t.TEMPLATE='<div class="ag-header-cell ag-floating-filter" role="gridcell" tabindex="-1">\n <div ref="eFloatingFilterBody" role="presentation"></div>\n <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">\n <button type="button" aria-label="Open Filter Menu" class="ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>\n </div>\n </div>',el([ao("eFloatingFilterBody")],t.prototype,"eFloatingFilterBody",void 0),el([ao("eButtonWrapper")],t.prototype,"eButtonWrapper",void 0),el([ao("eButtonShowMainFilter")],t.prototype,"eButtonShowMainFilter",void 0),el([ce],t.prototype,"postConstruct",null),t}(Ys),nl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};(Is=t.HeaderRowType||(t.HeaderRowType={})).COLUMN_GROUP="group",Is.COLUMN="column",Is.FLOATING_FILTER="filter";var ol,il=function(e){function n(n){var r=e.call(this)||this;r.headerComps={};var o=n.getType()==t.HeaderRowType.COLUMN_GROUP?"ag-header-row-column-group":n.getType()==t.HeaderRowType.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";return r.setTemplate('<div class="ag-header-row '+o+'" role="row"></div>'),r.ctrl=n,r}return nl(n,e),n.prototype.init=function(){var e=this,t={setTransform:function(t){return e.getGui().style.transform=t},setHeight:function(t){return e.getGui().style.height=t},setTop:function(t){return e.getGui().style.top=t},setHeaderCtrls:function(t){return e.setHeaderCtrls(t)},setWidth:function(t){return e.getGui().style.width=t},setAriaRowIndex:function(t){return hr(e.getGui(),t)}};this.ctrl.setComp(t)},n.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([])},n.prototype.setHeaderCtrls=function(e){var t=this;if(this.isAlive()){var n=this.headerComps;if(this.headerComps={},e.forEach((function(e){var r=e.getInstanceId(),o=n[r];delete n[r],null==o&&(o=t.createHeaderComp(e),t.getGui().appendChild(o.getGui())),t.headerComps[r]=o})),k(n,(function(e,n){t.getGui().removeChild(n.getGui()),t.destroyBean(n)})),this.gridOptionsWrapper.isEnsureDomOrder()){var r=H(this.headerComps);r.sort((function(e,t){return e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft()}));var o=r.map((function(e){return e.getGui()}));Mn(this.getGui(),o)}}},n.prototype.createHeaderComp=function(e){var n;switch(this.ctrl.getType()){case t.HeaderRowType.COLUMN_GROUP:n=new Zs(e);break;case t.HeaderRowType.FLOATING_FILTER:n=new tl(e);break;default:n=new Ks(e)}return this.createBean(n),n.setParentComponent(this),n},rl([ce],n.prototype,"init",null),rl([ue],n.prototype,"destroyHeaderCtrls",null),n}(io),al=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};(ol=t.HeaderNavigationDirection||(t.HeaderNavigationDirection={}))[ol.UP=0]="UP",ol[ol.DOWN=1]="DOWN",ol[ol.LEFT=2]="LEFT",ol[ol.RIGHT=3]="RIGHT";var ll,cl=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return al(n,e),n.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}))},n.prototype.getHeaderRowCount=function(){var e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0},n.prototype.getHeaderRowType=function(e){var t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)},n.prototype.navigateVertically=function(e,n,r){if(n||(n=this.focusService.getFocusedHeader()),!n)return!1;var o=n.headerRowIndex,i=n.column,a=this.getHeaderRowCount(),s=e===t.HeaderNavigationDirection.UP,l=s?o-1:o+1,c=null,u=!1;l<0&&(l=0,c=i,u=!0),l>=a&&(l=-1);var p=this.getHeaderRowType(o);if(!u){if(p===t.HeaderRowType.COLUMN_GROUP){var d=i;c=s?i.getParent():d.getDisplayedChildren()[0]}else if(p===t.HeaderRowType.FLOATING_FILTER)c=i;else{d=i;c=s?d.getParent():d}if(!c)return!1}return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:c},allowUserOverride:!0,event:r})},n.prototype.navigateHorizontally=function(e,n,r){void 0===n&&(n=!1);var o,i,a=this.focusService.getFocusedHeader();return e===t.HeaderNavigationDirection.LEFT!==this.gridOptionsWrapper.isEnableRtl()?(i="Before",o=this.headerPositionUtils.findHeader(a,i)):(i="After",o=this.headerPositionUtils.findHeader(a,i)),o?this.focusService.focusHeaderPosition({headerPosition:o,direction:i,fromTab:n,allowUserOverride:!0,event:r}):!n||this.focusNextHeaderRow(a,i,r)},n.prototype.focusNextHeaderRow=function(e,t,n){var r,o=e.headerRowIndex,i=null;return"Before"===t?o>0&&(r=o-1,i=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"end")):(r=o+1,i=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"start")),this.focusService.focusHeaderPosition({headerPosition:i,direction:t,fromTab:!0,allowUserOverride:!0,event:n})},n.prototype.scrollToColumn=function(e,t){if(void 0===t&&(t="After"),!e.getPinned()){var n;if(e instanceof Oe){var r=e.getDisplayedLeafColumns();n="Before"===t?v(r):r[0]}else n=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(n),this.gridBodyCon.getScrollFeature().horizontallyScrollHeaderCenterAndFloatingCenter(),this.animationFrameService.flushAllFrames()}},sl([de("focusService")],n.prototype,"focusService",void 0),sl([de("headerPositionUtils")],n.prototype,"headerPositionUtils",void 0),sl([de("animationFrameService")],n.prototype,"animationFrameService",void 0),sl([de("ctrlsService")],n.prototype,"ctrlsService",void 0),sl([ce],n.prototype,"postConstruct",null),n=sl([pe("headerNavigationService")],n)}(ze),ul=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},dl=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ul(n,e),n.prototype.setComp=function(e,t,n){this.comp=e,this.eGui=t,this.createManagedBean(new Co(n,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight(),this.ctrlsService.registerGridHeaderCtrl(this)},n.prototype.setupHeaderHeight=function(){var e=this.setHeaderHeight.bind(this);e(),this.addManagedListener(this.gridOptionsWrapper,es.PROP_HEADER_HEIGHT,e),this.addManagedListener(this.gridOptionsWrapper,es.PROP_PIVOT_HEADER_HEIGHT,e),this.addManagedListener(this.gridOptionsWrapper,es.PROP_GROUP_HEADER_HEIGHT,e),this.addManagedListener(this.gridOptionsWrapper,es.PROP_PIVOT_GROUP_HEADER_HEIGHT,e),this.addManagedListener(this.gridOptionsWrapper,es.PROP_FLOATING_FILTERS_HEIGHT,e),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,e)},n.prototype.setHeaderHeight=function(){var e,t,n,r=this.columnModel,o=this.gridOptionsWrapper,i=0,a=r.getHeaderRowCount();r.isPivotMode()?(t=o.getPivotGroupHeaderHeight(),n=o.getPivotHeaderHeight()):(r.hasFloatingFilters()&&(a++,i=1),t=o.getGroupHeaderHeight(),n=o.getHeaderHeight());var s=a-(1+i);e=i*o.getFloatingFiltersHeight(),e+=s*t;var l=(e+=n)+1+"px";this.comp.setHeightAndMinHeight(l)},n.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)},n.prototype.onTabKeyDown=function(e){var n=this.gridOptionsWrapper.isEnableRtl(),r=e.shiftKey!==n?t.HeaderNavigationDirection.LEFT:t.HeaderNavigationDirection.RIGHT;(this.headerNavigationService.navigateHorizontally(r,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()},n.prototype.handleKeyDown=function(e){var n=null;switch(e.keyCode){case mo.LEFT:n=t.HeaderNavigationDirection.LEFT;case mo.RIGHT:o(n)||(n=t.HeaderNavigationDirection.RIGHT),this.headerNavigationService.navigateHorizontally(n,!1,e);break;case mo.UP:n=t.HeaderNavigationDirection.UP;case mo.DOWN:o(n)||(n=t.HeaderNavigationDirection.DOWN),this.headerNavigationService.navigateVertically(n,null,e)&&e.preventDefault();break;default:return}},n.prototype.onFocusOut=function(e){var t=e.relatedTarget;!t&&this.eGui.contains(document.activeElement)||this.eGui.contains(t)||this.focusService.clearFocusedHeader()},pl([de("headerNavigationService")],n.prototype,"headerNavigationService",void 0),pl([de("focusService")],n.prototype,"focusService",void 0),pl([de("columnModel")],n.prototype,"columnModel",void 0),pl([de("ctrlsService")],n.prototype,"ctrlsService",void 0),n}(ze),hl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},gl=function(e){function t(t){var n=e.call(this)||this;return n.callback=t,n}return hl(t,e),t.prototype.postConstruct=function(){var e=this.setWidth.bind(this);this.addManagedListener(this.gridOptionsWrapper,es.PROP_DOM_LAYOUT,e),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.setWidth()},t.prototype.setWidth=function(){var e=this.columnModel,t=this.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_PRINT,n=e.getBodyContainerWidth(),r=e.getDisplayedColumnsLeftWidth(),o=e.getDisplayedColumnsRightWidth(),i=t?n+r+o:n;this.callback(i)},fl([de("columnModel")],t.prototype,"columnModel",void 0),fl([ce],t.prototype,"postConstruct",null),t}(ze),vl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ml=function(){function e(e,t){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.pinned=e,this.eContainer=t,this.centerContainer=!o(e)}return e.prototype.init=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCon=e.ctrlsService.getGridBodyCtrl()}))},e.prototype.getIconName=function(){return this.pinned?ra.ICON_PINNED:ra.ICON_MOVE},e.prototype.onDragEnter=function(e){var n=e.dragItem.columns;if(e.dragSource.type===t.DragSourceType.ToolPanel)this.setColumnsVisible(n,!0,"uiColumnDragged");else{var r=e.dragItem.visibleState,o=(n||[]).filter((function(e){return r[e.getId()]}));this.setColumnsVisible(o,!0,"uiColumnDragged")}this.setColumnsPinned(n,this.pinned,"uiColumnDragged"),this.onDragging(e,!0)},e.prototype.onDragLeave=function(e){if(!this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns()&&!e.fromNudge){var t=e.dragSource.getDragItem().columns;this.setColumnsVisible(t,!1,"uiColumnDragged")}this.ensureIntervalCleared()},e.prototype.setColumnsVisible=function(e,t,n){if(void 0===n&&(n="api"),e){var r=e.filter((function(e){return!e.getColDef().lockVisible}));this.columnModel.setColumnsVisible(r,t,n)}},e.prototype.setColumnsPinned=function(e,t,n){if(void 0===n&&(n="api"),e){var r=e.filter((function(e){return!e.getColDef().lockPinned}));this.columnModel.setColumnsPinned(r,t,n)}},e.prototype.onDragStop=function(){this.ensureIntervalCleared()},e.prototype.normaliseX=function(e){this.gridOptionsWrapper.isEnableRtl()&&(e=this.eContainer.clientWidth-e);return this.centerContainer&&(e+=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),e},e.prototype.checkCenterForScrolling=function(e){if(this.centerContainer){var t=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),n=t+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();this.gridOptionsWrapper.isEnableRtl()?(this.needToMoveRight=e<t+50,this.needToMoveLeft=e>n-50):(this.needToMoveLeft=e<t+50,this.needToMoveRight=e>n-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}},e.prototype.onDragging=function(e,t){var n=this;if(void 0===t&&(t=!1),this.lastDraggingEvent=e,!i(e.hDirection)){var r=this.normaliseX(e.x);t||this.checkCenterForScrolling(r);var o=this.normaliseDirection(e.hDirection),a=e.dragSource.type,s=e.dragSource.getDragItem().columns;s=s.filter((function(e){return!e.getColDef().lockPinned||e.getPinned()==n.pinned})),this.attemptMoveColumns(a,s,o,r,t)}},e.prototype.normaliseDirection=function(e){if(!this.gridOptionsWrapper.isEnableRtl())return e;switch(e){case t.HorizontalDirection.Left:return t.HorizontalDirection.Right;case t.HorizontalDirection.Right:return t.HorizontalDirection.Left;default:console.error("AG Grid: Unknown direction "+e)}},e.prototype.calculateOldIndex=function(e){var t=this.columnModel.getAllGridColumns(),n=y(e.map((function(e){return t.indexOf(e)}))),r=n[0];return v(n)-r!==n.length-1?null:r},e.prototype.attemptMoveColumns=function(e,n,r,o,i){var a=r===t.HorizontalDirection.Left,s=r===t.HorizontalDirection.Right,l=n.slice();this.columnModel.sortColumnsLikeGridColumns(l);var c=this.calculateValidMoves(l,s,o),u=this.calculateOldIndex(l);if(0!==c.length){var p=c[0],d=null!==u&&!i;if(e==t.DragSourceType.HeaderCell&&(d=null!==u),d){if(a&&p>=u)return;if(s&&p<=u)return}for(var h=0;h<c.length;h++){var f=c[h];if(this.columnModel.doesMovePassRules(l,f))return void this.columnModel.moveColumns(l,f,"uiColumnDragged")}}},e.prototype.calculateValidMoves=function(e,t,n){var r=this.gridOptionsWrapper.isSuppressMovableColumns()||e.some((function(e){return e.getColDef().suppressMovable}));if(r)return[];var o,i=this.columnModel.getDisplayedColumns(this.pinned),a=this.columnModel.getAllGridColumns(),s=i.filter((function(t){return S(e,t)})),l=i.filter((function(t){return!S(e,t)})),c=a.filter((function(t){return!S(e,t)})),u=0,p=n;if(t){var d=0;s.forEach((function(e){return d+=e.getActualWidth()})),p-=d}if(p>0){for(var h=0;h<l.length;h++){if((p-=l[h].getActualWidth())<0)break;u++}t&&u++}if(u>0){var f=l[u-1];o=c.indexOf(f)+1}else-1===(o=c.indexOf(l[0]))&&(o=0);var g=[o],v=function(e,t){return e-t};if(t){for(var m=o+1,y=a.length-1;m<=y;)g.push(m),m++;g.sort(v)}else{m=o,y=a.length-1;for(var b=a[m];m<=y&&this.isColumnHidden(i,b);)m++,g.push(m),b=a[m];m=o-1;for(;m>=0;)g.push(m),m--;g.sort(v).reverse()}return g},e.prototype.isColumnHidden=function(e,t){return e.indexOf(t)<0},e.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(ra.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(ra.ICON_RIGHT,!0))},e.prototype.ensureIntervalCleared=function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(ra.ICON_MOVE))},e.prototype.moveInterval=function(){var e;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100);var t=null,n=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=n.scrollHorizontally(-e):this.needToMoveRight&&(t=n.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var r=this.lastDraggingEvent.dragItem.columns.filter((function(e){return!e.getColDef().lockPinned}));if(r.length>0&&(this.dragAndDropService.setGhostIcon(ra.ICON_PINNED),this.failedMoveAttempts>7)){var o=this.needToMoveLeft?Ce.PINNED_LEFT:Ce.PINNED_RIGHT;this.setColumnsPinned(r,o,"uiColumnDragged"),this.dragAndDropService.nudge()}}},vl([de("columnModel")],e.prototype,"columnModel",void 0),vl([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),vl([de("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),vl([de("ctrlsService")],e.prototype,"ctrlsService",void 0),vl([ce],e.prototype,"init",null),e}(),yl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},bl=function(){function e(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}return e.prototype.onDragEnter=function(e){var t=this;if(this.clearColumnsList(),!this.gridOptionsWrapper.isFunctionsReadOnly()){var n=e.dragItem.columns;n&&n.forEach((function(e){e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?t.columnsToAggregate.push(e):e.isAllowRowGroup()?t.columnsToGroup.push(e):e.isAllowPivot()&&t.columnsToPivot.push(e)))}))}},e.prototype.getIconName=function(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?ra.ICON_PINNED:ra.ICON_MOVE:null},e.prototype.onDragLeave=function(e){this.clearColumnsList()},e.prototype.clearColumnsList=function(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0},e.prototype.onDragging=function(e){},e.prototype.onDragStop=function(e){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")},yl([de("columnModel")],e.prototype,"columnModel",void 0),yl([de("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),e}(),wl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},xl=function(e){function n(t,n){var r=e.call(this)||this;return r.pinned=t,r.eContainer=n,r}return wl(n,e),n.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){switch(e.pinned){case Ce.PINNED_LEFT:e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.leftRowContainerCtrl.getContainerElement()],[t.bottomLeftRowContainerCtrl.getContainerElement()],[t.topLeftRowContainerCtrl.getContainerElement()]];break;case Ce.PINNED_RIGHT:e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.rightRowContainerCtrl.getContainerElement()],[t.bottomRightRowContainerCtrl.getContainerElement()],[t.topRightRowContainerCtrl.getContainerElement()]];break;default:e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.centerRowContainerCtrl.getViewportElement()],[t.bottomCenterRowContainerCtrl.getViewportElement()],[t.topCenterRowContainerCtrl.getViewportElement()]]}}))},n.prototype.isInterestedIn=function(e){return e===t.DragSourceType.HeaderCell||e===t.DragSourceType.ToolPanel&&this.gridOptionsWrapper.isAllowDragFromColumnsToolPanel()},n.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},n.prototype.getContainer=function(){return this.eContainer},n.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new ml(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new bl(this.pinned)),this.dragAndDropService.addDropTarget(this)},n.prototype.getIconName=function(){return this.currentDropListener.getIconName()},n.prototype.isDropColumnInPivotMode=function(e){return this.columnModel.isPivotMode()&&e.dragSource.type===t.DragSourceType.ToolPanel},n.prototype.onDragEnter=function(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)},n.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},n.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},n.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},Cl([de("dragAndDropService")],n.prototype,"dragAndDropService",void 0),Cl([de("columnModel")],n.prototype,"columnModel",void 0),Cl([de("ctrlsService")],n.prototype,"ctrlsService",void 0),Cl([ce],n.prototype,"postConstruct",null),Cl([ce],n.prototype,"init",null),n}(ze),Sl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),El=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_l=0,Rl=function(e){function t(t,n){var r=e.call(this)||this;return r.lastFocusEvent=null,r.columnGroupChild=t,r.parentRowCtrl=n,r.instanceId=t.getUniqueId()+"-"+_l++,r}return Sl(t,e),t.prototype.shouldStopEventPropagation=function(e){var t=this.focusService.getFocusedHeader(),n=t.headerRowIndex,r=t.column;return Gr(this.gridOptionsWrapper,e,n,r)},t.prototype.setGui=function(e){this.eGui=e,this.addDomData()},t.prototype.addDomData=function(){var e=this,n=t.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsWrapper.setDomData(this.eGui,n,this),this.addDestroyFunc((function(){return e.gridOptionsWrapper.setDomData(e.eGui,n,null)}))},t.prototype.focus=function(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)},t.prototype.getRowIndex=function(){return this.parentRowCtrl.getRowIndex()},t.prototype.getParentRowCtrl=function(){return this.parentRowCtrl},t.prototype.getPinned=function(){return this.parentRowCtrl.getPinned()},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.getColumnGroupChild=function(){return this.columnGroupChild},t.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",El([de("focusService")],t.prototype,"focusService",void 0),t}(ze),Ol=function(){function e(){}return e.getFloatingFilterType=function(e){return this.filterToFloatingFilterMapping[e]},e.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},e}(),Al=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Tl=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.columnOrGroup=t,i.eCell=n,i.ariaEl=i.eCell.querySelector("[role=columnheader]")||i.eCell,i.colsSpanning=o,i.beans=r,i}return Al(t,e),t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?v(this.colsSpanning):this.columnOrGroup},t.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,_e.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedListener(this.beans.gridOptionsWrapper,es.PROP_DOM_LAYOUT,this.onLeftChanged.bind(this))},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsWrapper.isSuppressColumnMoveAnimation(),t=o(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,t=this.getColumnOrGroup(),n=t.getLeft(),r=t.getOldLeft(),o=this.modifyLeftForPrintLayout(t,r),i=this.modifyLeftForPrintLayout(t,n);this.setLeft(o),this.actualLeft=i,this.beans.columnAnimationService.executeNextVMTurn((function(){e.actualLeft===i&&e.setLeft(i)}))},t.prototype.onLeftChanged=function(){var e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)},t.prototype.modifyLeftForPrintLayout=function(e,t){if(!(this.beans.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_PRINT))return t;if(e.getPinned()===Ce.PINNED_LEFT)return t;var n=this.beans.columnModel.getDisplayedColumnsLeftWidth();return e.getPinned()===Ce.PINNED_RIGHT?n+this.beans.columnModel.getBodyContainerWidth()+t:n+t},t.prototype.setLeft=function(e){var t;if(o(e)&&(this.eCell.style.left=e+"px"),this.columnOrGroup instanceof _e)t=this.columnOrGroup;else{var n=this.columnOrGroup.getLeafColumns();if(!n.length)return;n.length>1&&vr(this.ariaEl,n.length),t=n[0]}var r=this.beans.columnModel.getAriaColumnIndex(t);gr(this.ariaEl,r)},Pl([ce],t.prototype,"postConstruct",null),t}(ze),Dl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Nl=function(e){function t(t,n){var r=e.call(this)||this;return r.columns=t,r.element=n,r}return Dl(t,e),t.prototype.postConstruct=function(){this.gridOptionsWrapper.isColumnHoverHighlight()&&this.addMouseHoverListeners()},t.prototype.addMouseHoverListeners=function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))},t.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},kl([de("columnHoverService")],t.prototype,"columnHoverService",void 0),kl([ce],t.prototype,"postConstruct",null),t}(ze),Ml=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Il=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ll=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.column=t,r}return Ml(n,e),n.prototype.setComp=function(t,n,r,o){e.prototype.setGui.call(this,n),this.comp=t,this.eButtonShowMainFilter=r,this.eFloatingFilterBody=o;var i=this.column.getColDef();this.active=(!!i.filter||!!i.filterFramework)&&!!i.floatingFilter,this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this))},n.prototype.setupUi=function(){if(this.comp.addOrRemoveButtonWrapperCssClass("ag-hidden",!this.active||this.suppressFilterButton),this.active){this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton);var e=Nr("filter",this.gridOptionsWrapper,this.column);e&&this.eButtonShowMainFilter.appendChild(e)}},n.prototype.setupFocus=function(){this.createManagedBean(new Co(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},n.prototype.onTabKeyDown=function(e){if(!(document.activeElement===this.eGui)){var t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);t&&(e.preventDefault(),t.focus())}},n.prototype.handleKeyDown=function(e){var t=document.activeElement===this.eGui;switch(e.keyCode){case mo.UP:case mo.DOWN:t||e.preventDefault();case mo.LEFT:case mo.RIGHT:if(t)return;e.stopPropagation();case mo.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case mo.ESCAPE:t||this.eGui.focus()}},n.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var t=this.focusService.isKeyboardMode(),n=!!e.relatedTarget&&!hn(e.relatedTarget,"ag-floating-filter"),r=!!e.relatedTarget&&yn(e.relatedTarget,"ag-floating-filter");if(t&&n&&r&&e.target===this.eGui){var o=this.lastFocusEvent,i=!(!o||o.keyCode!==mo.TAB);if(o&&i){var a=this.beans.focusService.getFocusedHeader(),s=this.beans.columnModel.getDisplayedColAfter(this.column),l=a&&s===a.column,c=!!(t&&o.shiftKey&&l);this.focusService.focusInto(this.eGui,c)}}var u=this.getRowIndex();this.beans.focusService.setFocusedHeader(u,this.column)}},n.prototype.setupHover=function(){var e=this;this.createManagedBean(new Nl([this.column],this.eGui));var t=function(){if(e.gridOptionsWrapper.isColumnHoverHighlight()){var t=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_HOVER_CHANGED,t),t()},n.prototype.setupLeft=function(){var e=new Tl(this.column,this.eGui,this.beans);this.createManagedBean(e)},n.prototype.setupUserComp=function(){if(this.active){var e=this.column.getColDef(),t=this.filterManager.createFilterParams(this.column,e),r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(e,"filter",t),o=n.getDefaultFloatingFilterType(e);null==o&&(o="agReadOnlyFloatingFilter");var i={api:this.gridApi,column:this.column,filterParams:r,currentParentModel:this.currentParentModel.bind(this),parentFilterInstance:this.parentFilterInstance.bind(this),showParentFilter:this.showParentFilter.bind(this),onFloatingFilterChanged:this.onFloatingFilterChanged.bind(this),suppressFilterButton:!1};this.suppressFilterButton=!!e.floatingFilterComponentParams&&!!e.floatingFilterComponentParams.suppressFilterButton;var a=this.userComponentFactory.getFloatingFilterCompDetails(e,i,o);a&&this.comp.setCompDetails(a)}},n.getDefaultFloatingFilterType=function(e){if(null==e)return null;var n=null;if("string"===typeof e.filter)n=Ol.getFloatingFilterType(e.filter);else if(e.filterFramework);else if(!0===e.filter){n=xe.isRegistered(t.ModuleNames.SetFilterModule)?"agSetColumnFloatingFilter":"agTextColumnFloatingFilter"}return n},n.prototype.currentParentModel=function(){var e=this.getFilterComponent(!1);return e?e.resolveNow(null,(function(e){return e&&e.getModel()})):null},n.prototype.getFilterComponent=function(e){return void 0===e&&(e=!0),this.filterManager.getFilterComponent(this.column,"NO_UI",e)},n.prototype.onFloatingFilterChanged=function(){console.warn("AG Grid: since version 21.x, how floating filters are implemented has changed. Instead of calling params.onFloatingFilterChanged(), get a reference to the main filter via params.parentFilterInstance() and then set a value on the parent filter directly.")},n.prototype.parentFilterInstance=function(e){var t=this,n=this.getFilterComponent();n&&n.then((function(n){var r=t.frameworkComponentWrapper?t.frameworkComponentWrapper.unwrap(n):n;e(r)}))},n.prototype.showParentFilter=function(){var e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,e,"floatingFilter","filterMenuTab",["filterMenuTab"])},n.prototype.setupSyncWithFilter=function(){var e=this;if(this.active){var t=function(t){var n=e.comp.getFloatingFilterComp();if(n){var r=e.currentParentModel();n.then((function(e){return e&&e.onParentModelChanged(r,t)}))}};this.addManagedListener(this.column,_e.EVENT_FILTER_CHANGED,t),this.filterManager.isFilterActive(this.column)&&t(null)}},n.prototype.setupWidth=function(){var e=this,t=function(){var t=e.column.getActualWidth()+"px";e.comp.setWidth(t)};this.addManagedListener(this.column,_e.EVENT_WIDTH_CHANGED,t),t()},Il([de("userComponentFactory")],n.prototype,"userComponentFactory",void 0),Il([de("filterManager")],n.prototype,"filterManager",void 0),Il([de("columnHoverService")],n.prototype,"columnHoverService",void 0),Il([de("gridApi")],n.prototype,"gridApi",void 0),Il([de("menuFactory")],n.prototype,"menuFactory",void 0),Il([de("beans")],n.prototype,"beans",void 0),Il([he("frameworkComponentWrapper")],n.prototype,"frameworkComponentWrapper",void 0),n}(Rl),Fl=function(){function e(){}return e.getHeaderClassesFromColDef=function(e,t,n,r){return i(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,n,r)},e.getToolPanelClassesFromColDef=function(e,t,n,r){return i(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,n,r)},e.getColumnClassesFromCollDef=function(e,t,n,r,o){if(i(e))return[];var a;"function"===typeof e?a=e({colDef:t,column:r,columnGroup:o,context:n.getContext(),api:n.getApi()}):a=e;return"string"===typeof a?[a]:Array.isArray(a)?a:[]},e}(),Gl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Wl=function(e){function t(t,n,r,o,i){var a=e.call(this)||this;return a.pinned=t,a.column=n,a.eResize=r,a.comp=o,a.ctrl=i,a}return Gl(t,e),t.prototype.postConstruct=function(){var e,t,n=this,r=this.column.getColDef(),o=[],i=function(){o.forEach((function(e){return e()})),o.length=0},a=function(){var a=n.column.isResizable(),s=!n.gridOptionsWrapper.isSuppressAutoSize()&&!r.suppressAutoSize;(a!==e||s!==t)&&(e=a,t=s,i(),function(){if(gn(n.eResize,e),e){var r=n.horizontalResizeService.addResizeBar({eResizeBar:n.eResize,onResizeStart:n.onResizeStart.bind(n),onResizing:n.onResizing.bind(n,!1),onResizeEnd:n.onResizing.bind(n,!0)});if(o.push(r),t){var i=n.gridOptionsWrapper.isSkipHeaderOnAutoSize(),a=function(){n.columnModel.autoSizeColumn(n.column,i,"uiColumnResized")};n.eResize.addEventListener("dblclick",a);var s=new wi(n.eResize);s.addEventListener(wi.EVENT_DOUBLE_TAP,a),n.addDestroyFunc((function(){n.eResize.removeEventListener("dblclick",a),s.removeEventListener(wi.EVENT_DOUBLE_TAP,a),s.destroy()}))}}}())};a(),this.addDestroyFunc(i),this.ctrl.addRefreshFunction(a)},t.prototype.onResizing=function(e,t){var n=this.normaliseResizeAmount(t),r=[{key:this.column,newWidth:this.resizeStartWidth+n}];this.columnModel.setColumnWidths(r,this.resizeWithShiftKey,e,"uiColumnDragged"),e&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.resizeWithShiftKey=e,this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.normaliseResizeAmount=function(e){var t=e,n=this.pinned!==Ce.PINNED_LEFT,r=this.pinned===Ce.PINNED_RIGHT;return this.gridOptionsWrapper.isEnableRtl()?n&&(t*=-1):r&&(t*=-1),t},Hl([de("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),Hl([de("columnModel")],t.prototype,"columnModel",void 0),Hl([ce],t.prototype,"postConstruct",null),t}(ze),Vl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jl=function(e){function t(t,n,r){void 0===n&&(n="ag-checkbox"),void 0===r&&(r="checkbox");var o=e.call(this,t,n,r)||this;return o.labelAlignment="right",o.selected=!1,o.readOnly=!1,o.passive=!1,o}return Vl(t,e),t.prototype.addInputListeners=function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))},t.prototype.getNextValue=function(){return void 0===this.selected||!this.selected},t.prototype.setPassive=function(e){this.passive=e},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setReadOnly=function(e){dn(this.eWrapper,"ag-disabled",e),this.eInput.disabled=e,this.readOnly=e},t.prototype.setDisabled=function(t){return dn(this.eWrapper,"ag-disabled",t),e.prototype.setDisabled.call(this,t)},t.prototype.toggle=function(){if(!this.eInput.disabled){var e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}},t.prototype.getValue=function(){return this.isSelected()},t.prototype.setValue=function(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this},t.prototype.setName=function(e){return this.getInputElement().name=e,this},t.prototype.isSelected=function(){return this.selected},t.prototype.setSelected=function(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"===typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue))},t.prototype.dispatchChange=function(e,n,r){this.dispatchEvent({type:t.EVENT_CHANGED,selected:e,previousValue:n,event:r});var o=this.getInputElement(),i={type:Ke.EVENT_CHECKBOX_CHANGED,id:o.id,name:o.name,selected:e,previousValue:n};this.eventService.dispatchEvent(i)},t.prototype.onCheckboxClick=function(e){if(!this.passive&&!this.eInput.disabled){var t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}},t.prototype.refreshSelectedClass=function(e){dn(this.eWrapper,"ag-checked",!0===e),dn(this.eWrapper,"ag-indeterminate",null==e)},t}(Vo),Bl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ul=function(e){function t(t){var n=e.call(this)||this;n.cbSelectAllVisible=!1,n.processingEventFromCheckbox=!1,n.column=t;var r=t.getColDef();return n.filteredOnly=!!r&&!!r.headerCheckboxSelectionFilteredOnly,n}return Bl(t,e),t.prototype.onSpaceKeyPressed=function(e){var t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(document.activeElement)&&(e.preventDefault(),t.setValue(!t.getValue()))},t.prototype.getCheckboxGui=function(){return this.cbSelectAll.getGui()},t.prototype.setComp=function(e){this.comp=e,this.cbSelectAll=this.createManagedBean(new jl),this.cbSelectAll.addCssClass("ag-header-select-all"),tr(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,jl.EVENT_CHANGED,this.onCbSelectAll.bind(this)),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible),this.cbSelectAllVisible&&(this.checkRightRowModelType(),this.updateStateOfCheckbox()),this.refreshHeaderAriaDescribedBy(this.cbSelectAllVisible)},t.prototype.refreshHeaderAriaDescribedBy=function(e){var t=e?this.cbSelectAll.getInputElement().id:void 0;this.comp.setAriaDescribedBy(t)},t.prototype.onModelChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.onSelectionChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.getNextCheckboxState=function(e){return(0!==e.selected||0!==e.notSelected)&&(e.selected>0&&e.notSelected>0?null:e.selected>0)},t.prototype.updateStateOfCheckbox=function(){if(!this.processingEventFromCheckbox){this.processingEventFromCheckbox=!0;var e=this.getSelectionCount(),t=this.getNextCheckboxState(e);this.cbSelectAll.setValue(t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}},t.prototype.refreshSelectAllLabel=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),n=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAll.setInputAriaLabel(n+" ("+t+")")},t.prototype.getSelectionCount=function(){var e=this,t=0,n=0,r=function(r){e.gridOptionsWrapper.isGroupSelectsChildren()&&r.group||(r.isSelected()?t++:r.selectable&&n++)};return this.filteredOnly?this.gridApi.forEachNodeAfterFilter(r):this.gridApi.forEachNode(r),{notSelected:n,selected:t}},t.prototype.checkRightRowModelType=function(){var e=this.rowModel.getType();e===Ce.ROW_MODEL_TYPE_CLIENT_SIDE||console.warn("AG Grid: selectAllCheckbox is only available if using normal row model, you are using "+e)},t.prototype.onCbSelectAll=function(){this.processingEventFromCheckbox||this.cbSelectAllVisible&&(this.cbSelectAll.getValue()?this.selectionService.selectAllRowNodes(this.filteredOnly):this.selectionService.deselectAllRowNodes(this.filteredOnly))},t.prototype.isCheckboxSelection=function(){var e=this.column.getColDef().headerCheckboxSelection;"function"===typeof e&&(e=e({column:this.column,colDef:this.column.getColDef(),columnApi:this.columnApi,api:this.gridApi}));return!!e&&(this.gridOptionsWrapper.isRowModelServerSide()?(console.warn("headerCheckboxSelection is not supported for Server Side Row Model"),!1):this.gridOptionsWrapper.isRowModelInfinite()?(console.warn("headerCheckboxSelection is not supported for Infinite Row Model"),!1):!this.gridOptionsWrapper.isRowModelViewport()||(console.warn("headerCheckboxSelection is not supported for Viewport Row Model"),!1))},zl([de("gridApi")],t.prototype,"gridApi",void 0),zl([de("columnApi")],t.prototype,"columnApi",void 0),zl([de("rowModel")],t.prototype,"rowModel",void 0),zl([de("selectionService")],t.prototype,"selectionService",void 0),t}(ze),Yl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ql=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.refreshFunctions=[],r.userHeaderClasses=new Set,r.column=t,r}return Yl(n,e),n.prototype.setComp=function(t,n,r){var o=this;e.prototype.setGui.call(this,n),this.comp=t,this.colDefVersion=this.columnModel.getColDefVersion(),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.addColumnHoverListener(),this.setupFilterCss(),this.setupColId(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.createManagedBean(new Wl(this.getPinned(),this.column,r,t,this)),this.createManagedBean(new Nl([this.column],n)),this.createManagedBean(new Tl(this.column,n,this.beans)),this.createManagedBean(new Co(n,{shouldStopEventPropagation:function(e){return o.shouldStopEventPropagation(e)},onTabKeyDown:function(){return null},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this))},n.prototype.setupUserComp=function(){var e=this.lookupUserCompDetails();this.setCompDetails(e)},n.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)},n.prototype.lookupUserCompDetails=function(){var e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)},n.prototype.createParams=function(){var e=this,t=this.column.getColDef();return{column:this.column,displayName:this.displayName,enableSorting:t.sortable,enableMenu:this.menuEnabled,showColumnMenu:function(t){e.gridApi.showColumnMenuAfterButtonClick(e.column,t)},progressSort:function(t){e.sortController.progressSort(e.column,!!t,"uiColumnSorted")},setSort:function(t,n){e.sortController.setSortForColumn(e.column,t,!!n,"uiColumnSorted")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext(),eGridHeader:this.getGui()}},n.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new Ul(this.column)),this.selectAllFeature.setComp(this.comp)},n.prototype.getSelectAllGui=function(){return this.selectAllFeature.getCheckboxGui()},n.prototype.handleKeyDown=function(e){e.keyCode===mo.SPACE&&this.selectAllFeature.onSpaceKeyPressed(e),e.keyCode===mo.ENTER&&this.onEnterKeyPressed(e)},n.prototype.onEnterKeyPressed=function(e){var t=this.comp.getUserCompInstance();if(t)if(e.ctrlKey||e.metaKey)this.menuEnabled&&t.showMenu&&(e.preventDefault(),t.showMenu());else if(this.sortable){var n=e.shiftKey;this.sortController.progressSort(this.column,n,"uiColumnSorted")}},n.prototype.isMenuEnabled=function(){return this.menuEnabled},n.prototype.onFocusIn=function(e){if(!this.getGui().contains(e.relatedTarget)){var t=this.getRowIndex();this.focusService.setFocusedHeader(t,this.column)}this.setActiveHeader(!0)},n.prototype.onFocusOut=function(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)},n.prototype.setupTooltip=function(){var e=this,t={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getGui:function(){return e.eGui},getLocation:function(){return"header"},getTooltipValue:function(){return e.column.getColDef().headerTooltip}},n=this.createManagedBean(new vs(t,this.beans));n.setComp(this.comp),this.refreshFunctions.push((function(){return n.refreshToolTip()}))},n.prototype.setupClassesFromColDef=function(){var e=this,t=function(){var t=e.column.getColDef(),n=e.gridOptionsWrapper,r=Fl.getHeaderClassesFromColDef(t,n,e.column,null),o=e.userHeaderClasses;e.userHeaderClasses=new Set(r),r.forEach((function(t){o.has(t)?o.delete(t):e.comp.addOrRemoveCssClass(t,!0)})),o.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!1)}))};this.refreshFunctions.push(t),t()},n.prototype.getGui=function(){return this.eGui},n.prototype.setDragSource=function(e){var n=this;this.dragSourceElement=e,this.removeDragSource(),e&&this.draggable&&(this.moveDragSource={type:t.DragSourceType.HeaderCell,eElement:e,defaultIconName:ra.ICON_HIDE,getDragItem:function(){return n.createDragItem()},dragItemName:this.displayName,onDragStarted:function(){return n.column.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return n.column.setMoving(!1,"uiColumnMoved")}},this.dragAndDropService.addDragSource(this.moveDragSource,!0))},n.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},n.prototype.removeDragSource=function(){this.moveDragSource&&(this.dragAndDropService.removeDragSource(this.moveDragSource),this.moveDragSource=void 0)},n.prototype.onNewColumnsLoaded=function(){var e=this.columnModel.getColDefVersion();e!=this.colDefVersion&&(this.colDefVersion=e,this.refresh())},n.prototype.updateState=function(){var e=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu,this.sortable=e.sortable,this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()},n.prototype.addRefreshFunction=function(e){this.refreshFunctions.push(e)},n.prototype.refresh=function(){this.updateState(),this.refreshHeaderComp(),this.refreshFunctions.forEach((function(e){return e()}))},n.prototype.refreshHeaderComp=function(){var e=this.lookupUserCompDetails();!!(null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass)&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)},n.prototype.attemptHeaderCompRefresh=function(e){var t=this.comp.getUserCompInstance();return!!t&&(!!t.refresh&&t.refresh(e))},n.prototype.calculateDisplayName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"header",!0)},n.prototype.checkDisplayName=function(){this.displayName!==this.calculateDisplayName()&&this.refresh()},n.prototype.workOutDraggable=function(){var e=this.column.getColDef();return!!(!this.gridOptionsWrapper.isSuppressMovableColumns()&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot},n.prototype.onColumnRowGroupChanged=function(){this.checkDisplayName()},n.prototype.onColumnPivotChanged=function(){this.checkDisplayName()},n.prototype.onColumnValueChanged=function(){this.checkDisplayName()},n.prototype.setupWidth=function(){var e=this,t=function(){e.comp.setWidth(e.column.getActualWidth()+"px")};this.addManagedListener(this.column,_e.EVENT_WIDTH_CHANGED,t),t()},n.prototype.setupMovingCss=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};this.addManagedListener(this.column,_e.EVENT_MOVING_CHANGED,t),t()},n.prototype.setupMenuClass=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-column-menu-visible",e.column.isMenuVisible())};this.addManagedListener(this.column,_e.EVENT_MENU_VISIBLE_CHANGED,t),t()},n.prototype.setupSortableClass=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!e.sortable)},n=function(){e.sortable?e.comp.setAriaSort(nr(e.column)):e.comp.setAriaSort(void 0)};t(),n(),this.addRefreshFunction(t),this.addRefreshFunction(n),this.addManagedListener(this.column,_e.EVENT_SORT_CHANGED,n)},n.prototype.addColumnHoverListener=function(){var e=this,t=function(){if(e.gridOptionsWrapper.isColumnHoverHighlight()){var t=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_HOVER_CHANGED,t),t()},n.prototype.setupFilterCss=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-filtered",e.column.isFilterActive())};this.addManagedListener(this.column,_e.EVENT_FILTER_ACTIVE_CHANGED,t),t()},n.prototype.setupColId=function(){this.comp.setColId(this.column.getColId())},n.prototype.addActiveHeaderMouseListeners=function(){var e=this,t=function(t){return e.setActiveHeader("mouseenter"===t.type)};this.addManagedListener(this.getGui(),"mouseenter",t),this.addManagedListener(this.getGui(),"mouseleave",t)},n.prototype.setActiveHeader=function(e){this.comp.addOrRemoveCssClass("ag-header-active",e)},Xl([de("columnModel")],n.prototype,"columnModel",void 0),Xl([de("columnHoverService")],n.prototype,"columnHoverService",void 0),Xl([de("beans")],n.prototype,"beans",void 0),Xl([de("sortController")],n.prototype,"sortController",void 0),Xl([de("menuFactory")],n.prototype,"menuFactory",void 0),Xl([de("dragAndDropService")],n.prototype,"dragAndDropService",void 0),Xl([de("gridApi")],n.prototype,"gridApi",void 0),Xl([de("columnApi")],n.prototype,"columnApi",void 0),Xl([de("userComponentFactory")],n.prototype,"userComponentFactory",void 0),Xl([ue],n.prototype,"removeDragSource",null),n}(Rl),Kl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$l=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ql=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.eResize=n,i.comp=t,i.pinned=r,i.columnGroup=o,i}return Kl(t,e),t.prototype.postConstruct=function(){var e=this;if(this.columnGroup.isResizable()){var t=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(t),!this.gridOptionsWrapper.isSuppressAutoSize()){var n=this.gridOptionsWrapper.isSkipHeaderOnAutoSize();this.eResize.addEventListener("dblclick",(function(t){var r=[];e.columnGroup.getDisplayedLeafColumns().forEach((function(e){e.getColDef().suppressAutoSize||r.push(e.getColId())})),r.length>0&&e.columnModel.autoSizeColumns(r,n,"uiColumnResized")}))}}else this.comp.addOrRemoveResizableCssClass("ag-hidden",!0)},t.prototype.onResizeStart=function(e){var t=this,n=this.columnGroup.getDisplayedLeafColumns();this.resizeCols=n.filter((function(e){return e.isResizable()})),this.resizeStartWidth=0,this.resizeCols.forEach((function(e){return t.resizeStartWidth+=e.getActualWidth()})),this.resizeRatios=[],this.resizeCols.forEach((function(e){return t.resizeRatios.push(e.getActualWidth()/t.resizeStartWidth)}));var r=null;if(e&&(r=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),r){var o=r.getDisplayedLeafColumns();this.resizeTakeFromCols=o.filter((function(e){return e.isResizable()})),this.resizeTakeFromStartWidth=0,this.resizeTakeFromCols.forEach((function(e){return t.resizeTakeFromStartWidth+=e.getActualWidth()})),this.resizeTakeFromRatios=[],this.resizeTakeFromCols.forEach((function(e){return t.resizeTakeFromRatios.push(e.getActualWidth()/t.resizeTakeFromStartWidth)}))}else this.resizeTakeFromCols=null,this.resizeTakeFromStartWidth=null,this.resizeTakeFromRatios=null;this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.onResizing=function(e,t){var n=[],r=this.normaliseDragChange(t);n.push({columns:this.resizeCols,ratios:this.resizeRatios,width:this.resizeStartWidth+r}),this.resizeTakeFromCols&&n.push({columns:this.resizeTakeFromCols,ratios:this.resizeTakeFromRatios,width:this.resizeTakeFromStartWidth-r}),this.columnModel.resizeColumnSets(n,e,"uiColumnDragged"),e&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.normaliseDragChange=function(e){var t=e;return this.gridOptionsWrapper.isEnableRtl()?this.pinned!==Ce.PINNED_LEFT&&(t*=-1):this.pinned===Ce.PINNED_RIGHT&&(t*=-1),t},$l([de("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),$l([de("columnModel")],t.prototype,"columnModel",void 0),$l([ce],t.prototype,"postConstruct",null),t}(ze),Zl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jl=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ec=function(e){function t(t,n){var r=e.call(this)||this;return r.removeChildListenersFuncs=[],r.columnGroup=n,r.comp=t,r}return Zl(t,e),t.prototype.postConstruct=function(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,Oe.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))},t.prototype.addListenersToChildrenColumns=function(){var e=this;this.removeListenersOnChildrenColumns();var t=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((function(n){n.addEventListener(_e.EVENT_WIDTH_CHANGED,t),n.addEventListener(_e.EVENT_VISIBLE_CHANGED,t),e.removeChildListenersFuncs.push((function(){n.removeEventListener(_e.EVENT_WIDTH_CHANGED,t),n.removeEventListener(_e.EVENT_VISIBLE_CHANGED,t)}))}))},t.prototype.removeListenersOnChildrenColumns=function(){this.removeChildListenersFuncs.forEach((function(e){return e()})),this.removeChildListenersFuncs=[]},t.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},t.prototype.onWidthChanged=function(){this.comp.setWidth(this.columnGroup.getActualWidth()+"px")},Jl([ce],t.prototype,"postConstruct",null),t}(ze),tc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},rc=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.columnGroup=t,r}return tc(n,e),n.prototype.setComp=function(t,n,r){e.prototype.setGui.call(this,n),this.comp=t,this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.columnGroup,"header"),this.addClasses(),this.addAttributes(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();var o=this.getParentRowCtrl().getPinned(),i=this.columnGroup.getOriginalColumnGroup().getLeafColumns();this.createManagedBean(new Nl(i,n)),this.createManagedBean(new Tl(this.columnGroup,n,this.beans)),this.createManagedBean(new Ql(t,r,o,this.columnGroup)),this.createManagedBean(new ec(t,this.columnGroup)),this.createManagedBean(new Co(n,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},n.prototype.setupUserComp=function(){var e=this,t=this.displayName,n={displayName:this.displayName,columnGroup:this.columnGroup,setExpanded:function(t){e.columnModel.setColumnGroupOpened(e.columnGroup.getOriginalColumnGroup(),t,"gridInitializing")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()};if(!t){for(var r=this.columnGroup,o=r.getLeafColumns();r.getParent()&&r.getParent().getLeafColumns().length===o.length;)r=r.getParent();var i=r.getColGroupDef();i&&(t=i.headerName),t||(t=o?this.columnModel.getDisplayNameForColumn(o[0],"header",!0):"")}var a=this.userComponentFactory.getHeaderGroupCompDetails(n);this.comp.setUserCompDetails(a)},n.prototype.setupTooltip=function(){var e=this,t=this.columnGroup.getColGroupDef(),n={getColumn:function(){return e.columnGroup},getGui:function(){return e.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return t&&t.headerTooltip}};t&&(n.getColDef=function(){return t}),this.createManagedBean(new vs(n,this.beans)).setComp(this.comp)},n.prototype.setupExpandable=function(){var e=this.columnGroup.getOriginalColumnGroup();this.refreshExpanded(),this.addManagedListener(e,Ae.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,Ae.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))},n.prototype.refreshExpanded=function(){var e=this.columnGroup;this.expandable=e.isExpandable();var t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)},n.prototype.addAttributes=function(){this.comp.setColId(this.columnGroup.getUniqueId())},n.prototype.addClasses=function(){var e=this,t=this.columnGroup.getColGroupDef(),n=Fl.getHeaderClassesFromColDef(t,this.gridOptionsWrapper,null,this.columnGroup);n.push(this.columnGroup.isPadding()?"ag-header-group-cell-no-group":"ag-header-group-cell-with-group"),n.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!0)}))},n.prototype.setupMovingCss=function(){var e=this,t=this.columnGroup.getOriginalColumnGroup().getLeafColumns(),n=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.columnGroup.isMoving())};t.forEach((function(t){e.addManagedListener(t,_e.EVENT_MOVING_CHANGED,n)})),n()},n.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var t=this.getRowIndex();this.beans.focusService.setFocusedHeader(t,this.columnGroup)}},n.prototype.handleKeyDown=function(e){var t=document.activeElement===this.eGui;if(this.expandable&&t&&e.keyCode===mo.ENTER){var n=this.columnGroup,r=!n.isExpanded();this.columnModel.setColumnGroupOpened(n.getOriginalColumnGroup(),r,"uiColumnExpanded")}},n.prototype.setDragSource=function(e){var n=this;if(!this.isSuppressMoving()){var r=this.columnGroup.getOriginalColumnGroup().getLeafColumns(),o={type:t.DragSourceType.HeaderCell,eElement:e,defaultIconName:ra.ICON_HIDE,dragItemName:this.displayName,getDragItem:this.getDragItemForGroup.bind(this),onDragStarted:function(){return r.forEach((function(e){return e.setMoving(!0,"uiColumnDragged")}))},onDragStopped:function(){return r.forEach((function(e){return e.setMoving(!1,"uiColumnDragged")}))}};this.dragAndDropService.addDragSource(o,!0),this.addDestroyFunc((function(){return n.dragAndDropService.removeDragSource(o)}))}},n.prototype.getDragItemForGroup=function(){var e=this.columnGroup.getOriginalColumnGroup().getLeafColumns(),t={};e.forEach((function(e){return t[e.getId()]=e.isVisible()}));var n=[];return this.columnModel.getAllDisplayedColumns().forEach((function(t){e.indexOf(t)>=0&&(n.push(t),b(e,t))})),e.forEach((function(e){return n.push(e)})),{columns:n,visibleState:t}},n.prototype.isSuppressMoving=function(){var e=!1;return this.columnGroup.getLeafColumns().forEach((function(t){(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)})),e||this.gridOptionsWrapper.isSuppressMovableColumns()},nc([de("beans")],n.prototype,"beans",void 0),nc([de("columnModel")],n.prototype,"columnModel",void 0),nc([de("dragAndDropService")],n.prototype,"dragAndDropService",void 0),nc([de("userComponentFactory")],n.prototype,"userComponentFactory",void 0),nc([de("gridApi")],n.prototype,"gridApi",void 0),nc([de("columnApi")],n.prototype,"columnApi",void 0),n}(Rl),oc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ic=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ac=0,sc=function(e){function n(t,n,r){var o=e.call(this)||this;return o.instanceId=ac++,o.headerCellCtrls={},o.rowIndex=t,o.pinned=n,o.type=r,o}return oc(n,e),n.prototype.getInstanceId=function(){return this.instanceId},n.prototype.setComp=function(e){this.comp=e,this.onRowHeightChanged(),this.onVirtualColumnsChanged(),this.setWidth(),this.addEventListeners(),$t()&&this.comp.setTransform("translateZ(0)"),e.setAriaRowIndex(this.rowIndex+1)},n.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.gridOptionsWrapper,es.PROP_DOM_LAYOUT,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,es.PROP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,es.PROP_PIVOT_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,es.PROP_GROUP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,es.PROP_PIVOT_GROUP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.gridOptionsWrapper,es.PROP_FLOATING_FILTERS_HEIGHT,this.onRowHeightChanged.bind(this))},n.prototype.getHtmlElementForColumnHeader=function(e){if(this.type==t.HeaderRowType.COLUMN){var n=p(this.headerCellCtrls,(function(t){return t.getColumnGroupChild()==e}));if(n)return n.getGui()}},n.prototype.onDisplayedColumnsChanged=function(){this.onVirtualColumnsChanged(),this.setWidth()},n.prototype.getType=function(){return this.type},n.prototype.onColumnResized=function(){this.setWidth()},n.prototype.setWidth=function(){var e=this.getWidthForRow();this.comp.setWidth(e+"px")},n.prototype.getWidthForRow=function(){return this.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_PRINT?null!=this.pinned?0:this.columnModel.getContainerWidth(Ce.PINNED_RIGHT)+this.columnModel.getContainerWidth(Ce.PINNED_LEFT)+this.columnModel.getContainerWidth(null):this.columnModel.getContainerWidth(this.pinned)},n.prototype.onRowHeightChanged=function(){var e,t,n=this.columnModel.getHeaderRowCount(),r=[],o=0;this.columnModel.isPivotMode()?(e=this.gridOptionsWrapper.getPivotGroupHeaderHeight(),t=this.gridOptionsWrapper.getPivotHeaderHeight()):(this.columnModel.hasFloatingFilters()&&(n++,o=1),e=this.gridOptionsWrapper.getGroupHeaderHeight(),t=this.gridOptionsWrapper.getHeaderHeight());for(var i=n-(1+o),a=0;a<i;a++)r.push(e);r.push(t);for(a=0;a<o;a++)r.push(this.gridOptionsWrapper.getFloatingFiltersHeight());var s=0;for(a=0;a<this.rowIndex;a++)s+=r[a];this.comp.setTop(s+"px"),this.comp.setHeight(r[this.rowIndex]+"px")},n.prototype.getPinned=function(){return this.pinned},n.prototype.getRowIndex=function(){return this.rowIndex},n.prototype.onVirtualColumnsChanged=function(){var e=this,n=this.headerCellCtrls;this.headerCellCtrls={},this.getColumnsInViewport().forEach((function(r){if(!r.isEmptyGroup()){var o=r.getUniqueId(),i=n[o];if(delete n[o],i&&i.getColumnGroupChild()!=r&&(e.destroyBean(i),i=void 0),null==i)switch(e.type){case t.HeaderRowType.FLOATING_FILTER:i=e.createBean(new Ll(r,e));break;case t.HeaderRowType.COLUMN_GROUP:i=e.createBean(new rc(r,e));break;default:i=e.createBean(new ql(r,e))}e.headerCellCtrls[o]=i}}));k(n,(function(t,n){var r;(r=n,!!e.focusService.isHeaderWrapperFocused(r)&&e.columnModel.isDisplayed(r.getColumnGroupChild()))?e.headerCellCtrls[t]=n:e.destroyBean(n)}));var r=H(this.headerCellCtrls);this.comp.setHeaderCtrls(r)},n.prototype.getColumnsInViewport=function(){return this.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_PRINT?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()},n.prototype.getColumnsInViewportPrintLayout=function(){var e=this;if(null!=this.pinned)return[];var t=[],n=this.getActualDepth();return[Ce.PINNED_LEFT,null,Ce.PINNED_RIGHT].forEach((function(r){var o=e.columnModel.getVirtualHeaderGroupRow(r,n);t=t.concat(o)})),t},n.prototype.getActualDepth=function(){return this.type==t.HeaderRowType.FLOATING_FILTER?this.rowIndex-1:this.rowIndex},n.prototype.getColumnsInViewportNormalLayout=function(){return this.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())},n.prototype.focusHeader=function(e,t){var n=p(H(this.headerCellCtrls),(function(t){return t.getColumnGroupChild()==e}));return!!n&&(n.focus(t),!0)},ic([de("columnModel")],n.prototype,"columnModel",void 0),ic([de("focusService")],n.prototype,"focusService",void 0),n}(ze),lc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},uc=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},pc=function(e){function n(t){var n=e.call(this)||this;return n.groupsRowCtrls=[],n.pinned=t,n}return lc(n,e),n.prototype.setComp=function(e,t){this.comp=e,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(t),this.addManagedListener(this.eventService,Ke.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()},n.prototype.setupDragAndDrop=function(e){var t=new xl(this.pinned,e);this.createManagedBean(t)},n.prototype.refresh=function(e){var n=this;void 0===e&&(e=!1);var r=new qr,o=this.focusService.getFocusHeaderToUseAfterRefresh();!function(){var e=n.columnModel.getHeaderRowCount()-1;n.groupsRowCtrls=n.destroyBeans(n.groupsRowCtrls);for(var o=0;o<e;o++){var i=n.createBean(new sc(r.next(),n.pinned,t.HeaderRowType.COLUMN_GROUP));n.groupsRowCtrls.push(i)}}(),function(){var o=r.next();(null==n.columnsRowCtrl||!e||n.columnsRowCtrl.getRowIndex()!==o)&&(n.destroyBean(n.columnsRowCtrl),n.columnsRowCtrl=n.createBean(new sc(o,n.pinned,t.HeaderRowType.COLUMN)))}(),function(){var o=function(){n.filtersRowCtrl=n.destroyBean(n.filtersRowCtrl)};if(!n.columnModel.isPivotMode()&&n.columnModel.hasFloatingFilters()){var i=r.next();if(n.filtersRowCtrl){var a=n.filtersRowCtrl.getRowIndex()!==i;e&&!a||o()}n.filtersRowCtrl||(n.filtersRowCtrl=n.createBean(new sc(i,n.pinned,t.HeaderRowType.FLOATING_FILTER)))}else o()}();var i=this.getAllCtrls();this.comp.setCtrls(i),this.restoreFocusOnHeader(o)},n.prototype.restoreFocusOnHeader=function(e){null!=e&&e.column.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})},n.prototype.getAllCtrls=function(){var e=uc(this.groupsRowCtrls,[this.columnsRowCtrl]);return this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e},n.prototype.onGridColumnsChanged=function(){this.refresh(!0)},n.prototype.setupCenterWidth=function(){var e=this;null==this.pinned&&this.createManagedBean(new gl((function(t){return e.comp.setCenterWidth(t+"px")})))},n.prototype.setHorizontalScroll=function(e){this.comp.setContainerTransform("translateX("+e+"px)")},n.prototype.setupPinnedWidth=function(){var e=this;if(null!=this.pinned){var t=this.pinned===Ce.PINNED_LEFT,n=this.pinned===Ce.PINNED_RIGHT,r=function(){var r=t?e.pinnedWidthService.getPinnedLeftWidth():e.pinnedWidthService.getPinnedRightWidth();if(null!=r){var o=0==r,i=e.gridOptionsWrapper.isEnableRtl(),a=e.gridOptionsWrapper.getScrollbarWidth(),s=e.scrollVisibleService.isVerticalScrollShowing()&&(i&&t||!i&&n)?r+a:r;e.comp.setPinnedContainerWidth(s+"px"),e.comp.addOrRemoveCssClass("ag-hidden",o)}};this.addManagedListener(this.eventService,Ke.EVENT_LEFT_PINNED_WIDTH_CHANGED,r),this.addManagedListener(this.eventService,Ke.EVENT_RIGHT_PINNED_WIDTH_CHANGED,r),this.addManagedListener(this.eventService,Ke.EVENT_SCROLL_VISIBILITY_CHANGED,r),this.addManagedListener(this.eventService,Ke.EVENT_SCROLLBAR_WIDTH_CHANGED,r)}},n.prototype.getHtmlElementForColumnHeader=function(e){if(this.columnsRowCtrl)return this.columnsRowCtrl.getHtmlElementForColumnHeader(e)},n.prototype.getRowType=function(e){var t=this.getAllCtrls()[e];return t?t.getType():void 0},n.prototype.focusHeader=function(e,t,n){var r=this.getAllCtrls()[e];return!!r&&r.focusHeader(t,n)},n.prototype.getRowCount=function(){return this.getAllCtrls().length},cc([de("ctrlsService")],n.prototype,"ctrlsService",void 0),cc([de("scrollVisibleService")],n.prototype,"scrollVisibleService",void 0),cc([de("pinnedWidthService")],n.prototype,"pinnedWidthService",void 0),cc([de("columnModel")],n.prototype,"columnModel",void 0),cc([de("focusService")],n.prototype,"focusService",void 0),n}(ze),dc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},fc=function(e){function t(t){var n=e.call(this)||this;return n.headerRowComps={},n.rowCompsList=[],n.pinned=t,n}return dc(t,e),t.prototype.init=function(){var e=this;this.selectAndSetTemplate();var t={addOrRemoveCssClass:function(t,n){return e.addOrRemoveCssClass(t,n)},setCtrls:function(t){return e.setCtrls(t)},setCenterWidth:function(t){return e.eCenterContainer.style.width=t},setContainerTransform:function(t){return e.eCenterContainer.style.transform=t},setPinnedContainerWidth:function(t){var n=e.getGui();n.style.width=t,n.style.maxWidth=t,n.style.minWidth=t}};this.createManagedBean(new pc(this.pinned)).setComp(t,this.getGui())},t.prototype.selectAndSetTemplate=function(){var e=this.pinned==Ce.PINNED_LEFT,n=this.pinned==Ce.PINNED_RIGHT,r=e?t.PINNED_LEFT_TEMPLATE:n?t.PINNED_RIGHT_TEMPLATE:t.CENTER_TEMPLATE;this.setTemplate(r),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()},t.prototype.destroyRowComps=function(){this.setCtrls([])},t.prototype.destroyRowComp=function(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())},t.prototype.setCtrls=function(e){var t,n=this,r=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];e.forEach((function(e){var o=e.getInstanceId(),i=r[o];delete r[o];var a=i||n.createBean(new il(e));n.headerRowComps[o]=a,n.rowCompsList.push(a),function(e){var r=e.getGui();r.parentElement!=n.eRowContainer&&n.eRowContainer.appendChild(r),t&&Nn(n.eRowContainer,r,t),t=r}(a)})),H(r).forEach((function(e){return n.destroyRowComp(e)}))},t.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="presentation"/>',t.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="presentation"/>',t.CENTER_TEMPLATE='<div class="ag-header-viewport" role="presentation">\n <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>\n </div>',hc([ao("eCenterContainer")],t.prototype,"eCenterContainer",void 0),hc([ce],t.prototype,"init",null),hc([ue],t.prototype,"destroyRowComps",null),t}(io),gc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},mc=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return gc(t,e),t.prototype.postConstruct=function(){var e=this,t={addOrRemoveCssClass:function(t,n){return e.addOrRemoveCssClass(t,n)},setHeightAndMinHeight:function(t){e.getGui().style.height=t,e.getGui().style.minHeight=t}};this.createManagedBean(new dl).setComp(t,this.getGui(),this.getFocusableElement());var n=function(t){e.createManagedBean(t),e.appendChild(t)};n(new fc(Ce.PINNED_LEFT)),n(new fc(null)),n(new fc(Ce.PINNED_RIGHT))},t.TEMPLATE='<div class="ag-header" role="presentation" unselectable="on"/>',vc([ce],t.prototype,"postConstruct",null),t}(io),yc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bc=function(){return bc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bc.apply(this,arguments)},wc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Cc=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.allAdvancedFilters=new Map,t.activeAdvancedFilters=[],t.quickFilter=null,t.quickFilterParts=null,t.processingFilterChange=!1,t}var r;return yc(n,e),r=n,n.prototype.init=function(){this.addManagedListener(this.eventService,Ke.EVENT_ROW_DATA_CHANGED,this.onNewRowsLoaded.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.quickFilter=this.parseQuickFilter(this.gridOptionsWrapper.getQuickFilterText()),this.setQuickFilterParts(),this.allowShowChangeAfterFilter=this.gridOptionsWrapper.isAllowShowChangeAfterFilter()},n.prototype.setQuickFilterParts=function(){this.quickFilterParts=this.quickFilter?this.quickFilter.split(" "):null},n.prototype.setFilterModel=function(e){var t=this,n=[],r=this.getFilterModel();if(e){var o=Br(Object.keys(e));this.allAdvancedFilters.forEach((function(r,i){var a=e[i];n.push(t.setModelOnFilterWrapper(r.filterPromise,a)),o.delete(i)})),o.forEach((function(r){var o=t.columnModel.getPrimaryColumn(r);if(o)if(o.isFilterAllowed()){var i=t.getOrCreateFilterWrapper(o,"NO_UI");n.push(t.setModelOnFilterWrapper(i.filterPromise,e[r]))}else console.warn("AG-Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+r);else console.warn("AG-Grid: setFilterModel() - no column found for colId: "+r)}))}else this.allAdvancedFilters.forEach((function(e){n.push(t.setModelOnFilterWrapper(e.filterPromise,null))}));$r.all(n).then((function(){var e=t.getFilterModel(),n=[];t.allAdvancedFilters.forEach((function(t,o){var i=r?r[o]:null,a=e?e[o]:null;Xr.jsonEquals(i,a)||n.push(t.column)})),n.length>0&&t.onFilterChanged({columns:n})}))},n.prototype.setModelOnFilterWrapper=function(e,t){return new $r((function(n){e.then((function(e){"function"!==typeof e.setModel&&(console.warn("Warning ag-grid - filter missing setModel method, which is needed for setFilterModel"),n()),(e.setModel(t)||$r.resolve()).then((function(){return n()}))}))}))},n.prototype.getFilterModel=function(){var e={};return this.allAdvancedFilters.forEach((function(t,n){var r=t.filterPromise.resolveNow(null,(function(e){return e}));if(null==r)return null;if("function"===typeof r.getModel){var i=r.getModel();o(i)&&(e[n]=i)}else console.warn("Warning ag-grid - filter API missing getModel method, which is needed for getFilterModel")})),e},n.prototype.isAdvancedFilterPresent=function(){return this.activeAdvancedFilters.length>0},n.prototype.updateActiveFilters=function(){var e=this;this.activeAdvancedFilters.length=0;var t=function(e){return!!e&&(e.isFilterActive?e.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1))};this.allAdvancedFilters.forEach((function(n){if(n.filterPromise.resolveNow(!1,t)){var r=n.filterPromise.resolveNow(null,(function(e){return e}));e.activeAdvancedFilters.push(r)}}))},n.prototype.updateFilterFlagInColumns=function(e,t){this.allAdvancedFilters.forEach((function(n){var r=n.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}));n.column.setFilterActive(r,e,t)}))},n.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isAdvancedFilterPresent()||this.gridOptionsWrapper.isExternalFilterPresent()},n.prototype.doAdvancedFiltersPass=function(e,t){for(var n=e.data,r=0;r<this.activeAdvancedFilters.length;r++){var o=this.activeAdvancedFilters[r];if(null!=o&&o!==t){if("function"!==typeof o.doesFilterPass)throw new Error("Filter is missing method doesFilterPass");if(!o.doesFilterPass({node:e,data:n}))return!1}}return!0},n.prototype.parseQuickFilter=function(e){return o(e)?this.gridOptionsWrapper.isRowModelDefault()?e.toUpperCase():(console.warn("ag-grid: quick filtering only works with the Client-Side Row Model"),null):null},n.prototype.setQuickFilter=function(e){var t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.onFilterChanged())},n.prototype.onFilterChanged=function(e){void 0===e&&(e={});var t=e.filterInstance,n=e.additionalEventAttributes,r=e.columns;this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",n),this.allAdvancedFilters.forEach((function(e){e.filterPromise&&e.filterPromise.then((function(e){e&&e!==t&&e.onAnyFilterChanged&&e.onAnyFilterChanged()}))}));var o={type:Ke.EVENT_FILTER_CHANGED,api:this.gridApi,columnApi:this.columnApi,columns:r||[]};n&&W(o,n),this.processingFilterChange=!0,this.eventService.dispatchEvent(o),this.processingFilterChange=!1},n.prototype.isSuppressFlashingCellsBecauseFiltering=function(){return!this.allowShowChangeAfterFilter&&this.processingFilterChange},n.prototype.isQuickFilterPresent=function(){return null!==this.quickFilter},n.prototype.doesRowPassOtherFilters=function(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})},n.prototype.doesRowPassQuickFilterNoCache=function(e,t){var n=this;return O(this.columnModel.getAllColumnsForQuickFilter(),(function(r){var i=n.getQuickFilterTextForColumn(r,e);return o(i)&&i.indexOf(t)>=0}))},n.prototype.doesRowPassQuickFilterCache=function(e,t){return e.quickFilterAggregateText||this.aggregateRowForQuickFilter(e),e.quickFilterAggregateText.indexOf(t)>=0},n.prototype.doesRowPassQuickFilter=function(e){var t=this,n=this.gridOptionsWrapper.isCacheQuickFilter();return R(this.quickFilterParts,(function(r){return n?t.doesRowPassQuickFilterCache(e,r):t.doesRowPassQuickFilterNoCache(e,r)}))},n.prototype.doesRowPassFilter=function(e){return!(this.isQuickFilterPresent()&&!this.doesRowPassQuickFilter(e.rowNode))&&(!(this.gridOptionsWrapper.isExternalFilterPresent()&&!this.gridOptionsWrapper.doesExternalFilterPass(e.rowNode))&&!(this.isAdvancedFilterPresent()&&!this.doAdvancedFiltersPass(e.rowNode,e.filterInstanceToSkip)))},n.prototype.getQuickFilterTextForColumn=function(e,t){var n=this.valueService.getValue(e,t,!0),r=e.getColDef();if(r.getQuickFilterText){var i={value:n,node:t,data:t.data,column:e,colDef:r,context:this.gridOptionsWrapper.getContext()};n=r.getQuickFilterText(i)}return o(n)?n.toString().toUpperCase():null},n.prototype.aggregateRowForQuickFilter=function(e){var t=this,n=[];A(this.columnModel.getAllColumnsForQuickFilter(),(function(r){var i=t.getQuickFilterTextForColumn(r,e);o(i)&&n.push(i)})),e.quickFilterAggregateText=n.join(r.QUICK_FILTER_SEPARATOR)},n.prototype.onNewRowsLoaded=function(e){this.allAdvancedFilters.forEach((function(e){e.filterPromise.then((function(e){e.onNewRowsLoaded&&e.onNewRowsLoaded()}))})),this.updateFilterFlagInColumns(e),this.updateActiveFilters()},n.prototype.createValueGetter=function(e){var t=this;return function(n){return t.valueService.getValue(e,n,!0)}},n.prototype.getFilterComponent=function(e,t,n){if(void 0===n&&(n=!0),n)return this.getOrCreateFilterWrapper(e,t).filterPromise;var r=this.cachedFilter(e);return r?r.filterPromise:null},n.prototype.isFilterActive=function(e){var t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}))},n.prototype.getOrCreateFilterWrapper=function(e,t){var n=this.cachedFilter(e);return n?"NO_UI"!==t&&this.putIntoGui(n,t):(n=this.createFilterWrapper(e,t),this.allAdvancedFilters.set(e.getColId(),n)),n},n.prototype.cachedFilter=function(e){return this.allAdvancedFilters.get(e.getColId())},n.prototype.createFilterInstance=function(e,n){var r,o=this,i=xe.isRegistered(t.ModuleNames.SetFilterModule)?"agSetColumnFilter":"agTextColumnFilter",a=e.getColDef(),s=bc(bc({},this.createFilterParams(e,a,n)),{filterModifiedCallback:function(){var t={type:Ke.EVENT_FILTER_MODIFIED,api:o.gridApi,columnApi:o.columnApi,column:e,filterInstance:r};o.eventService.dispatchEvent(t)},filterChangedCallback:function(t){return o.onFilterChanged({filterInstance:r,additionalEventAttributes:t,columns:[e]})},doesRowPassOtherFilter:function(e){return o.doesRowPassOtherFilters(r,e)}}),l=this.userComponentFactory.getFilterDetails(a,s,i);if(!l)return null;var c=l.newAgStackInstance();return c&&c.then((function(e){return r=e})),c},n.prototype.createFilterParams=function(e,t,n){void 0===n&&(n=null);var r={api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),column:e,colDef:N(t),rowModel:this.rowModel,filterChangedCallback:function(){},filterModifiedCallback:function(){},valueGetter:this.createValueGetter(e),context:this.gridOptionsWrapper.getContext(),doesRowPassOtherFilter:function(){return!0}};return n&&(r.$scope=n),r},n.prototype.createFilterWrapper=function(e,t){var n={column:e,filterPromise:null,scope:null,compiledElement:null,guiPromise:$r.resolve(null)};return n.scope=this.gridOptionsWrapper.isAngularCompileFilters()?this.$scope.$new():null,n.filterPromise=this.createFilterInstance(e,n.scope),n.filterPromise&&this.putIntoGui(n,t),n},n.prototype.putIntoGui=function(e,t){var n=this,r=document.createElement("div");r.className="ag-filter",e.guiPromise=new $r((function(i){e.filterPromise.then((function(a){var s=a.getGui();if(o(s)||console.warn("getGui method from filter returned "+s+", it should be a DOM element or an HTML template string."),"string"===typeof s&&(s=Tn(s)),r.appendChild(s),e.scope){var l=n.$compile(r)(e.scope);e.compiledElement=l,window.setTimeout((function(){return e.scope.$apply()}),0)}i(r),n.eventService.dispatchEvent({type:Ke.EVENT_FILTER_OPENED,column:e.column,source:t,eGui:r,api:n.gridApi,columnApi:n.columnApi})}))}))},n.prototype.onNewColumnsLoaded=function(){var e=this,t=!1,n=[];this.allAdvancedFilters.forEach((function(r){!e.columnModel.getPrimaryColumn(r.column)&&(t=!0,n.push(r.column),e.disposeFilterWrapper(r,"filterDestroyed"))})),t&&this.onFilterChanged({columns:n})},n.prototype.destroyFilter=function(e,t){void 0===t&&(t="api");var n=this.allAdvancedFilters.get(e.getColId());n&&(this.disposeFilterWrapper(n,t),this.onFilterChanged({columns:[e]}))},n.prototype.disposeFilterWrapper=function(e,t){var n=this;e.filterPromise.then((function(r){(r.setModel(null)||$r.resolve()).then((function(){n.getContext().destroyBean(r),e.column.setFilterActive(!1,t),e.scope&&(e.compiledElement&&e.compiledElement.remove(),e.scope.$destroy()),n.allAdvancedFilters.delete(e.column.getColId())}))}))},n.prototype.destroy=function(){var t=this;e.prototype.destroy.call(this),this.allAdvancedFilters.forEach((function(e){return t.disposeFilterWrapper(e,"filterDestroyed")}))},n.QUICK_FILTER_SEPARATOR="\n",wc([de("$compile")],n.prototype,"$compile",void 0),wc([de("$scope")],n.prototype,"$scope",void 0),wc([de("valueService")],n.prototype,"valueService",void 0),wc([de("columnModel")],n.prototype,"columnModel",void 0),wc([de("rowModel")],n.prototype,"rowModel",void 0),wc([de("columnApi")],n.prototype,"columnApi",void 0),wc([de("gridApi")],n.prototype,"gridApi",void 0),wc([de("userComponentFactory")],n.prototype,"userComponentFactory",void 0),wc([ce],n.prototype,"init",null),wc([ue],n.prototype,"destroy",null),n=r=wc([pe("filterManager")],n)}(ze),xc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.initialised=!1,t}return xc(t,e),t.prototype.init=function(){this.cellExpressions=this.gridOptionsWrapper.isEnableCellExpressions(),this.initialised=!0},t.prototype.getValue=function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!1),this.initialised||this.init(),t){var o,i=e.getColDef(),a=i.field,s=e.getId(),l=t.data,c=t.groupData&&void 0!==t.groupData[s],u=!r&&t.aggData&&void 0!==t.aggData[s];if(n&&i.filterValueGetter?o=this.executeFilterValueGetter(i.filterValueGetter,l,e,t):this.gridOptionsWrapper.isTreeData()&&u?o=t.aggData[s]:this.gridOptionsWrapper.isTreeData()&&i.valueGetter?o=this.executeValueGetter(i.valueGetter,l,e,t):this.gridOptionsWrapper.isTreeData()&&a&&l?o=j(l,a,e.isFieldContainsDots()):c?o=t.groupData[s]:u?o=t.aggData[s]:i.valueGetter?o=this.executeValueGetter(i.valueGetter,l,e,t):a&&l&&(o=j(l,a,e.isFieldContainsDots())),this.cellExpressions&&"string"===typeof o&&0===o.indexOf("=")){var p=o.substring(1);o=this.executeValueGetter(p,l,e,t)}if(null==o){var d=this.getOpenedGroup(t,e);if(null!=d)return d}return o}},t.prototype.getOpenedGroup=function(e,t){if(this.gridOptionsWrapper.isShowOpenedGroup()&&t.getColDef().showRowGroup)for(var n=t.getColDef().showRowGroup,r=e.parent;null!=r;){if(r.rowGroupColumn&&(!0===n||n===r.rowGroupColumn.getId()))return r.key;r=r.parent}},t.prototype.setValue=function(e,t,n,r){var a=this.columnModel.getPrimaryColumn(t);if(e&&a){i(e.data)&&(e.data={});var s=a.getColDef(),l=s.field,c=s.newValueHandler,u=s.valueSetter;if(i(l)&&i(c)&&i(u))console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work");else{var p,d={node:e,data:e.data,oldValue:this.getValue(a,e),newValue:n,colDef:a.getColDef(),column:a,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};if(d.newValue=n,void 0===(p=c&&o(c)?c(d):o(u)?this.expressionService.evaluate(u,d):this.setValueUsingField(e.data,l,n,a.isFieldContainsDots()))&&(p=!0),p){e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),d.newValue=this.getValue(a,e);var h=a.getColDef().onCellValueChanged;"function"===typeof h&&setTimeout((function(){return h(d)}),0);var f={type:Ke.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:d.column,api:d.api,columnApi:d.columnApi,colDef:d.colDef,context:d.context,data:e.data,node:e,oldValue:d.oldValue,newValue:d.newValue,value:d.newValue,source:r};this.eventService.dispatchEvent(f)}}}},t.prototype.setValueUsingField=function(e,t,n,r){if(!t)return!1;if(r)for(var o=t.split("."),i=e;o.length>0&&i;){var a=o.shift();0===o.length?i[a]=n:i=i[a]}else e[t]=n;return!0},t.prototype.executeFilterValueGetter=function(e,t,n,r){var o={data:t,node:r,column:n,colDef:n.getColDef(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),getValue:this.getValueCallback.bind(this,r)};return this.expressionService.evaluate(e,o)},t.prototype.executeValueGetter=function(e,t,n,r){var o=n.getId(),i=this.valueCache.getValue(r,o);if(void 0!==i)return i;var a={data:t,node:r,column:n,colDef:n.getColDef(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),getValue:this.getValueCallback.bind(this,r)},s=this.expressionService.evaluate(e,a);return this.valueCache.setValue(r,o,s),s},t.prototype.getValueCallback=function(e,t){var n=this.columnModel.getPrimaryColumn(t);return n?this.getValue(n,e):null},t.prototype.getKeyForNode=function(e,t){var n=this.getValue(e,t),r=e.getColDef().keyCreator,o=n;r&&(o=r({value:n,colDef:e.getColDef(),column:e,node:t,data:t.data,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}));return"string"===typeof o||null==o||"[object Object]"===(o=String(o))&&K((function(){console.warn("AG Grid: a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")}),"getKeyForNode - warn about [object,object]"),o},Sc([de("expressionService")],t.prototype,"expressionService",void 0),Sc([de("columnModel")],t.prototype,"columnModel",void 0),Sc([de("valueCache")],t.prototype,"valueCache",void 0),Sc([ce],t.prototype,"init",null),t=Sc([pe("valueService")],t)}(ze),_c=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};(ll=t.LayoutCssClasses||(t.LayoutCssClasses={})).AUTO_HEIGHT="ag-layout-auto-height",ll.NORMAL="ag-layout-normal",ll.PRINT="ag-layout-print";var Oc,Ac=function(e){function n(t){var n=e.call(this)||this;return n.view=t,n}return _c(n,e),n.prototype.postConstruct=function(){this.addManagedListener(this.gridOptionsWrapper,es.PROP_DOM_LAYOUT,this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()},n.prototype.updateLayoutClasses=function(){var e=this.gridOptionsWrapper.getDomLayout(),n={autoHeight:e===Ce.DOM_LAYOUT_AUTO_HEIGHT,normal:e===Ce.DOM_LAYOUT_NORMAL,print:e===Ce.DOM_LAYOUT_PRINT},r=n.autoHeight?t.LayoutCssClasses.AUTO_HEIGHT:n.print?t.LayoutCssClasses.PRINT:t.LayoutCssClasses.NORMAL;this.view.updateLayoutClasses(r,n)},Rc([de("gridOptionsWrapper")],n.prototype,"gridOptionsWrapper",void 0),Rc([ce],n.prototype,"postConstruct",null),n}(ze),Pc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Dc=function(e){function t(t){var n=e.call(this)||this;return n.scrollLeft=-1,n.nextScrollTop=-1,n.scrollTop=-1,n.eBodyViewport=t,n.resetLastHorizontalScrollElementDebounced=re(n.resetLastHorizontalScrollElement.bind(n),500),n}return Pc(t,e),t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsWrapper.isEnableRtl(),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady((function(t){e.centerRowContainerCon=t.centerRowContainerCtrl,e.onDisplayedColumnsWidthChanged(),e.addScrollListener()}))},t.prototype.addScrollListener=function(){var e=this.ctrlsService.getFakeHScrollCtrl();this.addManagedListener(this.centerRowContainerCon.getViewportElement(),"scroll",this.onCenterViewportScroll.bind(this)),this.addManagedListener(e.getViewport(),"scroll",this.onFakeHorizontalScroll.bind(this));var t=this.gridOptionsWrapper.isDebounceVerticalScrollbar()?re(this.onVerticalScroll.bind(this),100):this.onVerticalScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",t)},t.prototype.onDisplayedColumnsWidthChanged=function(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){void 0===e&&(e=this.centerRowContainerCon.getCenterViewportScrollLeft());var t=this.enableRtl?e:-e,n=this.ctrlsService.getTopCenterRowContainerCtrl(),r=this.ctrlsService.getBottomCenterRowContainerCtrl(),o=this.ctrlsService.getFakeHScrollCtrl();this.ctrlsService.getHeaderRowContainerCtrl().setHorizontalScroll(t),r.setContainerTranslateX(t),n.setContainerTranslateX(t),Rn(this.lastHorizontalScrollElement===this.centerRowContainerCon.getViewportElement()?o.getViewport():this.centerRowContainerCon.getViewportElement(),Math.abs(e),this.enableRtl)},t.prototype.isControllingScroll=function(e){return this.lastHorizontalScrollElement?e===this.lastHorizontalScrollElement:(this.lastHorizontalScrollElement=e,!0)},t.prototype.onFakeHorizontalScroll=function(){var e=this.ctrlsService.getFakeHScrollCtrl().getViewport();this.isControllingScroll(e)&&this.onBodyHorizontalScroll(e)},t.prototype.onCenterViewportScroll=function(){var e=this.centerRowContainerCon.getViewportElement();this.isControllingScroll(e)&&this.onBodyHorizontalScroll(e)},t.prototype.onBodyHorizontalScroll=function(e){var t=this.centerRowContainerCon.getViewportElement().scrollLeft;this.shouldBlockScrollUpdate("horizontal",t,!0)||(this.doHorizontalScroll(Math.round(_n(e,this.enableRtl))),this.resetLastHorizontalScrollElementDebounced())},t.prototype.onVerticalScroll=function(){var e=this.eBodyViewport.scrollTop;this.shouldBlockScrollUpdate("vertical",e,!0)||(this.animationFrameService.setScrollTop(e),this.nextScrollTop=e,this.gridOptionsWrapper.isSuppressAnimationFrame()?(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()):this.animationFrameService.schedule())},t.prototype.resetLastHorizontalScrollElement=function(){this.lastHorizontalScrollElement=null},t.prototype.doHorizontalScroll=function(e){var t=_n(this.ctrlsService.getFakeHScrollCtrl().getViewport(),this.enableRtl);this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent("horizontal"),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.onHorizontalViewportChanged())},t.prototype.fireScrollEvent=function(e){var t=this,n={type:Ke.EVENT_BODY_SCROLL,api:this.gridApi,columnApi:this.columnApi,direction:e,left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(n),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout((function(){var e=V({},n,{type:Ke.EVENT_BODY_SCROLL_END});t.eventService.dispatchEvent(e)}),100)},t.prototype.shouldBlockScrollUpdate=function(e,t,n){if(void 0===n&&(n=!1),n&&!Jt())return!1;if("vertical"===e){var r=wn(this.eBodyViewport),o=this.eBodyViewport.scrollHeight;if(t<0||t+r>o)return!0}if("horizontal"===e){var i=this.centerRowContainerCon.getCenterWidth(),a=this.centerRowContainerCon.getViewportElement().scrollWidth;if(this.enableRtl&&En()){if(t>0)return!0}else if(t<0)return!0;if(Math.abs(t)+i>a)return!0}return!1},t.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent("vertical")},t.prototype.onHorizontalViewportChanged=function(){this.centerRowContainerCon.onHorizontalViewportChanged()},t.prototype.checkScrollLeft=function(){this.scrollLeft!==this.centerRowContainerCon.getCenterViewportScrollLeft()&&this.onBodyHorizontalScroll(this.centerRowContainerCon.getViewportElement())},t.prototype.executeAnimationFrameScroll=function(){var e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e},t.prototype.setHorizontalScrollPosition=function(e){var t=this.centerRowContainerCon.getViewportElement().scrollWidth-this.centerRowContainerCon.getCenterWidth();this.shouldBlockScrollUpdate("horizontal",e)&&(e=this.enableRtl&&En()?e>0?0:t:Math.min(Math.max(e,0),t)),Rn(this.centerRowContainerCon.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)},t.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},t.prototype.getVScrollPosition=function(){return{top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight}},t.prototype.getHScrollPosition=function(){return this.centerRowContainerCon.getHScrollPosition()},t.prototype.isHorizontalScrollShowing=function(){return this.centerRowContainerCon.isHorizontalScrollShowing()},t.prototype.scrollHorizontally=function(e){var t=this.centerRowContainerCon.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowContainerCon.getViewportElement().scrollLeft-t},t.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},t.prototype.ensureNodeVisible=function(e,t){void 0===t&&(t=null);for(var n=this.rowModel.getRowCount(),r="function"===typeof e,o=-1,i=0;i<n;i++){var a=this.rowModel.getRow(i);if(r){if(e(a)){o=i;break}}else if(e===a||e===a.data){o=i;break}}o>=0&&this.ensureIndexVisible(o,t)},t.prototype.ensureIndexVisible=function(e,t){if(this.gridOptionsWrapper.getDomLayout()!==Ce.DOM_LAYOUT_PRINT){var n=this.paginationProxy.getRowCount();if("number"!==typeof e||e<0||e>=n)console.warn("invalid row index for ensureIndexVisible: "+e);else{this.gridOptionsWrapper.isPagination()&&!this.gridOptionsWrapper.isSuppressPaginationPanel()||this.paginationProxy.goToPageWithIndex(e);var r,o=this.paginationProxy.getRow(e);do{var i=o.rowTop,a=o.rowHeight,s=this.paginationProxy.getPixelOffset(),l=o.rowTop-s,c=l+o.rowHeight,u=this.getVScrollPosition(),p=this.heightScaler.getDivStretchOffset(),d=u.top+p,h=u.bottom+p,f=h-d,g=this.heightScaler.getScrollPositionForPixel(l),v=this.heightScaler.getScrollPositionForPixel(c-f),m=Math.min((g+v)/2,l),y=null;"top"===t?y=g:"bottom"===t?y=v:"middle"===t?y=m:d>l?y=g:h<c&&(y=v),null!==y&&(this.eBodyViewport.scrollTop=y,this.rowRenderer.redrawAfterScroll()),r=i!==o.rowTop||a!==o.rowHeight}while(r);this.animationFrameService.flushAllFrames()}}},t.prototype.ensureColumnVisible=function(e){var t=this.columnModel.getGridColumn(e);if(t&&!t.isPinned()&&this.columnModel.isColumnDisplayed(t)){var n,r,o=t.getLeft(),i=o+t.getActualWidth(),a=this.centerRowContainerCon.getCenterWidth(),s=this.centerRowContainerCon.getCenterViewportScrollLeft(),l=this.columnModel.getBodyContainerWidth();this.enableRtl?(n=l-s-a,r=l-s):(n=s,r=a+s);var c=n>o,u=r<i,p=a<t.getActualWidth(),d=c||p;if(d||u){var h=void 0;h=this.enableRtl?d?l-a-o:l-i:d?o:i-a,this.centerRowContainerCon.setCenterViewportScrollLeft(h)}this.centerRowContainerCon.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()}},Tc([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Tc([de("animationFrameService")],t.prototype,"animationFrameService",void 0),Tc([de("columnApi")],t.prototype,"columnApi",void 0),Tc([de("gridApi")],t.prototype,"gridApi",void 0),Tc([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Tc([de("rowModel")],t.prototype,"rowModel",void 0),Tc([de("rowContainerHeightService")],t.prototype,"heightScaler",void 0),Tc([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Tc([de("columnModel")],t.prototype,"columnModel",void 0),Tc([ce],t.prototype,"postConstruct",null),t}(ze),kc=function(){function e(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.scrollByTick?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||function(){return!1},this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||function(){return!1}}return e.prototype.check=function(e,t){void 0===t&&(t=!1);var n=t||this.shouldSkipVerticalScroll();if(!n||!this.shouldSkipHorizontalScroll()){var r=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<r.left+o,this.tickRight=e.clientX>r.right-o,this.tickUp=e.clientY<r.top+o&&!n,this.tickDown=e.clientY>r.bottom-o&&!n,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}},e.prototype.ensureTickingStarted=function(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)},e.prototype.doTick=function(){var e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){var t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){var n=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(n-e),this.tickRight&&this.setHorizontalPosition(n+e)}this.onScrollCallback&&this.onScrollCallback()},e.prototype.ensureCleared=function(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)},e}(),Nc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mc=function(){return Mc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Mc.apply(this,arguments)},Ic=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Lc=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},Fc=function(e){function n(t){var n=e.call(this)||this;return n.isMultiRowDrag=!1,n.isGridSorted=!1,n.isGridFiltered=!1,n.isRowGroupActive=!1,n.eContainer=t,n}return Nc(n,e),n.prototype.postConstruct=function(){var e=this;this.gridOptionsWrapper.isRowModelDefault()&&(this.clientSideRowModel=this.rowModel);var t=function(){e.onSortChanged(),e.onFilterChanged(),e.onRowGroupChanged()};this.addManagedListener(this.eventService,Ke.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_MODEL_UPDATED,(function(){t()})),t(),this.ctrlsService.whenReady((function(){var t=e.ctrlsService.getGridBodyCtrl();e.autoScrollService=new kc({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:function(){return t.getScrollFeature().getVScrollPosition().top},setVerticalPosition:function(e){return t.getScrollFeature().setVerticalScrollPosition(e)},onScrollCallback:function(){e.onDragging(e.lastDraggingEvent)}})}))},n.prototype.onSortChanged=function(){this.isGridSorted=this.sortController.isSortActive()},n.prototype.onFilterChanged=function(){this.isGridFiltered=this.filterManager.isAnyFilterPresent()},n.prototype.onRowGroupChanged=function(){var e=this.columnModel.getRowGroupColumns();this.isRowGroupActive=!a(e)},n.prototype.getContainer=function(){return this.eContainer},n.prototype.isInterestedIn=function(e){return e===t.DragSourceType.RowDrag},n.prototype.getIconName=function(){return this.gridOptionsWrapper.isRowDragManaged()&&this.shouldPreventRowMove()?ra.ICON_NOT_ALLOWED:ra.ICON_MOVE},n.prototype.shouldPreventRowMove=function(){return this.isGridSorted||this.isGridFiltered||this.isRowGroupActive},n.prototype.getRowNodes=function(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];var t=this.gridOptionsWrapper.isRowDragMultiRow(),n=this.selectionService.getSelectedNodes(),r=e.dragItem.rowNode;return t&&-1!==n.indexOf(r)?(this.isMultiRowDrag=!0,Lc(n)):(this.isMultiRowDrag=!1,[r])},n.prototype.onDragEnter=function(e){this.dispatchGridEvent(Ke.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach((function(e){e.setDragging(!0)})),this.onEnterOrDragging(e)},n.prototype.onDragging=function(e){this.onEnterOrDragging(e)},n.prototype.isFromThisGrid=function(e){return e.dragSource.dragSourceDomDataKey===this.gridOptionsWrapper.getDomDataKey()},n.prototype.isDropZoneWithinThisGrid=function(e){var t=this.ctrlsService.getGridBodyCtrl().getGui(),n=e.dropZoneTarget;return!t.contains(n)},n.prototype.onEnterOrDragging=function(e){this.dispatchGridEvent(Ke.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;var t=this.mouseEventService.getNormalisedPosition(e).y;this.gridOptionsWrapper.isRowDragManaged()&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)},n.prototype.doManagedDrag=function(e,t){var n,r=this,o=this.isFromThisGrid(e);o?(n=[e.dragItem.rowNode],this.isMultiRowDrag&&(n=Lc(this.selectionService.getSelectedNodes()).sort((function(e,t){return r.getRowIndexNumber(e)-r.getRowIndexNumber(t)}))),e.dragItem.rowNodes=n):n=e.dragItem.rowNodes,this.gridOptionsWrapper.isRowDragManaged()&&this.shouldPreventRowMove()||(this.gridOptionsWrapper.isSuppressMoveWhenRowDragging()||!o?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(n[0],t):this.moveRows(n,t))},n.prototype.getRowIndexNumber=function(e){return parseInt(v(e.getRowIndexString().split("-")),10)},n.prototype.moveRowAndClearHighlight=function(e){var n=this,r=this.clientSideRowModel.getLastHighlightedRowNode(),o=r&&r.highlighted===t.RowHighlightPosition.Below,i=this.mouseEventService.getNormalisedPosition(e).y,a=e.dragItem.rowNodes,s=o?1:0;if(this.isFromThisGrid(e))a.forEach((function(e){e.rowTop<i&&(s-=1)})),this.moveRows(a,i,s);else{var l=this.gridOptionsWrapper.getRowNodeIdFunc(),c=this.clientSideRowModel.getRowIndexAtPixel(i)+1;this.clientSideRowModel.getHighlightPosition(i)===t.RowHighlightPosition.Above&&c--,this.clientSideRowModel.updateRowData({add:a.map((function(e){return e.data})).filter((function(e){return!n.clientSideRowModel.getRowNode(l?l(e):e.id)})),addIndex:c})}this.clearRowHighlight()},n.prototype.clearRowHighlight=function(){this.clientSideRowModel.highlightRowAtPixel(null)},n.prototype.moveRows=function(e,t,n){void 0===n&&(n=0),this.clientSideRowModel.ensureRowsAtPixel(e,t,n)&&(this.focusService.clearFocusedCell(),this.rangeService&&this.rangeService.removeAllCellRanges())},n.prototype.addRowDropZone=function(e){var n=this;if(e.getContainer())if(this.dragAndDropService.findExternalZone(e))console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");else{var r={getContainer:e.getContainer};e.fromGrid?(e.fromGrid=void 0,r=e):(e.onDragEnter&&(r.onDragEnter=function(t){e.onDragEnter(n.draggingToRowDragEvent(Ke.EVENT_ROW_DRAG_ENTER,t))}),e.onDragLeave&&(r.onDragLeave=function(t){e.onDragLeave(n.draggingToRowDragEvent(Ke.EVENT_ROW_DRAG_LEAVE,t))}),e.onDragging&&(r.onDragging=function(t){e.onDragging(n.draggingToRowDragEvent(Ke.EVENT_ROW_DRAG_MOVE,t))}),e.onDragStop&&(r.onDragStop=function(t){e.onDragStop(n.draggingToRowDragEvent(Ke.EVENT_ROW_DRAG_END,t))})),this.dragAndDropService.addDropTarget(Mc({isInterestedIn:function(e){return e===t.DragSourceType.RowDrag},getIconName:function(){return ra.ICON_MOVE},external:!0},r))}else K((function(){return console.warn("AG Grid: addRowDropZone - A container target needs to be provided")}),"add-drop-zone-empty-target")},n.prototype.getRowDropZone=function(e){var t=this,n=this.getContainer.bind(this),r=this.onDragEnter.bind(this),o=this.onDragLeave.bind(this),i=this.onDragging.bind(this),a=this.onDragStop.bind(this);return e?{getContainer:n,onDragEnter:e.onDragEnter?function(n){r(n),e.onDragEnter(t.draggingToRowDragEvent(Ke.EVENT_ROW_DRAG_ENTER,n))}:r,onDragLeave:e.onDragLeave?function(n){o(n),e.onDragLeave(t.draggingToRowDragEvent(Ke.EVENT_ROW_DRAG_LEAVE,n))}:o,onDragging:e.onDragging?function(n){i(n),e.onDragging(t.draggingToRowDragEvent(Ke.EVENT_ROW_DRAG_MOVE,n))}:i,onDragStop:e.onDragStop?function(n){a(n),e.onDragStop(t.draggingToRowDragEvent(Ke.EVENT_ROW_DRAG_END,n))}:a,fromGrid:!0}:{getContainer:n,onDragEnter:r,onDragLeave:o,onDragging:i,onDragStop:a,fromGrid:!0}},n.prototype.draggingToRowDragEvent=function(e,n){var r,o,i=this.mouseEventService.getNormalisedPosition(n).y,a=-1;switch(i>this.paginationProxy.getCurrentPageHeight()||(a=this.rowModel.getRowIndexAtPixel(i),r=this.rowModel.getRow(a)),n.vDirection){case t.VerticalDirection.Down:o="down";break;case t.VerticalDirection.Up:o="up";break;default:o=null}return{type:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),event:n.event,node:n.dragItem.rowNode,nodes:n.dragItem.rowNodes,overIndex:a,overNode:r,y:i,vDirection:o}},n.prototype.dispatchGridEvent=function(e,t){var n=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(n)},n.prototype.onDragLeave=function(e){this.dispatchGridEvent(Ke.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsWrapper.isRowDragManaged()&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)},n.prototype.onDragStop=function(e){this.dispatchGridEvent(Ke.EVENT_ROW_DRAG_END,e),this.stopDragging(e),!this.gridOptionsWrapper.isRowDragManaged()||!this.gridOptionsWrapper.isSuppressMoveWhenRowDragging()&&this.isFromThisGrid(e)||this.isDropZoneWithinThisGrid(e)||this.moveRowAndClearHighlight(e)},n.prototype.stopDragging=function(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach((function(e){e.setDragging(!1)}))},Ic([de("dragAndDropService")],n.prototype,"dragAndDropService",void 0),Ic([de("rowModel")],n.prototype,"rowModel",void 0),Ic([de("paginationProxy")],n.prototype,"paginationProxy",void 0),Ic([de("columnModel")],n.prototype,"columnModel",void 0),Ic([de("focusService")],n.prototype,"focusService",void 0),Ic([de("sortController")],n.prototype,"sortController",void 0),Ic([de("filterManager")],n.prototype,"filterManager",void 0),Ic([de("selectionService")],n.prototype,"selectionService",void 0),Ic([de("mouseEventService")],n.prototype,"mouseEventService",void 0),Ic([de("ctrlsService")],n.prototype,"ctrlsService",void 0),Ic([he("rangeService")],n.prototype,"rangeService",void 0),Ic([ce],n.prototype,"postConstruct",null),n}(ze),Gc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};(Oc=t.RowAnimationCssClasses||(t.RowAnimationCssClasses={})).ANIMATION_ON="ag-row-animation",Oc.ANIMATION_OFF="ag-row-no-animation";var Wc,Vc="ag-selectable",jc="ag-force-vertical-scroll",Bc="ag-column-moving",zc=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.angularApplyTriggered=!1,t}return Gc(n,e),n.prototype.getScrollFeature=function(){return this.bodyScrollFeature},n.prototype.getBodyViewportElement=function(){return this.eBodyViewport},n.prototype.setComp=function(e,t,n,r,o){this.comp=e,this.eGridBody=t,this.eBodyViewport=n,this.eTop=r,this.eBottom=o,this.setCellTextSelection(this.gridOptionsWrapper.isEnableCellTextSelect()),this.createManagedBean(new Ac(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Dc(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.ctrlsService.registerGridBodyCtrl(this),this.addEventListeners(),this.addFocusListeners([r,n,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.$scope&&this.addAngularApplyCheck()},n.prototype.getComp=function(){return this.comp},n.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,Ke.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_PINNED_ROW_DATA_CHANGED,this.setFloatingHeights.bind(this))},n.prototype.addFocusListeners=function(e){var t=this;e.forEach((function(e){t.addManagedListener(e,"focusin",(function(){un(e,"ag-has-focus")})),t.addManagedListener(e,"focusout",(function(t){e.contains(t.relatedTarget)||pn(e,"ag-has-focus")}))}))},n.prototype.setColumnMovingCss=function(e){this.comp.setColumnMovingCss(e?Bc:null,e)},n.prototype.setCellTextSelection=function(e){void 0===e&&(e=!1);var t=e?Vc:null;this.comp.setCellSelectableCss(t,e)},n.prototype.onScrollVisibilityChanged=function(){var e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e)},n.prototype.onGridColumnsChanged=function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e?e.length:0)},n.prototype.disableBrowserDragging=function(){this.addManagedListener(this.eGridBody,"dragstart",(function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}))},n.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus()){var t=function(t){var r=t.relatedTarget;if(null!==en(r)){var o=n.some((function(e){return e.contains(r)}))&&e.mouseEventService.isElementInThisGrid(r);if(!o){var i=e.popupService;o=i.getActivePopups().some((function(e){return e.contains(r)}))||i.isElementWithinCustomPopup(r)}o||e.rowRenderer.stopEditing()}else e.rowRenderer.stopEditing()},n=[this.eBodyViewport,this.eBottom,this.eTop];n.forEach((function(n){return e.addManagedListener(n,"focusout",t)}))}},n.prototype.updateRowCount=function(){var e=this.headerNavigationService.getHeaderRowCount(),t=this.paginationProxy.getType(),n=-1;t===Ce.ROW_MODEL_TYPE_CLIENT_SIDE&&(n=0,this.paginationProxy.forEachNode((function(e){e.group||n++})));var r=-1===n?-1:e+n;this.comp.setRowCount(r)},n.prototype.registerBodyViewportResizeListener=function(e){this.comp.registerBodyViewportResizeListener(e)},n.prototype.setVerticalScrollPaddingVisible=function(e){var t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)},n.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsWrapper.isAlwaysShowVerticalScroll(),t=e?jc:null;return this.comp.setAlwaysVerticalScrollClass(t,e),e||Gn(this.eBodyViewport)},n.prototype.setupRowAnimationCssClass=function(){var e=this,n=function(){var n=e.gridOptionsWrapper.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),r=n?t.RowAnimationCssClasses.ANIMATION_ON:t.RowAnimationCssClasses.ANIMATION_OFF;e.comp.setRowAnimationCssOnBodyViewport(r,n)};n(),this.addManagedListener(this.eventService,Ke.EVENT_HEIGHT_SCALE_CHANGED,n)},n.prototype.getGridBodyElement=function(){return this.eGridBody},n.prototype.addBodyViewportListener=function(){var e=this;this.addManagedListener(this.eBodyViewport,"contextmenu",(function(t){e.gridOptionsWrapper.isPreventDefaultOnContextMenu()&&t.preventDefault();var n=Fe(t);n!==e.eBodyViewport&&n!==e.ctrlsService.getCenterRowContainerCtrl().getViewportElement()||e.contextMenuFactory&&e.contextMenuFactory.onContextMenu(t,null,null,null,null,e.eGridBody)})),this.addManagedListener(this.eBodyViewport,"wheel",this.onWheel.bind(this))},n.prototype.onWheel=function(e){this.gridOptionsWrapper.isSuppressScrollWhenPopupsAreOpen()&&this.popupService.hasAnchoredPopup()&&e.preventDefault()},n.prototype.getGui=function(){return this.eGridBody},n.prototype.scrollVertically=function(e){var t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t},n.prototype.addRowDragListener=function(){this.rowDragFeature=this.createManagedBean(new Fc(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)},n.prototype.getRowDragFeature=function(){return this.rowDragFeature},n.prototype.setFloatingHeights=function(){var e=this.pinnedRowModel,t=e.getPinnedTopTotalHeight();t&&(t+=1);var n=e.getPinnedBottomTotalHeight();n&&(n+=1),this.comp.setTopHeight(t),this.comp.setBottomHeight(n),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(n?"inherit":"none")},n.prototype.sizeColumnsToFit=function(e){var t=this,n=this.isVerticalScrollShowing()&&!qt()?this.gridOptionsWrapper.getScrollbarWidth():0,r=Cn(this.eBodyViewport)-n;r>0?this.columnModel.sizeColumnsToFit(r,"sizeColumnsToFit"):void 0===e?window.setTimeout((function(){t.sizeColumnsToFit(100)}),0):100===e?window.setTimeout((function(){t.sizeColumnsToFit(500)}),100):500===e?window.setTimeout((function(){t.sizeColumnsToFit(-1)}),500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")},n.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e)},n.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},n.prototype.requestAngularApply=function(){var e=this;this.angularApplyTriggered||(this.angularApplyTriggered=!0,window.setTimeout((function(){e.angularApplyTriggered=!1,e.$scope.$apply()}),0))},n.prototype.addAngularApplyCheck=function(){var e=this;this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){return e.requestAngularApply()})),this.addManagedListener(this.eventService,Ke.EVENT_VIRTUAL_COLUMNS_CHANGED,(function(){return e.requestAngularApply()}))},Hc([de("rowContainerHeightService")],n.prototype,"rowContainerHeightService",void 0),Hc([de("ctrlsService")],n.prototype,"ctrlsService",void 0),Hc([de("columnModel")],n.prototype,"columnModel",void 0),Hc([de("scrollVisibleService")],n.prototype,"scrollVisibleService",void 0),Hc([he("contextMenuFactory")],n.prototype,"contextMenuFactory",void 0),Hc([de("headerNavigationService")],n.prototype,"headerNavigationService",void 0),Hc([de("paginationProxy")],n.prototype,"paginationProxy",void 0),Hc([de("dragAndDropService")],n.prototype,"dragAndDropService",void 0),Hc([de("pinnedRowModel")],n.prototype,"pinnedRowModel",void 0),Hc([de("rowRenderer")],n.prototype,"rowRenderer",void 0),Hc([de("popupService")],n.prototype,"popupService",void 0),Hc([de("mouseEventService")],n.prototype,"mouseEventService",void 0),Hc([de("$scope")],n.prototype,"$scope",void 0),n}(ze),Uc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Xc=function(e){function n(t){var n=e.call(this)||this;return n.element=t,n}return Uc(n,e),n.prototype.postConstruct=function(){this.addMouseListeners(),this.mockContextMenuForIPad(),this.addKeyboardEvents()},n.prototype.addKeyboardEvents=function(){var e=this;["keydown","keypress"].forEach((function(t){var n=e.processKeyboardEvent.bind(e,t);e.addManagedListener(e.element,t,n)}))},n.prototype.addMouseListeners=function(){var e=this;["dblclick","contextmenu","mouseover","mouseout","click",Ie("touchstart")?"touchstart":"mousedown"].forEach((function(t){var n=e.processMouseEvent.bind(e,t);e.addManagedListener(e.element,t,n)}))},n.prototype.processMouseEvent=function(e,t){if(this.mouseEventService.isEventFromThisGrid(t)&&!Me(t)){var n=this.getRowForEvent(t),r=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,null,n,r):(r&&r.onMouseEvent(e,t),n&&n.onMouseEvent(e,t))}},n.prototype.mockContextMenuForIPad=function(){var e=this;if(Jt()){var t=new wi(this.element);this.addManagedListener(t,wi.EVENT_LONG_TAP,(function(t){var n=e.getRowForEvent(t.touchEvent),r=e.mouseEventService.getRenderedCellForEvent(t.touchEvent);e.handleContextMenuMouseEvent(null,t.touchEvent,n,r)})),this.addDestroyFunc((function(){return t.destroy()}))}},n.prototype.getRowForEvent=function(e){for(var t=Fe(e);t;){var n=this.gridOptionsWrapper.getDomData(t,Hs.DOM_DATA_KEY_ROW_CTRL);if(n)return n;t=t.parentElement}return null},n.prototype.handleContextMenuMouseEvent=function(e,t,n,r){var o=n?n.getRowNode():null,i=r?r.getColumn():null,a=null;if(i){var s=e||t;r.dispatchCellContextMenuEvent(s),a=this.valueService.getValue(i,o)}var l=this.ctrlsService.getGridBodyCtrl(),c=r?r.getGui():l.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,t,o,i,a,c)},n.prototype.processKeyboardEvent=function(e,t){var n=Le(this.gridOptionsWrapper,t,Ts.DOM_DATA_KEY_CELL_CTRL),r=Le(this.gridOptionsWrapper,t,Hs.DOM_DATA_KEY_ROW_CTRL);t.defaultPrevented||(n?this.processCellKeyboardEvent(n,e,t):r&&r.isFullWidth()&&this.processFullWidthRowKeyboardEvent(r,e,t))},n.prototype.processCellKeyboardEvent=function(e,t,n){var r=e.getRowNode(),o=e.getColumn(),i=e.isEditing();if(!Fr(this.gridOptionsWrapper,n,r,o,i))switch(t){case"keydown":!i&&this.navigationService.handlePageScrollingKey(n)||e.onKeyDown(n),this.doGridOperations(n,e.isEditing());break;case"keypress":e.onKeyPress(n)}if("keydown"===t){var a=e.createEvent(n,Ke.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(a)}if("keypress"===t){var s=e.createEvent(n,Ke.EVENT_CELL_KEY_PRESS);this.eventService.dispatchEvent(s)}},n.prototype.processFullWidthRowKeyboardEvent=function(e,t,n){var r=e.getRowNode(),o=this.focusService.getFocusedCell(),i=o&&o.column;if(!Fr(this.gridOptionsWrapper,n,r,i,!1)){var a=n.keyCode;if("keydown"===t)switch(a){case mo.UP:case mo.DOWN:e.onKeyboardNavigate(n);break;case mo.TAB:e.onTabKeyDown(n)}}if("keydown"===t){var s=e.createRowEvent(Ke.EVENT_CELL_KEY_DOWN,n);this.eventService.dispatchEvent(s)}if("keypress"===t){var l=e.createRowEvent(Ke.EVENT_CELL_KEY_PRESS,n);this.eventService.dispatchEvent(l)}},n.prototype.doGridOperations=function(e,t){if((e.ctrlKey||e.metaKey)&&!t&&this.mouseEventService.isEventFromThisGrid(e))switch(e.which){case mo.A:return this.onCtrlAndA(e);case mo.C:return this.onCtrlAndC(e);case mo.V:return this.onCtrlAndV();case mo.D:return this.onCtrlAndD(e);case mo.Z:return e.shiftKey?this.undoRedoService.redo():this.undoRedoService.undo();case mo.Y:return this.undoRedoService.redo()}},n.prototype.onCtrlAndA=function(e){var t=this,n=t.pinnedRowModel,r=t.paginationProxy,o=t.rangeService,i=Ce.PINNED_BOTTOM,s=Ce.PINNED_TOP;if(o&&r.isRowsToRender()){var l=[n.isEmpty(s),n.isEmpty(i)],c=l[0]?null:s,u=void 0,p=void 0;l[1]?(u=null,p=this.paginationProxy.getRowCount()-1):(u=i,p=n.getPinnedBottomRowData().length-1);var d=this.columnModel.getAllDisplayedColumns();if(a(d))return;o.setCellRange({rowStartIndex:0,rowStartPinned:c,rowEndIndex:p,rowEndPinned:u,columnStart:d[0],columnEnd:v(d)})}e.preventDefault()},n.prototype.onCtrlAndC=function(e){this.clipboardService&&!this.gridOptionsWrapper.isEnableCellTextSelection()&&(this.clipboardService.copyToClipboard(),e.preventDefault())},n.prototype.onCtrlAndV=function(){xe.isRegistered(t.ModuleNames.ClipboardModule)&&!this.gridOptionsWrapper.isSuppressClipboardPaste()&&this.clipboardService.pasteFromClipboard()},n.prototype.onCtrlAndD=function(e){xe.isRegistered(t.ModuleNames.ClipboardModule)&&!this.gridOptionsWrapper.isSuppressClipboardPaste()&&this.clipboardService.copyRangeDown(),e.preventDefault()},Yc([de("mouseEventService")],n.prototype,"mouseEventService",void 0),Yc([de("valueService")],n.prototype,"valueService",void 0),Yc([he("contextMenuFactory")],n.prototype,"contextMenuFactory",void 0),Yc([de("ctrlsService")],n.prototype,"ctrlsService",void 0),Yc([de("navigationService")],n.prototype,"navigationService",void 0),Yc([de("focusService")],n.prototype,"focusService",void 0),Yc([de("undoRedoService")],n.prototype,"undoRedoService",void 0),Yc([de("columnModel")],n.prototype,"columnModel",void 0),Yc([de("paginationProxy")],n.prototype,"paginationProxy",void 0),Yc([de("pinnedRowModel")],n.prototype,"pinnedRowModel",void 0),Yc([he("rangeService")],n.prototype,"rangeService",void 0),Yc([he("clipboardService")],n.prototype,"clipboardService",void 0),Yc([ce],n.prototype,"postConstruct",null),n}(ze),qc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},$c=function(e){function t(t){var n=e.call(this)||this;return n.centerContainerCon=t,n}return qc(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCon=e.ctrlsService.getGridBodyCtrl(),e.listenForResize()})),this.addManagedListener(this.eventService,Ke.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this))},t.prototype.listenForResize=function(){var e=this.onCenterViewportResized.bind(this);this.centerContainerCon.registerViewportResizeListener(e),this.gridBodyCon.registerBodyViewportResizeListener(e)},t.prototype.onScrollbarWidthChanged=function(){this.checkViewportAndScrolls()},t.prototype.onCenterViewportResized=function(){if(this.centerContainerCon.isViewportVisible()){this.checkViewportAndScrolls();var e=this.centerContainerCon.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0},t.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCon.getScrollFeature().checkScrollLeft()},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.checkBodyHeight=function(){var e=wn(this.gridBodyCon.getBodyViewportElement());if(this.bodyHeight!==e){this.bodyHeight=e;var t={type:Ke.EVENT_BODY_HEIGHT_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}},t.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},t.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCon.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e),this.gridBodyCon.setVerticalScrollPaddingVisible(e.verticalScrollShowing)},t.prototype.isHorizontalScrollShowing=function(){return this.gridOptionsWrapper.isAlwaysShowHorizontalScroll()||this.centerContainerCon.isViewportHScrollShowing()},t.prototype.onHorizontalViewportChanged=function(){var e=this.centerContainerCon.getCenterWidth(),t=this.centerContainerCon.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)},Kc([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Kc([de("columnModel")],t.prototype,"columnModel",void 0),Kc([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Kc([de("columnApi")],t.prototype,"columnApi",void 0),Kc([de("gridApi")],t.prototype,"gridApi",void 0),Kc([ce],t.prototype,"postConstruct",null),t}(ze),Qc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zc=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Jc=function(e){function t(t){var n=e.call(this)||this;return n.element=t,n}return Qc(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Ke.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))},t.prototype.onPinnedLeftWidthChanged=function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;gn(this.element,t),t&&Wn(this.element,e)},Zc([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Zc([ce],t.prototype,"postConstruct",null),t}(ze),eu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tu=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},nu=function(e){function t(t){var n=e.call(this)||this;return n.element=t,n}return eu(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Ke.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))},t.prototype.onPinnedRightWidthChanged=function(){var e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;gn(this.element,t),t&&Wn(this.element,e)},tu([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),tu([ce],t.prototype,"postConstruct",null),t}(ze),ru=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ou=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},iu=function(e){function t(t,n){var r=e.call(this)||this;return r.eContainer=t,r.eWrapper=n,r}return ru(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Ke.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))},t.prototype.onHeightChanged=function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?e+"px":"";this.eContainer.style.height=t,this.eWrapper&&(this.eWrapper.style.height=t)},ou([de("rowContainerHeightService")],t.prototype,"maxDivHeightScaler",void 0),ou([ce],t.prototype,"postConstruct",null),t}(ze),au=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),su=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},lu=function(e){function t(t){var n=e.call(this)||this;return n.eContainer=t,n}return au(t,e),t.prototype.postConstruct=function(){var e=this;if(this.gridOptionsWrapper.isEnableRangeSelection()&&!i(this.rangeService)){var t={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)};this.dragService.addDragSource(t),this.addDestroyFunc((function(){return e.dragService.removeDragSource(t)}))}},su([he("rangeService")],t.prototype,"rangeService",void 0),su([de("dragService")],t.prototype,"dragService",void 0),su([ce],t.prototype,"postConstruct",null),t}(ze),cu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uu=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},pu=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};(Wc=t.RowContainerName||(t.RowContainerName={})).LEFT="left",Wc.RIGHT="right",Wc.CENTER="center",Wc.FULL_WIDTH="fullWidth",Wc.TOP_LEFT="topLeft",Wc.TOP_RIGHT="topRight",Wc.TOP_CENTER="topCenter",Wc.TOP_FULL_WITH="topFullWidth",Wc.BOTTOM_LEFT="bottomLeft",Wc.BOTTOM_RIGHT="bottomRight",Wc.BOTTOM_CENTER="bottomCenter",Wc.BOTTOM_FULL_WITH="bottomFullWidth";var du,hu,fu=lt([[t.RowContainerName.CENTER,"ag-center-cols-container"],[t.RowContainerName.LEFT,"ag-pinned-left-cols-container"],[t.RowContainerName.RIGHT,"ag-pinned-right-cols-container"],[t.RowContainerName.FULL_WIDTH,"ag-full-width-container"],[t.RowContainerName.TOP_CENTER,"ag-floating-top-container"],[t.RowContainerName.TOP_LEFT,"ag-pinned-left-floating-top"],[t.RowContainerName.TOP_RIGHT,"ag-pinned-right-floating-top"],[t.RowContainerName.TOP_FULL_WITH,"ag-floating-top-full-width-container"],[t.RowContainerName.BOTTOM_CENTER,"ag-floating-bottom-container"],[t.RowContainerName.BOTTOM_LEFT,"ag-pinned-left-floating-bottom"],[t.RowContainerName.BOTTOM_RIGHT,"ag-pinned-right-floating-bottom"],[t.RowContainerName.BOTTOM_FULL_WITH,"ag-floating-bottom-full-width-container"]]),gu=lt([[t.RowContainerName.CENTER,"ag-center-cols-viewport"],[t.RowContainerName.TOP_CENTER,"ag-floating-top-viewport"],[t.RowContainerName.BOTTOM_CENTER,"ag-floating-bottom-viewport"]]),vu=lt([[t.RowContainerName.CENTER,"ag-center-cols-clipper"]]),mu=function(e){function n(t){var n=e.call(this)||this;return n.name=t,n}return cu(n,e),n.getRowContainerCssClasses=function(e){return{container:fu.get(e),viewport:gu.get(e),wrapper:vu.get(e)}},n.getPinned=function(e){switch(e){case t.RowContainerName.BOTTOM_LEFT:case t.RowContainerName.TOP_LEFT:case t.RowContainerName.LEFT:return Ce.PINNED_LEFT;case t.RowContainerName.BOTTOM_RIGHT:case t.RowContainerName.TOP_RIGHT:case t.RowContainerName.RIGHT:return Ce.PINNED_RIGHT;default:return null}},n.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsWrapper.isEnableRtl(),this.embedFullWidthRows=this.gridOptionsWrapper.isEmbedFullWidthRows(),this.addManagedListener(this.eventService,Ke.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_ROWS_CHANGED,this.onDisplayedRowsChanged.bind(this)),this.forContainers([t.RowContainerName.CENTER],(function(){return e.viewportSizeFeature=e.createManagedBean(new $c(e))})),this.registerWithCtrlsService()},n.prototype.registerWithCtrlsService=function(){switch(this.name){case t.RowContainerName.CENTER:this.ctrlsService.registerCenterRowContainerCtrl(this);break;case t.RowContainerName.LEFT:this.ctrlsService.registerLeftRowContainerCtrl(this);break;case t.RowContainerName.RIGHT:this.ctrlsService.registerRightRowContainerCtrl(this);break;case t.RowContainerName.TOP_CENTER:this.ctrlsService.registerTopCenterRowContainerCtrl(this);break;case t.RowContainerName.TOP_LEFT:this.ctrlsService.registerTopLeftRowContainerCon(this);break;case t.RowContainerName.TOP_RIGHT:this.ctrlsService.registerTopRightRowContainerCtrl(this);break;case t.RowContainerName.BOTTOM_CENTER:this.ctrlsService.registerBottomCenterRowContainerCtrl(this);break;case t.RowContainerName.BOTTOM_LEFT:this.ctrlsService.registerBottomLeftRowContainerCtrl(this);break;case t.RowContainerName.BOTTOM_RIGHT:this.ctrlsService.registerBottomRightRowContainerCtrl(this)}},n.prototype.forContainers=function(e,t){e.indexOf(this.name)>=0&&t()},n.prototype.getContainerElement=function(){return this.eContainer},n.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature},n.prototype.setComp=function(e,n,r,o){var i=this;this.comp=e,this.eContainer=n,this.eViewport=r,this.eWrapper=o,this.createManagedBean(new Xc(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var a=[t.RowContainerName.TOP_CENTER,t.RowContainerName.TOP_LEFT,t.RowContainerName.TOP_RIGHT],s=[t.RowContainerName.BOTTOM_CENTER,t.RowContainerName.BOTTOM_LEFT,t.RowContainerName.BOTTOM_RIGHT],l=[t.RowContainerName.CENTER,t.RowContainerName.LEFT,t.RowContainerName.RIGHT],c=pu(a,s,l),u=[t.RowContainerName.CENTER,t.RowContainerName.LEFT,t.RowContainerName.RIGHT,t.RowContainerName.FULL_WIDTH],p=[t.RowContainerName.CENTER,t.RowContainerName.TOP_CENTER,t.RowContainerName.BOTTOM_CENTER],d=[t.RowContainerName.LEFT,t.RowContainerName.BOTTOM_LEFT,t.RowContainerName.TOP_LEFT],h=[t.RowContainerName.RIGHT,t.RowContainerName.BOTTOM_RIGHT,t.RowContainerName.TOP_RIGHT];this.forContainers(d,(function(){return i.createManagedBean(new Jc(i.eContainer))})),this.forContainers(h,(function(){return i.createManagedBean(new nu(i.eContainer))})),this.forContainers(u,(function(){return i.createManagedBean(new iu(i.eContainer,i.eWrapper))})),this.forContainers(c,(function(){return i.createManagedBean(new lu(i.eContainer))})),this.forContainers(p,(function(){return i.createManagedBean(new gl((function(e){return i.comp.setContainerWidth(e+"px")})))}))},n.prototype.listenOnDomOrder=function(){var e=this,t=function(){return e.comp.setDomOrder(e.gridOptionsWrapper.isEnsureDomOrder())};this.addManagedListener(this.gridOptionsWrapper,es.PROP_DOM_LAYOUT,t),t()},n.prototype.stopHScrollOnPinnedRows=function(){var e=this;this.forContainers([t.RowContainerName.TOP_CENTER,t.RowContainerName.BOTTOM_CENTER],(function(){e.addManagedListener(e.eViewport,"scroll",(function(){return e.eViewport.scrollLeft=0}))}))},n.prototype.onDisplayedColumnsChanged=function(){var e=this;this.forContainers([t.RowContainerName.CENTER],(function(){return e.onHorizontalViewportChanged()}))},n.prototype.onDisplayedColumnsWidthChanged=function(){var e=this;this.forContainers([t.RowContainerName.CENTER],(function(){return e.onHorizontalViewportChanged()}))},n.prototype.onScrollVisibilityChanged=function(){if(this.name===t.RowContainerName.CENTER){var e=this.scrollVisibleService.isHorizontalScrollShowing()&&this.gridOptionsWrapper.getScrollbarWidth()||0,n=0==e?"100%":"calc(100% + "+e+"px)";this.comp.setViewportHeight(n)}},n.prototype.addPreventScrollWhileDragging=function(){var e=this,t=function(t){e.dragService.isDragging()&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc((function(){return e.eContainer.removeEventListener("touchmove",t)}))},n.prototype.onHorizontalViewportChanged=function(){var e=this.getCenterWidth(),t=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(e,t)},n.prototype.getCenterWidth=function(){return Cn(this.eViewport)},n.prototype.getCenterViewportScrollLeft=function(){return _n(this.eViewport,this.enableRtl)},n.prototype.registerViewportResizeListener=function(e){var t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc((function(){return t()}))},n.prototype.isViewportVisible=function(){return Pn(this.eViewport)},n.prototype.isViewportHScrollShowing=function(){return Fn(this.eViewport)},n.prototype.getViewportScrollLeft=function(){return _n(this.eViewport,this.enableRtl)},n.prototype.isHorizontalScrollShowing=function(){return this.gridOptionsWrapper.isAlwaysShowHorizontalScroll()||Fn(this.eViewport)},n.prototype.getViewportElement=function(){return this.eViewport},n.prototype.setContainerTranslateX=function(e){this.eContainer.style.transform="translateX("+e+"px)"},n.prototype.getHScrollPosition=function(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}},n.prototype.setCenterViewportScrollLeft=function(e){Rn(this.eViewport,e,this.enableRtl)},n.prototype.onDisplayedRowsChanged=function(){var e=this,n=this.name===t.RowContainerName.TOP_FULL_WITH||this.name===t.RowContainerName.BOTTOM_FULL_WITH||this.name===t.RowContainerName.FULL_WIDTH,r=this.getRowCtrls().filter((function(t){var r=t.isFullWidth(),o=e.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_PRINT,i=e.embedFullWidthRows||o;return n?!i&&r:i||!r}));this.comp.setRowCtrls(r)},n.prototype.getRowCtrls=function(){switch(this.name){case t.RowContainerName.TOP_CENTER:case t.RowContainerName.TOP_LEFT:case t.RowContainerName.TOP_RIGHT:case t.RowContainerName.TOP_FULL_WITH:return this.rowRenderer.getTopRowCtrls();case t.RowContainerName.BOTTOM_CENTER:case t.RowContainerName.BOTTOM_LEFT:case t.RowContainerName.BOTTOM_RIGHT:case t.RowContainerName.BOTTOM_FULL_WITH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getRowCtrls()}},uu([de("scrollVisibleService")],n.prototype,"scrollVisibleService",void 0),uu([de("dragService")],n.prototype,"dragService",void 0),uu([de("ctrlsService")],n.prototype,"ctrlsService",void 0),uu([de("columnModel")],n.prototype,"columnModel",void 0),uu([de("resizeObserverService")],n.prototype,"resizeObserverService",void 0),uu([de("rowRenderer")],n.prototype,"rowRenderer",void 0),uu([ce],n.prototype,"postConstruct",null),n}(ze),yu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bu=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},wu='<div class="ag-root ag-unselectable" role="grid" unselectable="on">\n <ag-header-root ref="gridHeader" unselectable="on"></ag-header-root>\n <div class="ag-floating-top" ref="eTop" role="presentation" unselectable="on">\n <ag-row-container ref="topLeftContainer" name="'+t.RowContainerName.TOP_LEFT+'"></ag-row-container>\n <ag-row-container ref="topCenterContainer" name="'+t.RowContainerName.TOP_CENTER+'"></ag-row-container>\n <ag-row-container ref="topRightContainer" name="'+t.RowContainerName.TOP_RIGHT+'"></ag-row-container>\n <ag-row-container ref="topFullWidthContainer" name="'+t.RowContainerName.TOP_FULL_WITH+'"></ag-row-container>\n </div>\n <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">\n <ag-row-container ref="leftContainer" name="'+t.RowContainerName.LEFT+'"></ag-row-container>\n <ag-row-container ref="centerContainer" name="'+t.RowContainerName.CENTER+'"></ag-row-container>\n <ag-row-container ref="rightContainer" name="'+t.RowContainerName.RIGHT+'"></ag-row-container>\n <ag-row-container ref="fullWidthContainer" name="'+t.RowContainerName.FULL_WIDTH+'"></ag-row-container>\n </div>\n <div class="ag-floating-bottom" ref="eBottom" role="presentation" unselectable="on">\n <ag-row-container ref="bottomLeftContainer" name="'+t.RowContainerName.BOTTOM_LEFT+'"></ag-row-container>\n <ag-row-container ref="bottomCenterContainer" name="'+t.RowContainerName.BOTTOM_CENTER+'"></ag-row-container>\n <ag-row-container ref="bottomRightContainer" name="'+t.RowContainerName.BOTTOM_RIGHT+'"></ag-row-container>\n <ag-row-container ref="bottomFullWidthContainer" name="'+t.RowContainerName.BOTTOM_FULL_WITH+'"></ag-row-container>\n </div>\n <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n <ag-overlay-wrapper></ag-overlay-wrapper>\n </div>',Cu=function(e){function n(){return e.call(this,wu)||this}return yu(n,e),n.prototype.init=function(){var e=this,n=function(e,t){var n=e+"px";t.style.minHeight=n,t.style.height=n},r={setRowAnimationCssOnBodyViewport:function(t,n){return e.setRowAnimationCssOnBodyViewport(t,n)},setColumnCount:function(t){return fr(e.getGui(),t)},setRowCount:function(t){return dr(e.getGui(),t)},setTopHeight:function(t){return n(t,e.eTop)},setBottomHeight:function(t){return n(t,e.eBottom)},setTopDisplay:function(t){return e.eTop.style.display=t},setBottomDisplay:function(t){return e.eBottom.style.display=t},setColumnMovingCss:function(t,n){return e.addOrRemoveCssClass(Bc,n)},updateLayoutClasses:function(n,r){dn(e.eBodyViewport,t.LayoutCssClasses.AUTO_HEIGHT,r.autoHeight),dn(e.eBodyViewport,t.LayoutCssClasses.NORMAL,r.normal),dn(e.eBodyViewport,t.LayoutCssClasses.PRINT,r.print),e.addOrRemoveCssClass(t.LayoutCssClasses.AUTO_HEIGHT,r.autoHeight),e.addOrRemoveCssClass(t.LayoutCssClasses.NORMAL,r.normal),e.addOrRemoveCssClass(t.LayoutCssClasses.PRINT,r.print)},setAlwaysVerticalScrollClass:function(t,n){return dn(e.eBodyViewport,jc,n)},registerBodyViewportResizeListener:function(t){var n=e.resizeObserverService.observeResize(e.eBodyViewport,t);e.addDestroyFunc((function(){return n()}))},setPinnedTopBottomOverflowY:function(t){return e.eTop.style.overflowY=e.eBottom.style.overflowY=t},setCellSelectableCss:function(t,n){[e.eTop,e.eBodyViewport,e.eBottom].forEach((function(e){return dn(e,Vc,n)}))}};this.ctrl=this.createManagedBean(new zc),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom),(this.rangeService||this.gridOptionsWrapper.isRowSelectionMulti())&&pr(this.getGui(),!0)},n.prototype.setRowAnimationCssOnBodyViewport=function(e,n){dn(this.eBodyViewport,t.RowAnimationCssClasses.ANIMATION_ON,n),dn(this.eBodyViewport,t.RowAnimationCssClasses.ANIMATION_OFF,!n)},n.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},bu([de("resizeObserverService")],n.prototype,"resizeObserverService",void 0),bu([he("rangeService")],n.prototype,"rangeService",void 0),bu([ao("eBodyViewport")],n.prototype,"eBodyViewport",void 0),bu([ao("eTop")],n.prototype,"eTop",void 0),bu([ao("eBottom")],n.prototype,"eBottom",void 0),bu([ao("gridHeader")],n.prototype,"headerRootComp",void 0),bu([ce],n.prototype,"init",null),n}(io);(du=t.ExcelFactoryMode||(t.ExcelFactoryMode={}))[du.SINGLE_SHEET=0]="SINGLE_SHEET",du[du.MULTI_SHEET=1]="MULTI_SHEET",(hu=t.ClientSideRowModelSteps||(t.ClientSideRowModelSteps={})).EVERYTHING="group",hu.FILTER="filter",hu.SORT="sort",hu.MAP="map",hu.AGGREGATE="aggregate",hu.PIVOT="pivot",hu.NOTHING="nothing";var xu,Su=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Eu=function(){function e(){this.detailGridInfoMap={},this.destroyCalled=!1}return e.prototype.registerOverlayWrapperComp=function(e){this.overlayWrapperComp=e},e.prototype.registerSideBarComp=function(e){this.sideBarComp=e},e.prototype.init=function(){var e=this;switch(this.rowModel.getType()){case Ce.ROW_MODEL_TYPE_CLIENT_SIDE:this.clientSideRowModel=this.rowModel;break;case Ce.ROW_MODEL_TYPE_INFINITE:this.infiniteRowModel=this.rowModel;break;case Ce.ROW_MODEL_TYPE_SERVER_SIDE:this.serverSideRowModel=this.rowModel}this.ctrlsService.whenReady((function(){e.gridBodyCon=e.ctrlsService.getGridBodyCtrl()}))},e.prototype.__getAlignedGridService=function(){return this.alignedGridsService},e.prototype.addDetailGridInfo=function(e,t){this.detailGridInfoMap[e]=t},e.prototype.removeDetailGridInfo=function(e){this.detailGridInfoMap[e]=void 0},e.prototype.getDetailGridInfo=function(e){return this.detailGridInfoMap[e]},e.prototype.forEachDetailGridInfo=function(e){var t=0;k(this.detailGridInfoMap,(function(n,r){o(r)&&(e(r,t),t++)}))},e.prototype.getDataAsCsv=function(e){if(xe.assertRegistered(t.ModuleNames.CsvExportModule,"api.getDataAsCsv"))return this.csvCreator.getDataAsCsv(e)},e.prototype.exportDataAsCsv=function(e){xe.assertRegistered(t.ModuleNames.CsvExportModule,"api.exportDataAsCSv")&&this.csvCreator.exportDataAsCsv(e)},e.prototype.getDataAsExcel=function(e){if(xe.assertRegistered(t.ModuleNames.ExcelExportModule,"api.getDataAsExcel")){var n=e&&e.exportMode||"xlsx";return this.excelCreator.getFactoryMode(n)===t.ExcelFactoryMode.MULTI_SHEET?void console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`"):this.excelCreator.getDataAsExcel(e)}},e.prototype.exportDataAsExcel=function(e){if(xe.assertRegistered(t.ModuleNames.ExcelExportModule,"api.exportDataAsExcel")){var n=e&&e.exportMode||"xlsx";if(this.excelCreator.getFactoryMode(n)===t.ExcelFactoryMode.MULTI_SHEET)return void console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`");this.excelCreator.exportDataAsExcel(e)}},e.prototype.getSheetDataForExcel=function(e){if(xe.assertRegistered(t.ModuleNames.ExcelExportModule,"api.getSheetDataForExcel")){var n=e&&e.exportMode||"xlsx";return this.excelCreator.setFactoryMode(t.ExcelFactoryMode.MULTI_SHEET,n),this.excelCreator.getSheetDataForExcel(e)}},e.prototype.getMultipleSheetsAsExcel=function(e){if(xe.assertRegistered(t.ModuleNames.ExcelExportModule,"api.getMultipleSheetsAsExcel"))return this.excelCreator.getMultipleSheetsAsExcel(e)},e.prototype.exportMultipleSheetsAsExcel=function(e){if(xe.assertRegistered(t.ModuleNames.ExcelExportModule,"api.exportMultipleSheetsAsExcel"))return this.excelCreator.exportMultipleSheetsAsExcel(e)},e.prototype.setEnterpriseDatasource=function(e){console.warn("ag-grid: since version 18.x, api.setEnterpriseDatasource() should be replaced with api.setServerSideDatasource()"),this.setServerSideDatasource(e)},e.prototype.setGridAriaProperty=function(e,t){if(e){var n=this.ctrlsService.getGridBodyCtrl().getGui(),r="aria-"+e;null===t?n.removeAttribute(r):n.setAttribute(r,t)}},e.prototype.setServerSideDatasource=function(e){this.serverSideRowModel?this.serverSideRowModel.setDatasource(e):console.warn("AG Grid: you can only use an enterprise datasource when gridOptions.rowModelType is '"+Ce.ROW_MODEL_TYPE_SERVER_SIDE+"'")},e.prototype.setDatasource=function(e){this.gridOptionsWrapper.isRowModelInfinite()?this.rowModel.setDatasource(e):console.warn("AG Grid: you can only use a datasource when gridOptions.rowModelType is '"+Ce.ROW_MODEL_TYPE_INFINITE+"'")},e.prototype.setViewportDatasource=function(e){this.gridOptionsWrapper.isRowModelViewport()?this.rowModel.setViewportDatasource(e):console.warn("AG Grid: you can only use a viewport datasource when gridOptions.rowModelType is '"+Ce.ROW_MODEL_TYPE_VIEWPORT+"'")},e.prototype.setRowData=function(e){if(this.gridOptionsWrapper.isRowModelDefault())if(this.gridOptionsWrapper.isImmutableData()){var t=this.immutableService.createTransactionForRowData(e);if(!t)return;var n=t[0],r=t[1],o=this.clientSideRowModel.updateRowData(n,r);o&&this.rowRenderer.refreshFullWidthRows(o.update)}else this.selectionService.reset(),this.clientSideRowModel.setRowData(e);else console.warn("cannot call setRowData unless using normal row model")},e.prototype.setFloatingTopRowData=function(e){console.warn("AG Grid: since v12, api.setFloatingTopRowData() is now api.setPinnedTopRowData()"),this.setPinnedTopRowData(e)},e.prototype.setFloatingBottomRowData=function(e){console.warn("AG Grid: since v12, api.setFloatingBottomRowData() is now api.setPinnedBottomRowData()"),this.setPinnedBottomRowData(e)},e.prototype.getFloatingTopRowCount=function(){return console.warn("AG Grid: since v12, api.getFloatingTopRowCount() is now api.getPinnedTopRowCount()"),this.getPinnedTopRowCount()},e.prototype.getFloatingBottomRowCount=function(){return console.warn("AG Grid: since v12, api.getFloatingBottomRowCount() is now api.getPinnedBottomRowCount()"),this.getPinnedBottomRowCount()},e.prototype.getFloatingTopRow=function(e){return console.warn("AG Grid: since v12, api.getFloatingTopRow() is now api.getPinnedTopRow()"),this.getPinnedTopRow(e)},e.prototype.getFloatingBottomRow=function(e){return console.warn("AG Grid: since v12, api.getFloatingBottomRow() is now api.getPinnedBottomRow()"),this.getPinnedBottomRow(e)},e.prototype.setPinnedTopRowData=function(e){this.pinnedRowModel.setPinnedTopRowData(e)},e.prototype.setPinnedBottomRowData=function(e){this.pinnedRowModel.setPinnedBottomRowData(e)},e.prototype.getPinnedTopRowCount=function(){return this.pinnedRowModel.getPinnedTopRowCount()},e.prototype.getPinnedBottomRowCount=function(){return this.pinnedRowModel.getPinnedBottomRowCount()},e.prototype.getPinnedTopRow=function(e){return this.pinnedRowModel.getPinnedTopRow(e)},e.prototype.getPinnedBottomRow=function(e){return this.pinnedRowModel.getPinnedBottomRow(e)},e.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api"),this.columnModel.setColumnDefs(e,t)},e.prototype.setAutoGroupColumnDef=function(e,t){this.gridOptionsWrapper.setProperty("autoGroupColumnDef",e,!0)},e.prototype.expireValueCache=function(){this.valueCache.expire()},e.prototype.getVerticalPixelRange=function(){return this.gridBodyCon.getScrollFeature().getVScrollPosition()},e.prototype.getHorizontalPixelRange=function(){return this.gridBodyCon.getScrollFeature().getHScrollPosition()},e.prototype.setAlwaysShowHorizontalScroll=function(e){this.gridOptionsWrapper.setProperty("alwaysShowHorizontalScroll",e)},e.prototype.setAlwaysShowVerticalScroll=function(e){this.gridOptionsWrapper.setProperty("alwaysShowVerticalScroll",e)},e.prototype.refreshToolPanel=function(){this.sideBarComp&&this.sideBarComp.refresh()},e.prototype.refreshCells=function(e){void 0===e&&(e={}),Array.isArray(e)?console.warn("since AG Grid v11.1, refreshCells() now takes parameters, please see the documentation."):this.rowRenderer.refreshCells(e)},e.prototype.flashCells=function(e){void 0===e&&(e={}),this.rowRenderer.flashCells(e)},e.prototype.redrawRows=function(e){void 0===e&&(e={});var t=e?e.rowNodes:void 0;this.rowRenderer.redrawRows(t)},e.prototype.refreshView=function(){console.warn("AG Grid: since v11.1, refreshView() is deprecated, please call refreshCells() or redrawRows() instead"),this.redrawRows()},e.prototype.refreshRows=function(e){console.warn("since AG Grid v11.1, refreshRows() is deprecated, please use refreshCells({rowNodes: rows}) or redrawRows({rowNodes: rows}) instead"),this.refreshCells({rowNodes:e})},e.prototype.rowDataChanged=function(e){console.warn("AG Grid: rowDataChanged is deprecated, either call refreshView() to refresh everything, or call rowNode.setRowData(newData) to set value on a particular node"),this.redrawRows()},e.prototype.softRefreshView=function(){console.error("AG Grid: since v16, softRefreshView() is no longer supported. Please check the documentation on how to refresh.")},e.prototype.refreshGroupRows=function(){console.warn("AG Grid: since v11.1, refreshGroupRows() is no longer supported, call refreshCells() instead. Because refreshCells() now does dirty checking, it will only refresh cells that have changed, so it should not be necessary to only refresh the group rows."),this.refreshCells()},e.prototype.setFunctionsReadOnly=function(e){this.gridOptionsWrapper.setProperty("functionsReadOnly",e)},e.prototype.refreshHeader=function(){this.ctrlsService.getHeaderRowContainerCtrls().forEach((function(e){return e.refresh()}))},e.prototype.isAnyFilterPresent=function(){return this.filterManager.isAnyFilterPresent()},e.prototype.isAdvancedFilterPresent=function(){return console.warn("AG Grid: isAdvancedFilterPresent() is deprecated, please use isColumnFilterPresent()"),this.isColumnFilterPresent()},e.prototype.isColumnFilterPresent=function(){return this.filterManager.isAdvancedFilterPresent()},e.prototype.isQuickFilterPresent=function(){return this.filterManager.isQuickFilterPresent()},e.prototype.getModel=function(){return this.rowModel},e.prototype.setRowNodeExpanded=function(e,t){e&&e.setExpanded(t)},e.prototype.onGroupExpandedOrCollapsed=function(e){i(this.clientSideRowModel)&&console.warn("AG Grid: cannot call onGroupExpandedOrCollapsed unless using normal row model"),o(e)&&console.warn("AG Grid: api.onGroupExpandedOrCollapsed - refreshFromIndex parameter is no longer used, the grid will refresh all rows"),this.clientSideRowModel.refreshModel({step:t.ClientSideRowModelSteps.MAP})},e.prototype.refreshInMemoryRowModel=function(e){console.warn("ag-grid: since version 18.x, api.refreshInMemoryRowModel() should be replaced with api.refreshClientSideRowModel()"),this.refreshClientSideRowModel(e)},e.prototype.refreshClientSideRowModel=function(e){i(this.clientSideRowModel)&&console.warn("cannot call refreshClientSideRowModel unless using normal row model");var n=t.ClientSideRowModelSteps.EVERYTHING,r={group:t.ClientSideRowModelSteps.EVERYTHING,filter:t.ClientSideRowModelSteps.FILTER,map:t.ClientSideRowModelSteps.MAP,aggregate:t.ClientSideRowModelSteps.AGGREGATE,sort:t.ClientSideRowModelSteps.SORT,pivot:t.ClientSideRowModelSteps.PIVOT};if(o(e)&&(n=r[e]),i(n))console.error("AG Grid: invalid step "+e+", available steps are "+Object.keys(r).join(", "));else{var a={step:n,keepRenderedRows:!0,animate:!0,keepEditingRows:!0};this.clientSideRowModel.refreshModel(a)}},e.prototype.isAnimationFrameQueueEmpty=function(){return this.animationFrameService.isQueueEmpty()},e.prototype.flushAllAnimationFrames=function(){this.animationFrameService.flushAllFrames()},e.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},e.prototype.getSizesForCurrentTheme=function(){return{rowHeight:this.gridOptionsWrapper.getRowHeightAsNumber(),headerHeight:this.gridOptionsWrapper.getHeaderHeight()}},e.prototype.expandAll=function(){this.clientSideRowModel?this.clientSideRowModel.expandOrCollapseAll(!0):this.serverSideRowModel?this.serverSideRowModel.expandAll(!0):console.warn("AG Grid: expandAll only works with Client Side Row Model and Server Side Row Model")},e.prototype.collapseAll=function(){this.clientSideRowModel?this.clientSideRowModel.expandOrCollapseAll(!1):this.serverSideRowModel?this.serverSideRowModel.expandAll(!1):console.warn("AG Grid: collapseAll only works with Client Side Row Model and Server Side Row Model")},e.prototype.getToolPanelInstance=function(e){if(this.sideBarComp){var t=this.sideBarComp.getToolPanelInstance(e);return this.frameworkComponentWrapper?this.frameworkComponentWrapper.unwrap(t):t}console.warn("AG Grid: toolPanel is only available in AG Grid Enterprise")},e.prototype.addVirtualRowListener=function(e,t,n){"string"!==typeof e&&console.warn("AG Grid: addVirtualRowListener is deprecated, please use addRenderedRowListener."),this.addRenderedRowListener(e,t,n)},e.prototype.addRenderedRowListener=function(e,t,n){"virtualRowSelected"===e&&console.warn("AG Grid: event virtualRowSelected is deprecated, to register for individual row\n selection events, add a listener directly to the row node."),this.rowRenderer.addRenderedRowListener(e,t,n)},e.prototype.setQuickFilter=function(e){this.filterManager.setQuickFilter(e)},e.prototype.selectIndex=function(e,t,n){console.warn("AG Grid: do not use api for selection, call node.setSelected(value) instead"),n&&console.warn("AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),this.selectionService.selectIndex(e,t)},e.prototype.deselectIndex=function(e,t){void 0===t&&(t=!1),console.warn("AG Grid: do not use api for selection, call node.setSelected(value) instead"),t&&console.warn("AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),this.selectionService.deselectIndex(e)},e.prototype.selectNode=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),console.warn("AG Grid: API for selection is deprecated, call node.setSelected(value) instead"),n&&console.warn("AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),e.setSelectedParams({newValue:!0,clearSelection:!t})},e.prototype.deselectNode=function(e,t){void 0===t&&(t=!1),console.warn("AG Grid: API for selection is deprecated, call node.setSelected(value) instead"),t&&console.warn("AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),e.setSelectedParams({newValue:!1})},e.prototype.selectAll=function(){this.selectionService.selectAllRowNodes()},e.prototype.deselectAll=function(){this.selectionService.deselectAllRowNodes()},e.prototype.selectAllFiltered=function(){this.selectionService.selectAllRowNodes(!0)},e.prototype.deselectAllFiltered=function(){this.selectionService.deselectAllRowNodes(!0)},e.prototype.recomputeAggregates=function(){i(this.clientSideRowModel)&&console.warn("cannot call recomputeAggregates unless using normal row model"),console.warn("recomputeAggregates is deprecated, please call api.refreshClientSideRowModel('aggregate') instead"),this.clientSideRowModel.refreshModel({step:t.ClientSideRowModelSteps.AGGREGATE})},e.prototype.sizeColumnsToFit=function(){this.gridBodyCon.sizeColumnsToFit()},e.prototype.showLoadingOverlay=function(){this.overlayWrapperComp.showLoadingOverlay()},e.prototype.showNoRowsOverlay=function(){this.overlayWrapperComp.showNoRowsOverlay()},e.prototype.hideOverlay=function(){this.overlayWrapperComp.hideOverlay()},e.prototype.isNodeSelected=function(e){return console.warn("AG Grid: no need to call api.isNodeSelected(), just call node.isSelected() instead"),e.isSelected()},e.prototype.getSelectedNodesById=function(){return console.error("AG Grid: since version 3.4, getSelectedNodesById no longer exists, use getSelectedNodes() instead"),null},e.prototype.getSelectedNodes=function(){return this.selectionService.getSelectedNodes()},e.prototype.getSelectedRows=function(){return this.selectionService.getSelectedRows()},e.prototype.getBestCostNodeSelection=function(){return this.selectionService.getBestCostNodeSelection()},e.prototype.getRenderedNodes=function(){return this.rowRenderer.getRenderedNodes()},e.prototype.ensureColIndexVisible=function(e){console.warn("AG Grid: ensureColIndexVisible(index) no longer supported, use ensureColumnVisible(colKey) instead.")},e.prototype.ensureColumnVisible=function(e){this.gridBodyCon.getScrollFeature().ensureColumnVisible(e)},e.prototype.ensureIndexVisible=function(e,t){this.gridBodyCon.getScrollFeature().ensureIndexVisible(e,t)},e.prototype.ensureNodeVisible=function(e,t){void 0===t&&(t=null),this.gridBodyCon.getScrollFeature().ensureNodeVisible(e,t)},e.prototype.forEachLeafNode=function(e){i(this.clientSideRowModel)&&console.warn("cannot call forEachNode unless using normal row model"),this.clientSideRowModel.forEachLeafNode(e)},e.prototype.forEachNode=function(e){this.rowModel.forEachNode(e)},e.prototype.forEachNodeAfterFilter=function(e){i(this.clientSideRowModel)&&console.warn("cannot call forEachNodeAfterFilter unless using normal row model"),this.clientSideRowModel.forEachNodeAfterFilter(e)},e.prototype.forEachNodeAfterFilterAndSort=function(e){i(this.clientSideRowModel)&&console.warn("cannot call forEachNodeAfterFilterAndSort unless using normal row model"),this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)},e.prototype.getFilterApiForColDef=function(e){return console.warn("ag-grid API method getFilterApiForColDef deprecated, use getFilterInstance instead"),this.getFilterInstance(e)},e.prototype.getFilterInstance=function(e,t){var n=this,r=this.columnModel.getPrimaryColumn(e);if(r){var o=this.filterManager.getFilterComponent(r,"NO_UI"),i=o&&o.resolveNow(null,(function(e){return e})),a=this.frameworkComponentWrapper?this.frameworkComponentWrapper.unwrap(i):i;return t&&(a?setTimeout(t,0,a):o&&o.then((function(e){var r=n.frameworkComponentWrapper?n.frameworkComponentWrapper.unwrap(e):e;t(r)}))),a}},e.prototype.getFilterApi=function(e){return console.warn("AG Grid: getFilterApi is deprecated, use getFilterInstance instead"),this.getFilterInstance(e)},e.prototype.destroyFilter=function(e){var t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"filterDestroyed")},e.prototype.getStatusPanel=function(e){if(this.statusBarService){var t=this.statusBarService.getStatusPanel(e);return this.frameworkComponentWrapper?this.frameworkComponentWrapper.unwrap(t):t}},e.prototype.getColumnDef=function(e){var t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null},e.prototype.getColumnDefs=function(){return this.columnModel.getColumnDefs()},e.prototype.onFilterChanged=function(){this.filterManager.onFilterChanged()},e.prototype.onSortChanged=function(){this.sortController.onSortChanged()},e.prototype.setSortModel=function(e,t){console.warn("AG Grid: as of version 24.0.0, setSortModel() is deprecated, sort information is now part of Column State. Please use columnApi.applyColumnState() instead.");var n=[];e&&e.forEach((function(e,t){n.push({colId:e.colId,sort:e.sort,sortIndex:t})})),this.columnModel.applyColumnState({state:n,defaultState:{sort:null}})},e.prototype.getSortModel=function(){console.warn("AG Grid: as of version 24.0.0, getSortModel() is deprecated, sort information is now part of Column State. Please use columnApi.getColumnState() instead.");var e=this.columnModel.getColumnState().filter((function(e){return null!=e.sort})),t={};e.forEach((function(e){var n=e.colId,r=e.sortIndex;t[n]=r}));var n=e.map((function(e){return{colId:e.colId,sort:e.sort}}));return n.sort((function(e,n){return t[e.colId]-t[n.colId]})),n},e.prototype.setFilterModel=function(e){this.filterManager.setFilterModel(e)},e.prototype.getFilterModel=function(){return this.filterManager.getFilterModel()},e.prototype.getFocusedCell=function(){return this.focusService.getFocusedCell()},e.prototype.clearFocusedCell=function(){return this.focusService.clearFocusedCell()},e.prototype.setFocusedCell=function(e,t,n){this.focusService.setFocusedCell(e,t,n,!0)},e.prototype.setSuppressRowDrag=function(e){this.gridOptionsWrapper.setProperty(es.PROP_SUPPRESS_ROW_DRAG,e)},e.prototype.setSuppressMoveWhenRowDragging=function(e){this.gridOptionsWrapper.setProperty(es.PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG,e)},e.prototype.setSuppressRowClickSelection=function(e){this.gridOptionsWrapper.setProperty(es.PROP_SUPPRESS_ROW_CLICK_SELECTION,e)},e.prototype.addRowDropZone=function(e){this.gridBodyCon.getRowDragFeature().addRowDropZone(e)},e.prototype.removeRowDropZone=function(e){var t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)},e.prototype.getRowDropZoneParams=function(e){return this.gridBodyCon.getRowDragFeature().getRowDropZone(e)},e.prototype.setHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(es.PROP_HEADER_HEIGHT,e)},e.prototype.setDomLayout=function(e){this.gridOptionsWrapper.setProperty(es.PROP_DOM_LAYOUT,e)},e.prototype.setEnableCellTextSelection=function(e){this.gridBodyCon.setCellTextSelection(e)},e.prototype.setFillHandleDirection=function(e){this.gridOptionsWrapper.setProperty(es.PROP_FILL_HANDLE_DIRECTION,e)},e.prototype.setGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GROUP_HEADER_HEIGHT,e)},e.prototype.setFloatingFiltersHeight=function(e){this.gridOptionsWrapper.setProperty(es.PROP_FLOATING_FILTERS_HEIGHT,e)},e.prototype.setPivotGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(es.PROP_PIVOT_GROUP_HEADER_HEIGHT,e)},e.prototype.setIsExternalFilterPresent=function(e){this.gridOptionsWrapper.setProperty(es.PROP_IS_EXTERNAL_FILTER_PRESENT,e)},e.prototype.setDoesExternalFilterPass=function(e){this.gridOptionsWrapper.setProperty(es.PROP_DOES_EXTERNAL_FILTER_PASS,e)},e.prototype.setNavigateToNextCell=function(e){this.gridOptionsWrapper.setProperty(es.PROP_NAVIGATE_TO_NEXT_CELL,e)},e.prototype.setTabToNextCell=function(e){this.gridOptionsWrapper.setProperty(es.PROP_TAB_TO_NEXT_CELL,e)},e.prototype.setTabToNextHeader=function(e){this.gridOptionsWrapper.setProperty(es.PROP_TAB_TO_NEXT_HEADER,e)},e.prototype.setNavigateToNextHeader=function(e){this.gridOptionsWrapper.setProperty(es.PROP_NAVIGATE_TO_NEXT_HEADER,e)},e.prototype.setGroupRowAggNodes=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GROUP_ROW_AGG_NODES,e)},e.prototype.setGetBusinessKeyForNode=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_BUSINESS_KEY_FOR_NODE,e)},e.prototype.setGetChildCount=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_CHILD_COUNT,e)},e.prototype.setProcessRowPostCreate=function(e){this.gridOptionsWrapper.setProperty(es.PROP_PROCESS_ROW_POST_CREATE,e)},e.prototype.setGetRowNodeId=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_ROW_NODE_ID,e)},e.prototype.setGetRowClass=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_ROW_CLASS,e)},e.prototype.setIsFullWidthCell=function(e){this.gridOptionsWrapper.setProperty(es.PROP_IS_FULL_WIDTH_CELL,e)},e.prototype.setIsRowSelectable=function(e){this.gridOptionsWrapper.setProperty(es.PROP_IS_ROW_SELECTABLE,e)},e.prototype.setIsRowMaster=function(e){this.gridOptionsWrapper.setProperty(es.PROP_IS_ROW_MASTER,e)},e.prototype.setPostSort=function(e){this.gridOptionsWrapper.setProperty(es.PROP_POST_SORT,e)},e.prototype.setGetDocument=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_DOCUMENT,e)},e.prototype.setGetContextMenuItems=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_CONTEXT_MENU_ITEMS,e)},e.prototype.setGetMainMenuItems=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_MAIN_MENU_ITEMS,e)},e.prototype.setProcessCellForClipboard=function(e){this.gridOptionsWrapper.setProperty(es.PROP_PROCESS_CELL_FOR_CLIPBOARD,e)},e.prototype.setSendToClipboard=function(e){this.gridOptionsWrapper.setProperty(es.PROP_SEND_TO_CLIPBOARD,e)},e.prototype.setProcessCellFromClipboard=function(e){this.gridOptionsWrapper.setProperty(es.PROP_PROCESS_CELL_FROM_CLIPBOARD,e)},e.prototype.setProcessSecondaryColDef=function(e){this.gridOptionsWrapper.setProperty(es.PROP_PROCESS_TO_SECONDARY_COLDEF,e)},e.prototype.setProcessSecondaryColGroupDef=function(e){this.gridOptionsWrapper.setProperty(es.PROP_PROCESS_SECONDARY_COL_GROUP_DEF,e)},e.prototype.setPostProcessPopup=function(e){this.gridOptionsWrapper.setProperty(es.PROP_POST_PROCESS_POPUP,e)},e.prototype.setDefaultGroupOrderComparator=function(e){this.gridOptionsWrapper.setProperty(es.PROP_DEFAULT_GROUP_ORDER_COMPARATOR,e)},e.prototype.setGetChartToolbarItems=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_CHART_TOOLBAR_ITEMS,e)},e.prototype.setPaginationNumberFormatter=function(e){this.gridOptionsWrapper.setProperty(es.PROP_PAGINATION_NUMBER_FORMATTER,e)},e.prototype.setGetServerSideStoreParams=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_SERVER_SIDE_STORE_PARAMS,e)},e.prototype.setIsServerSideGroupOpenByDefault=function(e){this.gridOptionsWrapper.setProperty(es.PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT,e)},e.prototype.setIsApplyServerSideTransaction=function(e){this.gridOptionsWrapper.setProperty(es.PROP_IS_APPLY_SERVER_SIDE_TRANSACTION,e)},e.prototype.setIsServerSideGroup=function(e){this.gridOptionsWrapper.setProperty(es.PROP_IS_SERVER_SIDE_GROUP,e)},e.prototype.setGetServerSideGroupKey=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_SERVER_SIDE_GROUP_KEY,e)},e.prototype.setGetRowStyle=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_ROW_STYLE,e)},e.prototype.setGetRowHeight=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GET_ROW_HEIGHT,e)},e.prototype.setPivotHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(es.PROP_PIVOT_HEADER_HEIGHT,e)},e.prototype.isSideBarVisible=function(){return!!this.sideBarComp&&this.sideBarComp.isDisplayed()},e.prototype.setSideBarVisible=function(e){this.sideBarComp?this.sideBarComp.setDisplayed(e):e&&console.warn("AG Grid: sideBar is not loaded")},e.prototype.setSideBarPosition=function(e){this.sideBarComp?this.sideBarComp.setSideBarPosition(e):console.warn("AG Grid: sideBar is not loaded")},e.prototype.openToolPanel=function(e){this.sideBarComp?this.sideBarComp.openToolPanel(e):console.warn("AG Grid: toolPanel is only available in AG Grid Enterprise")},e.prototype.closeToolPanel=function(){this.sideBarComp?this.sideBarComp.close():console.warn("AG Grid: toolPanel is only available in AG Grid Enterprise")},e.prototype.getOpenedToolPanel=function(){return this.sideBarComp?this.sideBarComp.openedItem():null},e.prototype.getSideBar=function(){return this.gridOptionsWrapper.getSideBar()},e.prototype.setSideBar=function(e){this.gridOptionsWrapper.setProperty("sideBar",Ua.parse(e))},e.prototype.setSuppressClipboardPaste=function(e){this.gridOptionsWrapper.setProperty(es.PROP_SUPPRESS_CLIPBOARD_PASTE,e)},e.prototype.isToolPanelShowing=function(){return this.sideBarComp.isToolPanelShowing()},e.prototype.doLayout=function(){K((function(){return console.warn("AG Grid - since version 25.1, doLayout was taken out, as it's not needed. The grid responds to grid size changes automatically")}),"doLayoutDeprecated")},e.prototype.resetRowHeights=function(){o(this.clientSideRowModel)&&this.clientSideRowModel.resetRowHeights()},e.prototype.setGroupRemoveSingleChildren=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GROUP_REMOVE_SINGLE_CHILDREN,e)},e.prototype.setGroupRemoveLowestSingleChildren=function(e){this.gridOptionsWrapper.setProperty(es.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN,e)},e.prototype.onRowHeightChanged=function(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()},e.prototype.getValue=function(e,t){var n=this.columnModel.getPrimaryColumn(e);return i(n)&&(n=this.columnModel.getGridColumn(e)),i(n)?null:this.valueService.getValue(n,t)},e.prototype.addEventListener=function(e,t){var n=this.gridOptionsWrapper.useAsyncEvents();this.eventService.addEventListener(e,t,n)},e.prototype.addGlobalListener=function(e){var t=this.gridOptionsWrapper.useAsyncEvents();this.eventService.addGlobalListener(e,t)},e.prototype.removeEventListener=function(e,t){var n=this.gridOptionsWrapper.useAsyncEvents();this.eventService.removeEventListener(e,t,n)},e.prototype.removeGlobalListener=function(e){var t=this.gridOptionsWrapper.useAsyncEvents();this.eventService.removeGlobalListener(e,t)},e.prototype.dispatchEvent=function(e){this.eventService.dispatchEvent(e)},e.prototype.destroy=function(){if(!this.destroyCalled){this.destroyCalled=!0;var e=this.ctrlsService.getGridCtrl();e&&e.destroyGridUi(),this.context.destroy()}},e.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid=function(){setTimeout(B.bind(window,this,"Grid API"),100)},e.prototype.warnIfDestroyed=function(e){return this.destroyCalled&&console.warn("AG Grid: Grid API method "+e+" was called on a grid that was destroyed."),this.destroyCalled},e.prototype.resetQuickFilter=function(){this.warnIfDestroyed("resetQuickFilter")||this.rowModel.forEachNode((function(e){return e.quickFilterAggregateText=null}))},e.prototype.getRangeSelections=function(){return console.warn("AG Grid: in v20.1.x, api.getRangeSelections() is gone, please use getCellRanges() instead.\n We had to change how cell selections works a small bit to allow charting to integrate. The return type of\n getCellRanges() is a bit different, please check the AG Grid documentation."),null},e.prototype.getCellRanges=function(){return this.rangeService?this.rangeService.getCellRanges():(console.warn("AG Grid: cell range selection is only available in AG Grid Enterprise"),null)},e.prototype.camelCaseToHumanReadable=function(e){return it(e)},e.prototype.addRangeSelection=function(e){console.warn("AG Grid: As of version 21.x, range selection changed slightly to allow charting integration. Please call api.addCellRange() instead of api.addRangeSelection()")},e.prototype.addCellRange=function(e){this.rangeService||console.warn("AG Grid: cell range selection is only available in AG Grid Enterprise"),this.rangeService.addCellRange(e)},e.prototype.clearRangeSelection=function(){this.rangeService||console.warn("AG Grid: cell range selection is only available in AG Grid Enterprise"),this.rangeService.removeAllCellRanges()},e.prototype.undoCellEditing=function(){this.undoRedoService.undo()},e.prototype.redoCellEditing=function(){this.undoRedoService.redo()},e.prototype.getCurrentUndoSize=function(){return this.undoRedoService.getCurrentUndoStackSize()},e.prototype.getCurrentRedoSize=function(){return this.undoRedoService.getCurrentRedoStackSize()},e.prototype.getChartModels=function(){if(xe.assertRegistered(t.ModuleNames.RangeSelectionModule,"api.getChartModels")&&xe.assertRegistered(t.ModuleNames.GridChartsModule,"api.getChartModels"))return this.chartService.getChartModels()},e.prototype.getChartRef=function(e){if(xe.assertRegistered(t.ModuleNames.RangeSelectionModule,"api.getChartRef")&&xe.assertRegistered(t.ModuleNames.GridChartsModule,"api.getChartRef"))return this.chartService.getChartRef(e)},e.prototype.getChartImageDataURL=function(e){if(xe.assertRegistered(t.ModuleNames.RangeSelectionModule,"api.getChartImageDataURL")&&xe.assertRegistered(t.ModuleNames.GridChartsModule,"api.getChartImageDataURL"))return this.chartService.getChartImageDataURL(e)},e.prototype.createRangeChart=function(e){if(xe.assertRegistered(t.ModuleNames.RangeSelectionModule,"api.createRangeChart")&&xe.assertRegistered(t.ModuleNames.GridChartsModule,"api.createRangeChart"))return this.chartService.createRangeChart(e)},e.prototype.createCrossFilterChart=function(e){if(xe.assertRegistered(t.ModuleNames.RangeSelectionModule,"api.createCrossFilterChart")&&xe.assertRegistered(t.ModuleNames.GridChartsModule,"api.createCrossFilterChart"))return this.chartService.createCrossFilterChart(e)},e.prototype.restoreChart=function(e,n){if(xe.assertRegistered(t.ModuleNames.RangeSelectionModule,"api.restoreChart")&&xe.assertRegistered(t.ModuleNames.GridChartsModule,"api.restoreChart"))return this.chartService.restoreChart(e,n)},e.prototype.createPivotChart=function(e){if(xe.assertRegistered(t.ModuleNames.RangeSelectionModule,"api.createPivotChart")&&xe.assertRegistered(t.ModuleNames.GridChartsModule,"api.createPivotChart"))return this.chartService.createPivotChart(e)},e.prototype.copySelectedRowsToClipboard=function(e,t){this.clipboardService||console.warn("AG Grid: clipboard is only available in AG Grid Enterprise"),this.clipboardService.copySelectedRowsToClipboard(e,t)},e.prototype.copySelectedRangeToClipboard=function(e){this.clipboardService||console.warn("AG Grid: clipboard is only available in AG Grid Enterprise"),this.clipboardService.copySelectedRangeToClipboard(e)},e.prototype.copySelectedRangeDown=function(){this.clipboardService||console.warn("AG Grid: clipboard is only available in AG Grid Enterprise"),this.clipboardService.copyRangeDown()},e.prototype.showColumnMenuAfterButtonClick=function(e,t){var n=this.columnModel.getGridColumn(e);this.menuFactory.showMenuAfterButtonClick(n,t,"columnMenu")},e.prototype.showColumnMenuAfterMouseClick=function(e,t){var n=this.columnModel.getGridColumn(e);n||(n=this.columnModel.getPrimaryColumn(e)),n?this.menuFactory.showMenuAfterMouseEvent(n,t):console.error("AG Grid: column '"+e+"' not found")},e.prototype.hidePopupMenu=function(){this.contextMenuFactory&&this.contextMenuFactory.hideActiveMenu(),this.menuFactory.hideActiveMenu()},e.prototype.setPopupParent=function(e){this.gridOptionsWrapper.setProperty(es.PROP_POPUP_PARENT,e)},e.prototype.tabToNextCell=function(){return this.navigationService.tabToNextCell(!1)},e.prototype.tabToPreviousCell=function(){return this.navigationService.tabToNextCell(!0)},e.prototype.getCellRendererInstances=function(e){return void 0===e&&(e={}),this.rowRenderer.getCellRendererInstances(e)},e.prototype.getCellEditorInstances=function(e){return void 0===e&&(e={}),this.rowRenderer.getCellEditorInstances(e)},e.prototype.getEditingCells=function(){return this.rowRenderer.getEditingCells()},e.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.rowRenderer.stopEditing(e)},e.prototype.startEditingCell=function(e){var t=this.columnModel.getGridColumn(e.colKey);if(t){var n={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};null==e.rowPinned&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex);var r=this.navigationService.getCellByPosition(n);r&&r.startRowOrCellEdit(e.keyPress,e.charPress)}else console.warn("AG Grid: no column found for "+e.colKey)},e.prototype.addAggFunc=function(e,t){this.aggFuncService&&this.aggFuncService.addAggFunc(e,t)},e.prototype.addAggFuncs=function(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)},e.prototype.clearAggFuncs=function(){this.aggFuncService&&this.aggFuncService.clear()},e.prototype.applyServerSideTransaction=function(e){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransaction(e);console.warn("AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.")},e.prototype.applyServerSideTransactionAsync=function(e,t){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransactionAsync(e,t);console.warn("AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.")},e.prototype.retryServerSideLoads=function(){this.serverSideRowModel?this.serverSideRowModel.retryLoads():console.warn("AG Grid: API retryServerSideLoads() can only be used when using Server-Side Row Model.")},e.prototype.flushServerSideAsyncTransactions=function(){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.flushAsyncTransactions();console.warn("AG Grid: Cannot flush Server Side Transaction if not using the Server Side Row Model.")},e.prototype.applyTransaction=function(e){if(this.clientSideRowModel){var t=this.clientSideRowModel.updateRowData(e);return this.rowRenderer.refreshFullWidthRows(t.update),this.gridOptionsWrapper.isSuppressChangeDetection()||this.rowRenderer.refreshCells(),t}console.error("AG Grid: updateRowData() only works with ClientSideRowModel. Working with InfiniteRowModel was deprecated in v23.1 and removed in v24.1")},e.prototype.updateRowData=function(e){return K((function(){return console.warn("AG Grid: as of v23.1, grid API updateRowData(transaction) is now called applyTransaction(transaction). updateRowData is deprecated and will be removed in a future major release.")}),"updateRowData deprecated"),this.applyTransaction(e)},e.prototype.applyTransactionAsync=function(e,t){this.clientSideRowModel?this.clientSideRowModel.batchUpdateRowData(e,t):console.error("AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.")},e.prototype.flushAsyncTransactions=function(){this.clientSideRowModel?this.clientSideRowModel.flushAsyncTransactions():console.error("AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.")},e.prototype.batchUpdateRowData=function(e,t){K((function(){return console.warn("AG Grid: as of v23.1, grid API batchUpdateRowData(transaction, callback) is now called applyTransactionAsync(transaction, callback). batchUpdateRowData is deprecated and will be removed in a future major release.")}),"batchUpdateRowData deprecated"),this.applyTransactionAsync(e,t)},e.prototype.insertItemsAtIndex=function(e,t,n){console.warn("AG Grid: insertItemsAtIndex() is deprecated, use updateRowData(transaction) instead."),this.updateRowData({add:t,addIndex:e,update:null,remove:null})},e.prototype.removeItems=function(e,t){console.warn("AG Grid: removeItems() is deprecated, use updateRowData(transaction) instead.");var n=e.map((function(e){return e.data}));this.updateRowData({add:null,addIndex:null,update:null,remove:n})},e.prototype.addItems=function(e,t){console.warn("AG Grid: addItems() is deprecated, use updateRowData(transaction) instead."),this.updateRowData({add:e,addIndex:null,update:null,remove:null})},e.prototype.refreshVirtualPageCache=function(){console.warn("AG Grid: refreshVirtualPageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead"),this.refreshInfiniteCache()},e.prototype.refreshInfinitePageCache=function(){console.warn("AG Grid: refreshInfinitePageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead"),this.refreshInfiniteCache()},e.prototype.refreshInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():console.warn("AG Grid: api.refreshInfiniteCache is only available when rowModelType='infinite'.")},e.prototype.purgeVirtualPageCache=function(){console.warn("AG Grid: purgeVirtualPageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead"),this.purgeInfinitePageCache()},e.prototype.purgeInfinitePageCache=function(){console.warn("AG Grid: purgeInfinitePageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead"),this.purgeInfiniteCache()},e.prototype.purgeInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():console.warn("AG Grid: api.purgeInfiniteCache is only available when rowModelType='infinite'.")},e.prototype.purgeEnterpriseCache=function(e){console.warn("ag-grid: since version 18.x, api.purgeEnterpriseCache() should be replaced with api.purgeServerSideCache()"),this.purgeServerSideCache(e)},e.prototype.purgeServerSideCache=function(e){void 0===e&&(e=[]),this.serverSideRowModel?(console.warn("AG Grid: since v25.0, api.purgeServerSideCache is deprecated. Please use api.refreshServerSideStore({purge: true}) instead."),this.refreshServerSideStore({route:e,purge:!0})):console.warn("AG Grid: api.purgeServerSideCache is only available when rowModelType='serverSide'.")},e.prototype.refreshServerSideStore=function(e){this.serverSideRowModel?this.serverSideRowModel.refreshStore(e):console.warn("AG Grid: api.refreshServerSideStore is only available when rowModelType='serverSide'.")},e.prototype.getServerSideStoreState=function(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(console.warn("AG Grid: api.getServerSideStoreState is only available when rowModelType='serverSide'."),[])},e.prototype.getVirtualRowCount=function(){return console.warn("AG Grid: getVirtualRowCount() is now called getInfiniteRowCount(), please call getInfiniteRowCount() instead"),this.getInfiniteRowCount()},e.prototype.getInfiniteRowCount=function(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();console.warn("AG Grid: api.getVirtualRowCount is only available when rowModelType='virtual'.")},e.prototype.isMaxRowFound=function(){return console.warn("AG Grid: api.isLastRowIndexKnown is deprecated, please use api.isLastRowIndexKnown()"),this.isLastRowIndexKnown()},e.prototype.isLastRowIndexKnown=function(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();console.warn("AG Grid: api.isMaxRowFound is only available when rowModelType='virtual'.")},e.prototype.setVirtualRowCount=function(e,t){console.warn("AG Grid: setVirtualRowCount() is now called setInfiniteRowCount(), please call setInfiniteRowCount() instead"),this.setRowCount(e,t)},e.prototype.setInfiniteRowCount=function(e,t){console.warn("AG Grid: setInfiniteRowCount() is now called setRowCount(), please call setRowCount() instead"),this.setRowCount(e,t)},e.prototype.setRowCount=function(e,t){this.infiniteRowModel?this.infiniteRowModel.setRowCount(e,t):console.warn("AG Grid: api.setRowCount is only available for Infinite Row Model.")},e.prototype.getVirtualPageState=function(){return console.warn("AG Grid: getVirtualPageState() is now called getCacheBlockState(), please call getCacheBlockState() instead"),this.getCacheBlockState()},e.prototype.getInfinitePageState=function(){return console.warn("AG Grid: getInfinitePageState() is now called getCacheBlockState(), please call getCacheBlockState() instead"),this.getCacheBlockState()},e.prototype.getCacheBlockState=function(){return this.rowNodeBlockLoader.getBlockState()},e.prototype.checkGridSize=function(){console.warn("in AG Grid v25.2.0, checkGridSize() was removed, as it was legacy and didn't do anything uesful.")},e.prototype.getFirstRenderedRow=function(){return console.warn("in AG Grid v12, getFirstRenderedRow() was renamed to getFirstDisplayedRow()"),this.getFirstDisplayedRow()},e.prototype.getFirstDisplayedRow=function(){return this.rowRenderer.getFirstVirtualRenderedRow()},e.prototype.getLastRenderedRow=function(){return console.warn("in AG Grid v12, getLastRenderedRow() was renamed to getLastDisplayedRow()"),this.getLastDisplayedRow()},e.prototype.getLastDisplayedRow=function(){return this.rowRenderer.getLastVirtualRenderedRow()},e.prototype.getDisplayedRowAtIndex=function(e){return this.rowModel.getRow(e)},e.prototype.getDisplayedRowCount=function(){return this.rowModel.getRowCount()},e.prototype.paginationIsLastPageFound=function(){return this.paginationProxy.isLastPageFound()},e.prototype.paginationGetPageSize=function(){return this.paginationProxy.getPageSize()},e.prototype.paginationSetPageSize=function(e){this.gridOptionsWrapper.setProperty("paginationPageSize",e)},e.prototype.paginationGetCurrentPage=function(){return this.paginationProxy.getCurrentPage()},e.prototype.paginationGetTotalPages=function(){return this.paginationProxy.getTotalPages()},e.prototype.paginationGetRowCount=function(){return this.paginationProxy.getMasterRowCount()},e.prototype.paginationGoToNextPage=function(){this.paginationProxy.goToNextPage()},e.prototype.paginationGoToPreviousPage=function(){this.paginationProxy.goToPreviousPage()},e.prototype.paginationGoToFirstPage=function(){this.paginationProxy.goToFirstPage()},e.prototype.paginationGoToLastPage=function(){this.paginationProxy.goToLastPage()},e.prototype.paginationGoToPage=function(e){this.paginationProxy.goToPage(e)},Su([he("immutableService")],e.prototype,"immutableService",void 0),Su([he("csvCreator")],e.prototype,"csvCreator",void 0),Su([he("excelCreator")],e.prototype,"excelCreator",void 0),Su([de("rowRenderer")],e.prototype,"rowRenderer",void 0),Su([de("navigationService")],e.prototype,"navigationService",void 0),Su([de("filterManager")],e.prototype,"filterManager",void 0),Su([de("columnModel")],e.prototype,"columnModel",void 0),Su([de("selectionService")],e.prototype,"selectionService",void 0),Su([de("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),Su([de("valueService")],e.prototype,"valueService",void 0),Su([de("alignedGridsService")],e.prototype,"alignedGridsService",void 0),Su([de("eventService")],e.prototype,"eventService",void 0),Su([de("pinnedRowModel")],e.prototype,"pinnedRowModel",void 0),Su([de("context")],e.prototype,"context",void 0),Su([de("rowModel")],e.prototype,"rowModel",void 0),Su([de("sortController")],e.prototype,"sortController",void 0),Su([de("paginationProxy")],e.prototype,"paginationProxy",void 0),Su([de("focusService")],e.prototype,"focusService",void 0),Su([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),Su([he("rangeService")],e.prototype,"rangeService",void 0),Su([he("clipboardService")],e.prototype,"clipboardService",void 0),Su([he("aggFuncService")],e.prototype,"aggFuncService",void 0),Su([de("menuFactory")],e.prototype,"menuFactory",void 0),Su([he("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),Su([de("valueCache")],e.prototype,"valueCache",void 0),Su([de("animationFrameService")],e.prototype,"animationFrameService",void 0),Su([he("statusBarService")],e.prototype,"statusBarService",void 0),Su([he("chartService")],e.prototype,"chartService",void 0),Su([he("undoRedoService")],e.prototype,"undoRedoService",void 0),Su([he("rowNodeBlockLoader")],e.prototype,"rowNodeBlockLoader",void 0),Su([he("ssrmTransactionManager")],e.prototype,"serverSideTransactionManager",void 0),Su([de("ctrlsService")],e.prototype,"ctrlsService",void 0),Su([he("frameworkComponentWrapper")],e.prototype,"frameworkComponentWrapper",void 0),Su([ce],e.prototype,"init",null),Su([ue],e.prototype,"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid",null),e=Su([pe("gridApi")],e)}(),_u=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ru=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ou=function(e,t){return function(n,r){t(n,r,e)}},Au=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.expressionToFunctionCache={},t}return _u(t,e),t.prototype.setBeans=function(e){this.logger=e.create("ExpressionService")},t.prototype.evaluate=function(e,t){if("function"===typeof e)return e(t);if("string"===typeof e){var n=e;return this.evaluateExpression(n,t)}console.error("AG Grid: value should be either a string or a function",e)},t.prototype.evaluateExpression=function(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(n){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",t),console.log("Exception = "+n),null}},t.prototype.createExpressionFunction=function(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];var t=this.createFunctionBody(e),n=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=n,n},t.prototype.createFunctionBody=function(e){return e.indexOf("return")>=0?e:"return "+e+";"},Ru([Ou(0,ge("loggerFactory"))],t.prototype,"setBeans",null),t=Ru([pe("expressionService")],t)}(ze),Pu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tu=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.templateCache={},t.waitingCallbacks={},t}return Pu(t,e),t.prototype.getTemplate=function(e,t){var n=this.templateCache[e];if(n)return n;var r=this.waitingCallbacks[e],o=this;if(!r){r=[],this.waitingCallbacks[e]=r;var i=new XMLHttpRequest;i.onload=function(){o.handleHttpResult(this,e)},i.open("GET",e),i.send()}return t&&r.push(t),null},t.prototype.handleHttpResult=function(e,t){if(200===e.status&&null!==e.response){this.templateCache[t]=e.response||e.responseText;for(var n=this.waitingCallbacks[t],r=0;r<n.length;r++){(0,n[r])()}if(this.$scope){var o=this;window.setTimeout((function(){o.$scope.$apply()}),0)}}else console.warn("Unable to get template error "+e.status+" - "+t)},Tu([de("$scope")],t.prototype,"$scope",void 0),t=Tu([pe("templateService")],t)}(ze),ku=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nu=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Mu=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},Iu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return ku(t,e),n=t,t.addKeyboardModeEvents=function(e,t){var r=n.instancesMonitored.get(e);r&&r.length>0?-1===r.indexOf(t)&&r.push(t):(n.instancesMonitored.set(e,[t]),e.addEventListener("keydown",n.toggleKeyboardMode),e.addEventListener("mousedown",n.toggleKeyboardMode))},t.removeKeyboardModeEvents=function(e,t){var r=n.instancesMonitored.get(e),o=[];r&&r.length&&(o=Mu(r).filter((function(e){return e!==t})),n.instancesMonitored.set(e,o)),0===o.length&&(e.removeEventListener("keydown",n.toggleKeyboardMode),e.removeEventListener("mousedown",n.toggleKeyboardMode))},t.toggleKeyboardMode=function(e){var t=n.keyboardModeActive,r="keydown"===e.type;if((!r||!(e.ctrlKey||e.metaKey||e.altKey))&&!(t&&r||!t&&!r)){n.keyboardModeActive=r;var o=e.target.ownerDocument;if(o){var i=n.instancesMonitored.get(o);i&&i.forEach((function(e){e.dispatchEvent({type:r?Ke.EVENT_KEYBOARD_FOCUS:Ke.EVENT_MOUSE_FOCUS})}))}}},t.prototype.init=function(){var e=this,t=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_PIVOT_MODE_CHANGED,t),this.addManagedListener(this.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_GROUP_OPENED,t),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,t),this.ctrlsService.whenReady((function(t){e.gridCtrl=t.gridCtrl;var r=e.gridOptionsWrapper.getDocument();n.addKeyboardModeEvents(r,e.gridCtrl),e.addDestroyFunc((function(){return e.unregisterGridCompController(e.gridCtrl)}))}))},t.prototype.unregisterGridCompController=function(e){var t=this.gridOptionsWrapper.getDocument();n.removeKeyboardModeEvents(t,e)},t.prototype.onColumnEverythingChanged=function(){if(this.focusedCellPosition){var e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}},t.prototype.isKeyboardMode=function(){return n.keyboardModeActive},t.prototype.getFocusCellToUseAfterRefresh=function(){return this.gridOptionsWrapper.isSuppressFocusAfterRefresh()||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(document.activeElement,Hs.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition},t.prototype.getFocusHeaderToUseAfterRefresh=function(){return this.gridOptionsWrapper.isSuppressFocusAfterRefresh()||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(document.activeElement,Rl.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition},t.prototype.isDomDataMissingInHierarchy=function(e,t){for(var n=e;n;){if(this.gridOptionsWrapper.getDomData(n,t))return!1;n=n.parentNode}return!0},t.prototype.clearFocusedCell=function(){this.focusedCellPosition=null,this.onCellFocused(!1)},t.prototype.getFocusedCell=function(){return this.focusedCellPosition},t.prototype.setFocusedCell=function(e,t,n,o){void 0===o&&(o=!1);var i=this.columnModel.getGridColumn(t);i?(this.focusedCellPosition=i?{rowIndex:e,rowPinned:r(n),column:i}:null,this.onCellFocused(o)):this.focusedCellPosition=null},t.prototype.isCellFocused=function(e){return null!=this.focusedCellPosition&&(this.focusedCellPosition.column===e.column&&this.isRowFocused(e.rowIndex,e.rowPinned))},t.prototype.isRowNodeFocused=function(e){return this.isRowFocused(e.rowIndex,e.rowPinned)},t.prototype.isHeaderWrapperFocused=function(e){if(null==this.focusedHeaderPosition)return!1;var t=e.getColumnGroupChild(),n=e.getRowIndex(),r=e.getPinned(),o=this.focusedHeaderPosition,i=o.column,a=o.headerRowIndex;return t===i&&n===a&&r==i.getPinned()},t.prototype.clearFocusedHeader=function(){this.focusedHeaderPosition=null},t.prototype.getFocusedHeader=function(){return this.focusedHeaderPosition},t.prototype.setFocusedHeader=function(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}},t.prototype.focusHeaderPosition=function(e){var t=e.direction,n=e.fromTab,r=e.allowUserOverride,o=e.event,i=e.headerPosition;if(r){var a,s=this.gridOptionsWrapper,l=this.getFocusedHeader(),c=this.headerNavigationService.getHeaderRowCount();if(n){if(a=s.getTabToNextHeaderFunc())i=a({backwards:"Before"===t,previousHeaderPosition:l,nextHeaderPosition:i,headerRowCount:c,api:s.getApi(),columnApi:s.getColumnApi()})}else if((a=s.getNavigateToNextHeaderFunc())&&o)i=a({key:o.key,previousHeaderPosition:l,nextHeaderPosition:i,headerRowCount:c,event:o,api:s.getApi(),columnApi:s.getColumnApi()})}return!!i&&(-1===i.headerRowIndex?this.focusGridView(i.column):(this.headerNavigationService.scrollToColumn(i.column,t),this.ctrlsService.getHeaderRowContainerCtrl(i.column.getPinned()).focusHeader(i.headerRowIndex,i.column,o)))},t.prototype.isAnyCellFocused=function(){return!!this.focusedCellPosition},t.prototype.isRowFocused=function(e,t){return null!=this.focusedCellPosition&&(this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===r(t))},t.prototype.findFocusableElements=function(e,t,n){void 0===n&&(n=!1);var r=Ce.FOCUSABLE_SELECTOR,o=Ce.FOCUSABLE_EXCLUDE;t&&(o+=", "+t),n&&(o+=', [tabindex="-1"]');var i=Array.prototype.slice.apply(e.querySelectorAll(r)),a=Array.prototype.slice.apply(e.querySelectorAll(o));if(!a.length)return i;var s;return s=a,i.filter((function(e){return-1===s.indexOf(e)}))},t.prototype.focusInto=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=this.findFocusableElements(e,null,n),o=t?v(r):r[0];return!!o&&(o.focus(),!0)},t.prototype.findNextFocusableElement=function(e,t,n){var r=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),o=(t?_(r,(function(e){return e.contains(document.activeElement)})):r.indexOf(document.activeElement))+(n?-1:1);return o<0||o>=r.length?null:r[o]},t.prototype.isFocusUnderManagedComponent=function(e){var t=e.querySelectorAll("."+Co.FOCUS_MANAGED_CLASS);if(!t.length)return!1;for(var n=0;n<t.length;n++)if(t[n].contains(document.activeElement))return!0;return!1},t.prototype.findTabbableParent=function(e,t){void 0===t&&(t=5);for(var n=0;e&&null===en(e)&&++n<=t;)e=e.parentElement;return null===en(e)?null:e},t.prototype.onCellFocused=function(e){var t={type:Ke.EVENT_CELL_FOCUSED,forceBrowserFocus:e,rowIndex:null,column:null,floating:null,api:this.gridApi,columnApi:this.columnApi,rowPinned:null,isFullWidthCell:!1};if(this.focusedCellPosition){var n=t.rowIndex=this.focusedCellPosition.rowIndex,r=t.rowPinned=this.focusedCellPosition.rowPinned;t.column=this.focusedCellPosition.column;var o=this.rowRenderer.getRowByPosition({rowIndex:n,rowPinned:r});o&&(t.isFullWidthCell=o.isFullWidth())}this.eventService.dispatchEvent(t)},t.prototype.focusGridView=function(e,t){var n=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!n)return!1;var o=n.rowIndex,i=n.rowPinned,a=this.getFocusedHeader();if(!e&&a&&(e=a.column),null==o||!e)return!1;if(this.navigationService.ensureCellVisible({rowIndex:o,column:e,rowPinned:i}),this.setFocusedCell(o,e,r(i),!0),this.rangeService){var s={rowIndex:o,rowPinned:i,column:e};this.rangeService.setRangeToCell(s)}return!0},t.prototype.focusNextGridCoreContainer=function(e){return!!this.gridCtrl.focusNextInnerContainer(e)||(e||this.gridCtrl.forceFocusOutOfContainer(),!1)},t.AG_KEYBOARD_FOCUS="ag-keyboard-focus",t.keyboardModeActive=!1,t.instancesMonitored=new Map,Nu([de("columnModel")],t.prototype,"columnModel",void 0),Nu([de("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Nu([de("columnApi")],t.prototype,"columnApi",void 0),Nu([de("gridApi")],t.prototype,"gridApi",void 0),Nu([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Nu([de("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),Nu([he("rangeService")],t.prototype,"rangeService",void 0),Nu([de("navigationService")],t.prototype,"navigationService",void 0),Nu([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Nu([ce],t.prototype,"init",null),t=n=Nu([pe("focusService")],t)}(ze),Lu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fu=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e[e.vertical=0]="vertical",e[e.horizontal=1]="horizontal"}(xu||(xu={}));var Gu,Hu=0,Wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popupList=[],t}return Lu(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridCtrl=t.gridCtrl,e.addManagedListener(e.gridCtrl,Ke.EVENT_KEYBOARD_FOCUS,(function(){A(e.popupList,(function(e){return un(e.element,Iu.AG_KEYBOARD_FOCUS)}))})),e.addManagedListener(e.gridCtrl,Ke.EVENT_MOUSE_FOCUS,(function(){A(e.popupList,(function(e){return pn(e.element,Iu.AG_KEYBOARD_FOCUS)}))}))}))},t.prototype.getPopupParent=function(){var e=this.gridOptionsWrapper.getPopupParent();return e||this.gridCtrl.getGui()},t.prototype.positionPopupForMenu=function(e){var t=e.eventSource.getBoundingClientRect(),n=this.getParentRect(),r=this.keepXYWithinBounds(e.ePopup,t.top-n.top,xu.vertical),o=e.ePopup.clientWidth>0?e.ePopup.clientWidth:200;e.ePopup.style.minWidth=o+"px";var i,a=n.right-n.left-o;function s(){return t.right-n.left-2}function l(){return t.left-n.left-o}this.gridOptionsWrapper.isEnableRtl()?((i=l())<0&&(i=s()),i>a&&(i=0)):((i=s())>a&&(i=l()),i<0&&(i=0)),e.ePopup.style.left=i+"px",e.ePopup.style.top=r+"px"},t.prototype.positionPopupUnderMouseEvent=function(e){var t=e.ePopup,n=e.nudgeX,r=e.nudgeY,o=this.calculatePointerAlign(e.mouseEvent),i=o.x,a=o.y;this.positionPopup({ePopup:t,x:i,y:a,nudgeX:n,nudgeY:r,keepWithinBounds:!0}),this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)},t.prototype.calculatePointerAlign=function(e){var t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},t.prototype.positionPopupUnderComponent=function(e){var t=e.eventSource.getBoundingClientRect(),n=e.alignSide||"left",r=this.getParentRect(),o=t.left-r.left;"right"===n&&(o-=e.ePopup.offsetWidth-t.width),this.positionPopup({ePopup:e.ePopup,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:o,y:t.top-r.top+t.height,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.type,e.ePopup,e.eventSource,null,e.column,e.rowNode)},t.prototype.positionPopupOverComponent=function(e){var t=e.eventSource.getBoundingClientRect(),n=this.getParentRect();this.positionPopup({ePopup:e.ePopup,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:t.left-n.left,y:t.top-n.top,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.type,e.ePopup,e.eventSource,null,e.column,e.rowNode)},t.prototype.callPostProcessPopup=function(e,t,n,r,o,i){var a=this.gridOptionsWrapper.getPostProcessPopupFunc();a&&a({column:o,rowNode:i,ePopup:t,type:e,eventSource:n,mouseEvent:r})},t.prototype.positionPopup=function(e){var t=e.ePopup,n=e.keepWithinBounds,r=e.nudgeX,o=e.nudgeY,i=e.x,a=e.y;r&&(i+=r),o&&(a+=o),n&&(i=this.keepXYWithinBounds(t,i,xu.horizontal),a=this.keepXYWithinBounds(t,a,xu.vertical)),t.style.left=i+"px",t.style.top=a+"px"},t.prototype.getActivePopups=function(){return this.popupList.map((function(e){return e.element}))},t.prototype.getPopupList=function(){return this.popupList},t.prototype.getParentRect=function(){var e=this.gridOptionsWrapper.getDocument(),t=this.getPopupParent();t===e.body&&(t=e.documentElement);var n=getComputedStyle(t),r=t.getBoundingClientRect();return{top:r.top+parseFloat(n.borderTopWidth)||0,left:r.left+parseFloat(n.borderLeftWidth)||0,right:r.right+parseFloat(n.borderRightWidth)||0,bottom:r.bottom+parseFloat(n.borderBottomWidth)||0}},t.prototype.keepXYWithinBounds=function(e,t,n){var r=n===xu.vertical,o=r?"clientHeight":"clientWidth",i=r?"top":"left",a=r?"offsetHeight":"offsetWidth",s=r?"scrollTop":"scrollLeft",l=this.gridOptionsWrapper.getDocument(),c=l.documentElement,u=this.getPopupParent(),p=u.getBoundingClientRect(),d=l.documentElement.getBoundingClientRect(),h=u===l.body,f=e[a],g=h?(r?xn:Sn)(c)+c[s]:u[o];h&&(g-=Math.abs(d[i]-p[i]));var v=g-f;return Math.min(Math.max(t,0),Math.abs(v))},t.prototype.keepPopupPositionedRelativeTo=function(e){var t=this,n=this.getPopupParent(),r=n.getBoundingClientRect(),o=e.element.getBoundingClientRect(),i=r.top-o.top,a=r.left-o.left,s=i,l=a,c=e.ePopup.style.top,u=parseInt(c.substring(0,c.length-1),10),p=e.ePopup.style.left,d=parseInt(p.substring(0,p.length-1),10);return new $r((function(r){t.getFrameworkOverrides().setInterval((function(){var r=n.getBoundingClientRect(),o=e.element.getBoundingClientRect();if(0==o.top&&0==o.left&&0==o.height&&0==o.width)e.hidePopup();else{var c=r.top-o.top;if(c!=s){var p=t.keepXYWithinBounds(e.ePopup,u+i-c,xu.vertical);e.ePopup.style.top=p+"px"}s=c;var h=r.left-o.left;if(h!=l){var f=t.keepXYWithinBounds(e.ePopup,d+a-h,xu.horizontal);e.ePopup.style.left=f+"px"}l=h}}),200).then((function(e){r((function(){null!=e&&window.clearInterval(e)}))}))}))},t.prototype.addPopup=function(e){var t=this,n=e.modal,r=e.eChild,o=e.closeOnEsc,i=e.closedCallback,a=e.click,s=e.alwaysOnTop,l=e.afterGuiAttached,c=e.positionCallback,u=e.anchorToElement,p=e.ariaLabel,d=this.gridOptionsWrapper.getDocument(),h=new $r((function(e){return e((function(){}))}));if(!d)return console.warn("ag-grid: could not find the document, document is empty"),{hideFunc:function(){},stopAnchoringPromise:h};var f=_(this.popupList,(function(e){return e.element===r}));if(-1!==f){var g=this.popupList[f];return{hideFunc:g.hideFunc,stopAnchoringPromise:g.stopAnchoringPromise}}var v=this.getPopupParent();null==r.style.top&&(r.style.top="0px"),null==r.style.left&&(r.style.left="0px");var m=document.createElement("div"),y=this.environment.getTheme().theme;y&&un(m,y),un(m,"ag-popup"),un(r,this.gridOptionsWrapper.isEnableRtl()?"ag-rtl":"ag-ltr"),un(r,"ag-popup-child"),tr(r,"dialog"),or(r,p),this.focusService.isKeyboardMode()&&un(r,Iu.AG_KEYBOARD_FOCUS),m.appendChild(r),v.appendChild(m),s?this.setAlwaysOnTop(m,!0):this.bringPopupToFront(m);var b=!1,w=function(e){m.contains(document.activeElement)&&((e.which||e.keyCode)===mo.ESCAPE&&S({keyboardEvent:e}))},C=function(e){return S({mouseEvent:e})},x=function(e){return S({touchEvent:e})},S=function(e){void 0===e&&(e={});var n=e.mouseEvent,o=e.touchEvent,s=e.keyboardEvent;t.isEventFromCurrentPopup({mouseEvent:n,touchEvent:o},r)||t.isEventSameChainAsOriginalEvent({originalMouseEvent:a,mouseEvent:n,touchEvent:o})||b||(b=!0,v.removeChild(m),d.removeEventListener("keydown",w),d.removeEventListener("mousedown",C),d.removeEventListener("touchstart",x),d.removeEventListener("contextmenu",C),t.eventService.removeEventListener(Ke.EVENT_DRAG_STARTED,C),i&&i(n||o||s),t.popupList=t.popupList.filter((function(e){return e.element!==r})),h&&h.then((function(e){return e&&e()})))};return l&&l({hidePopup:S}),window.setTimeout((function(){o&&d.addEventListener("keydown",w),n&&(d.addEventListener("mousedown",C),t.eventService.addEventListener(Ke.EVENT_DRAG_STARTED,C),d.addEventListener("touchstart",x),d.addEventListener("contextmenu",C))}),0),c&&c(),u&&(h=this.keepPopupPositionedRelativeTo({element:u,ePopup:r,hidePopup:S})),this.popupList.push({element:r,wrapper:m,hideFunc:S,stopAnchoringPromise:h,instanceId:Hu++,isAnchored:!!u}),{hideFunc:S,stopAnchoringPromise:h}},t.prototype.hasAnchoredPopup=function(){return O(this.popupList,(function(e){return e.isAnchored}))},t.prototype.isEventFromCurrentPopup=function(e,t){var n=e.mouseEvent,r=e.touchEvent,o=n||r;if(!o)return!1;var i=_(this.popupList,(function(e){return e.element===t}));if(-1===i)return!1;for(var a=i;a<this.popupList.length;a++){if(Ge(this.popupList[a].element,o))return!0}return this.isElementWithinCustomPopup(o.target)},t.prototype.isElementWithinCustomPopup=function(e){for(;e&&e!==document.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1},t.prototype.isEventSameChainAsOriginalEvent=function(e){var t=e.originalMouseEvent,n=e.mouseEvent,r=e.touchEvent,o=null;if(n?o=n:r&&(o=r.touches[0]),o&&t){var i=n?n.screenX:0,a=n?n.screenY:0,s=Math.abs(t.screenX-i)<5,l=Math.abs(t.screenY-a)<5;if(s&&l)return!0}return!1},t.prototype.getWrapper=function(e){for(;!hn(e,"ag-popup")&&e.parentElement;)e=e.parentElement;return hn(e,"ag-popup")?e:null},t.prototype.setAlwaysOnTop=function(e,t){var n=this.getWrapper(e);n&&(dn(n,"ag-always-on-top",!!t),t&&this.bringPopupToFront(n))},t.prototype.bringPopupToFront=function(e){var t=this.getPopupParent(),n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),r=n.length,o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),i=o.length,a=this.getWrapper(e);if(a&&!(r<=1)&&t.contains(e)){var s=n.indexOf(a);if(i)hn(a,"ag-always-on-top")?s!==r-1&&v(o).insertAdjacentElement("afterend",a):s!==r-i-1&&o[0].insertAdjacentElement("beforebegin",a);else s!==r-1&&v(n).insertAdjacentElement("afterend",a);var l={type:"popupToFront",api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),eWrapper:a};this.eventService.dispatchEvent(l)}},Fu([de("environment")],t.prototype,"environment",void 0),Fu([de("focusService")],t.prototype,"focusService",void 0),Fu([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Fu([ce],t.prototype,"postConstruct",null),t=Fu([pe("popupService")],t)}(ze),Vu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ju=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Bu=function(e,t){return function(n,r){t(n,r,e)}},zu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vu(t,e),t.prototype.setBeans=function(e){this.logging=e.isDebug()},t.prototype.create=function(e){return new Uu(e,this.isLogging.bind(this))},t.prototype.isLogging=function(){return this.logging},ju([Bu(0,ge("gridOptionsWrapper"))],t.prototype,"setBeans",null),t=ju([pe("loggerFactory")],t)}(ze),Uu=function(){function e(e,t){this.name=e,this.isLoggingFunc=t}return e.prototype.isLogging=function(){return this.isLoggingFunc()},e.prototype.log=function(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)},e}(),Yu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xu=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},qu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yu(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.centerRowContainerCon=t.centerRowContainerCtrl}))},t.prototype.getPreferredWidthForColumn=function(e,t){var n=this.getHeaderCellForColumn(e);if(!n)return-1;var r=document.createElement("span");r.style.position="fixed";var o=this.centerRowContainerCon.getContainerElement();o.appendChild(r),this.putRowCellsIntoDummyContainer(e,r),t||this.cloneItemIntoDummy(n,r);var i=r.offsetWidth;return o.removeChild(r),i+this.gridOptionsWrapper.getAutoSizePadding()},t.prototype.getHeaderCellForColumn=function(e){var t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach((function(n){var r=n.getHtmlElementForColumnHeader(e);null!=r&&(t=r)})),t},t.prototype.putRowCellsIntoDummyContainer=function(e,t){var n=this;this.rowRenderer.getAllCellsForColumn(e).forEach((function(e){return n.cloneItemIntoDummy(e,t)}))},t.prototype.cloneItemIntoDummy=function(e,t){var n=e.cloneNode(!0);n.style.width="",n.style.position="static",n.style.left="";var r=document.createElement("div");hn(n,"ag-header-cell")?(un(r,"ag-header"),un(r,"ag-header-row"),r.style.position="static"):un(r,"ag-row");for(var o=e.parentElement;o;){if(o.classList.contains("ag-header-row")||o.classList.contains("ag-row")){for(var i=0;i<o.classList.length;i++){var a=o.classList[i];"ag-row-position-absolute"!=a&&un(r,a)}break}o=o.parentElement}r.style.display="table-row",r.appendChild(n),t.appendChild(r)},Xu([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Xu([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Xu([de("rowCssClassCalculator")],t.prototype,"rowCssClassCalculator",void 0),Xu([ce],t.prototype,"postConstruct",null),t=Xu([pe("autoWidthCalculator")],t)}(ze),Ku=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$u=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Qu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ku(t,e),t.prototype.addResizeBar=function(e){var t=this,n={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e)};this.dragService.addDragSource(n,!0);return function(){return t.dragService.removeDragSource(n)}},t.prototype.onDragStart=function(e,t){this.dragStartX=t.clientX,this.setResizeIcons();var n=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(n)},t.prototype.setResizeIcons=function(){var e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!0),e.disableUserSelect(!0)},t.prototype.onDragStop=function(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()},t.prototype.resetIcons=function(){var e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!1),e.disableUserSelect(!1)},t.prototype.onDragging=function(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)},$u([de("dragService")],t.prototype,"dragService",void 0),$u([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t=$u([pe("horizontalResizeService")],t)}(ze),Zu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ju=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ep=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Zu(n,e),n.prototype.postConstruct=function(){this.ctrlsService.registerGridCtrl(this)},n.prototype.setComp=function(e,t,n){var r=this;this.view=e,this.eGridHostDiv=t,this.eGui=n,this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new Ac(this.view)),this.addRtlSupport(),this.addManagedListener(this,Ke.EVENT_KEYBOARD_FOCUS,(function(){r.view.addOrRemoveKeyboardFocusClass(!0)})),this.addManagedListener(this,Ke.EVENT_MOUSE_FOCUS,(function(){r.view.addOrRemoveKeyboardFocusClass(!1)}));var o=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((function(){return o()}))},n.prototype.showDropZones=function(){return xe.isRegistered(t.ModuleNames.RowGroupingModule)},n.prototype.showSideBar=function(){return xe.isRegistered(t.ModuleNames.SideBarModule)},n.prototype.showStatusBar=function(){return xe.isRegistered(t.ModuleNames.StatusBarModule)},n.prototype.showWatermark=function(){return xe.isRegistered(t.ModuleNames.EnterpriseCoreModule)},n.prototype.onGridSizeChanged=function(){var e={type:Ke.EVENT_GRID_SIZE_CHANGED,api:this.gridApi,columnApi:this.columnApi,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)},n.prototype.addRtlSupport=function(){var e=this.gridOptionsWrapper.isEnableRtl()?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)},n.prototype.destroyGridUi=function(){this.view.destroyGridUi()},n.prototype.getGui=function(){return this.eGui},n.prototype.setResizeCursor=function(e){this.view.setCursor(e?"ew-resize":null)},n.prototype.disableUserSelect=function(e){this.view.setUserSelect(e?"none":null)},n.prototype.focusNextInnerContainer=function(e){var t=this.view.getFocusableContainers(),n=_(t,(function(e){return e.contains(document.activeElement)}))+(e?-1:1);return!(n<0||n>=t.length)&&(0===n?this.focusGridHeader():this.focusService.focusInto(t[n]))},n.prototype.focusInnerElement=function(e){var t=this.view.getFocusableContainers();if(e){if(t.length>1)return this.focusService.focusInto(v(t),!0);var n=v(this.columnModel.getAllDisplayedColumns());if(this.focusService.focusGridView(n,!0))return!0}return this.focusGridHeader()},n.prototype.focusGridHeader=function(){var e=this.columnModel.getAllDisplayedColumns()[0];return!!e&&(e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0)),this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:0,column:e}}),!0)},n.prototype.forceFocusOutOfContainer=function(e){void 0===e&&(e=!1),this.view.forceFocusOutOfContainer(e)},Ju([de("columnApi")],n.prototype,"columnApi",void 0),Ju([de("gridApi")],n.prototype,"gridApi",void 0),Ju([de("focusService")],n.prototype,"focusService",void 0),Ju([de("resizeObserverService")],n.prototype,"resizeObserverService",void 0),Ju([de("columnModel")],n.prototype,"columnModel",void 0),Ju([de("ctrlsService")],n.prototype,"ctrlsService",void 0),Ju([de("mouseEventService")],n.prototype,"mouseEventService",void 0),Ju([ce],n.prototype,"postConstruct",null),n}(ze),tp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),np=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},rp=function(e){function t(t){var n=e.call(this)||this;n.skipTabGuardFocus=!1;var r=t.comp,o=t.eTopGuard,i=t.eBottomGuard,a=t.focusInnerElement,s=t.onFocusIn,l=t.onFocusOut,c=t.shouldStopEventPropagation,u=t.onTabKeyDown,p=t.handleKeyDown,d=t.eFocusableElement;return n.comp=r,n.eTopGuard=o,n.eBottomGuard=i,n.providedFocusInnerElement=a,n.eFocusableElement=d,n.providedFocusIn=s,n.providedFocusOut=l,n.providedShouldStopEventPropagation=c,n.providedOnTabKeyDown=u,n.providedHandleKeyDown=p,n}return tp(t,e),t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new Co(this.eFocusableElement,{shouldStopEventPropagation:function(){return e.shouldStopEventPropagation()},onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)},onFocusIn:function(t){return e.onFocusIn(t)},onFocusOut:function(t){return e.onFocusOut(t)}})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach((function(t){return e.addManagedListener(t,"focus",e.onFocus.bind(e))}))},t.prototype.handleKeyDown=function(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)},t.prototype.tabGuardsAreActive=function(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")},t.prototype.shouldStopEventPropagation=function(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()},t.prototype.activateTabGuards=function(){this.comp.setTabIndex(this.getGridTabIndex())},t.prototype.deactivateTabGuards=function(){this.comp.setTabIndex()},t.prototype.onFocus=function(e){if(this.skipTabGuardFocus)this.skipTabGuardFocus=!1;else{var t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}},t.prototype.onFocusIn=function(e){this.providedFocusIn&&this.providedFocusIn(e)||this.deactivateTabGuards()},t.prototype.onFocusOut=function(e){this.providedFocusOut&&this.providedFocusOut(e)||this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards()},t.prototype.onTabKeyDown=function(e){var t=this;if(this.providedOnTabKeyDown)this.providedOnTabKeyDown(e);else if(!e.defaultPrevented){var n=this.tabGuardsAreActive();n&&this.deactivateTabGuards();var r=this.getNextFocusableElement(e.shiftKey);n&&setTimeout((function(){return t.activateTabGuards()}),0),r&&(r.focus(),e.preventDefault())}},t.prototype.getGridTabIndex=function(){return this.gridOptionsWrapper.getGridTabIndex()},t.prototype.focusInnerElement=function(e){void 0===e&&(e=!1);var t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus()},t.prototype.getNextFocusableElement=function(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)},t.prototype.forceFocusOutOfContainer=function(e){void 0===e&&(e=!1);var t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,t.focus()},np([de("focusService")],t.prototype,"focusService",void 0),np([ce],t.prototype,"postConstruct",null),t}(ze),op=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ip=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return op(t,e),t.prototype.initialiseTabGuard=function(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();var t=[this.eTopGuard,this.eBottomGuard],n={setTabIndex:function(e){t.forEach((function(t){return null!=e?t.setAttribute("tabIndex",e):t.removeAttribute("tabIndex")}))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new rp({comp:n,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation}))},t.prototype.createTabGuard=function(e){var t=document.createElement("div");return t.classList.add("ag-tab-guard"),t.classList.add("ag-tab-guard-"+e),tr(t,"presentation"),t},t.prototype.addTabGuards=function(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)},t.prototype.removeAllChildrenExceptTabGuards=function(){var e=[this.eTopGuard,this.eBottomGuard];On(this.getFocusableElement()),this.addTabGuards.apply(this,e)},t.prototype.forceFocusOutOfContainer=function(e){void 0===e&&(e=!1),this.tabGuardCtrl.forceFocusOutOfContainer(e)},t.prototype.appendChild=function(t,n){Un(t)||(t=t.getGui());var r=this.eBottomGuard;r?r.insertAdjacentElement("beforebegin",t):e.prototype.appendChild.call(this,t,n)},t}(io),ap=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},lp=function(e){function n(t){var n=e.call(this,void 0)||this;return n.eGridDiv=t,n}return ap(n,e),n.prototype.postConstruct=function(){var e=this;this.logger=this.loggerFactory.create("GridComp");var t={destroyGridUi:function(){return e.destroyBean(e)},setRtlClass:function(t){return un(e.getGui(),t)},addOrRemoveKeyboardFocusClass:function(t){return e.addOrRemoveCssClass(Iu.AG_KEYBOARD_FOCUS,t)},forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:function(t){e.getGui().style.userSelect=null!=t?t:"",e.getGui().style.webkitUserSelect=null!=t?t:""},setCursor:function(t){e.getGui().style.cursor=null!=t?t:""}};this.ctrl=this.createManagedBean(new ep);var n=this.createTemplate();this.setTemplate(n),this.ctrl.setComp(t,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:function(){},focusInnerElement:function(t){return e.ctrl.focusInnerElement(t)}})},n.prototype.insertGridIntoDom=function(){var e=this,t=this.getGui();this.eGridDiv.appendChild(t),this.addDestroyFunc((function(){e.eGridDiv.removeChild(t),e.logger.log("Grid removed from DOM")}))},n.prototype.updateLayoutClasses=function(e,n){dn(this.eRootWrapperBody,t.LayoutCssClasses.AUTO_HEIGHT,n.autoHeight),dn(this.eRootWrapperBody,t.LayoutCssClasses.NORMAL,n.normal),dn(this.eRootWrapperBody,t.LayoutCssClasses.PRINT,n.print),this.addOrRemoveCssClass(t.LayoutCssClasses.AUTO_HEIGHT,n.autoHeight),this.addOrRemoveCssClass(t.LayoutCssClasses.NORMAL,n.normal),this.addOrRemoveCssClass(t.LayoutCssClasses.PRINT,n.print)},n.prototype.createTemplate=function(){return'<div class="ag-root-wrapper">\n '+(this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"")+'\n <div class="ag-root-wrapper-body" ref="rootWrapperBody">\n <ag-grid-body ref="gridBody"></ag-grid-body>\n '+(this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"")+"\n </div>\n "+(this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"")+"\n <ag-pagination></ag-pagination>\n "+(this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"")+"\n </div>"},n.prototype.getFocusableElement=function(){return this.eRootWrapperBody},n.prototype.getFocusableContainers=function(){var e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter((function(e){return Pn(e)}))},sp([de("loggerFactory")],n.prototype,"loggerFactory",void 0),sp([ao("gridBody")],n.prototype,"gridBodyComp",void 0),sp([ao("sideBar")],n.prototype,"sideBarComp",void 0),sp([ao("rootWrapperBody")],n.prototype,"eRootWrapperBody",void 0),sp([ce],n.prototype,"postConstruct",null),n}(ip),cp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),up=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},pp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dragEndFunctions=[],t.dragSources=[],t}return cp(t,e),t.prototype.init=function(){this.logger=this.loggerFactory.create("DragService")},t.prototype.removeAllListeners=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},t.prototype.removeListener=function(e){var t=e.dragSource.eElement,n=e.mouseDownListener;if(t.removeEventListener("mousedown",n),e.touchEnabled){var r=e.touchStartListener;t.removeEventListener("touchstart",r,{passive:!0})}},t.prototype.removeDragSource=function(e){var t=p(this.dragSources,(function(t){return t.dragSource===e}));t&&(this.removeListener(t),b(this.dragSources,t))},t.prototype.isDragging=function(){return this.dragging},t.prototype.addDragSource=function(e,t){var n=this;void 0===t&&(t=!1);var r=this.onMouseDown.bind(this,e);e.eElement.addEventListener("mousedown",r);var o=null,i=this.gridOptionsWrapper.isSuppressTouch();t&&!i&&(o=function(t){t.preventDefault(),n.onTouchStart(e,t)},e.eElement.addEventListener("touchstart",o,{passive:!0})),this.dragSources.push({dragSource:e,mouseDownListener:r,touchStartListener:o,touchEnabled:t})},t.prototype.onTouchStart=function(e,t){var n=this;this.currentDragParams=e,this.dragging=!1;var r=t.touches[0];this.touchLastTime=r,this.touchStart=r;var o=function(t){return n.onTouchUp(t,e.eElement)},i=e.eElement,a=[{target:document,type:"touchmove",listener:function(e){e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:i,type:"touchmove",listener:function(t){return n.onTouchMove(t,e.eElement)},options:{passive:!0}},{target:i,type:"touchend",listener:o,options:{passive:!0}},{target:i,type:"touchcancel",listener:o,options:{passive:!0}}];this.addTemporaryEvents(a),0===e.dragStartPixels&&this.onCommonMove(r,this.touchStart,e.eElement)},t.prototype.onMouseDown=function(e,t){var n=this,r=t;if((!e.skipMouseEvent||!e.skipMouseEvent(t))&&!r._alreadyProcessedByDragService&&(r._alreadyProcessedByDragService=!0,0===t.button)){this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t;var o=this.gridOptionsWrapper.getDocument(),i=[{target:o,type:"mousemove",listener:function(t){return n.onMouseMove(t,e.eElement)}},{target:o,type:"mouseup",listener:function(t){return n.onMouseUp(t,e.eElement)}},{target:o,type:"contextmenu",listener:function(e){return e.preventDefault()}}];this.addTemporaryEvents(i),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}},t.prototype.addTemporaryEvents=function(e){e.forEach((function(e){var t=e.target,n=e.type,r=e.listener,o=e.options;t.addEventListener(n,r,o)})),this.dragEndFunctions.push((function(){e.forEach((function(e){var t=e.target,n=e.type,r=e.listener,o=e.options;t.removeEventListener(n,r,o)}))}))},t.prototype.isEventNearStartEvent=function(e,t){var n=this.currentDragParams.dragStartPixels;return Wr(e,t,o(n)?n:4)},t.prototype.getFirstActiveTouch=function(e){for(var t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null},t.prototype.onCommonMove=function(e,t,n){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;var r={type:Ke.EVENT_DRAG_STARTED,api:this.gridApi,columnApi:this.columnApi,target:n};this.eventService.dispatchEvent(r),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)},t.prototype.onTouchMove=function(e,t){var n=this.getFirstActiveTouch(e.touches);n&&this.onCommonMove(n,this.touchStart,t)},t.prototype.onMouseMove=function(e,t){this.onCommonMove(e,this.mouseStartEvent,t)},t.prototype.onTouchUp=function(e,t){var n=this.getFirstActiveTouch(e.changedTouches);n||(n=this.touchLastTime),this.onUpCommon(n,t)},t.prototype.onMouseUp=function(e,t){this.onUpCommon(e,t)},t.prototype.onUpCommon=function(e,t){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);var n={type:Ke.EVENT_DRAG_STOPPED,api:this.gridApi,columnApi:this.columnApi,target:t};this.eventService.dispatchEvent(n)}this.mouseStartEvent=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach((function(e){return e()})),this.dragEndFunctions.length=0},up([de("loggerFactory")],t.prototype,"loggerFactory",void 0),up([de("columnApi")],t.prototype,"columnApi",void 0),up([de("gridApi")],t.prototype,"gridApi",void 0),up([ce],t.prototype,"init",null),up([ue],t.prototype,"removeAllListeners",null),t=up([pe("dragService")],t)}(ze),dp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},fp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return dp(t,e),n=t,t.prototype.progressSort=function(e,t,n){void 0===n&&(n="api");var r=this.getNextSortDirection(e);this.setSortForColumn(e,r,t,n)},t.prototype.setSortForColumn=function(e,t,n,r){void 0===r&&(r="api"),t!==Ce.SORT_ASC&&t!==Ce.SORT_DESC&&(t=null),e.setSort(t,r),n&&!this.gridOptionsWrapper.isSuppressMultiSort()||this.clearSortBarThisColumn(e,r),this.updateSortIndex(e),this.dispatchSortChangedEvents()},t.prototype.updateSortIndex=function(e){var t=this.getColumnsWithSortingOrdered(),n=0;t.forEach((function(t){t!==e&&(t.setSortIndex(n),n++)})),e.getSort()&&e.setSortIndex(n),this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter((function(e){return null==e.getSort()})).forEach((function(e){return e.setSortIndex()}))},t.prototype.onSortChanged=function(){this.dispatchSortChangedEvents()},t.prototype.isSortActive=function(){var e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter((function(e){return!!e.getSort()}));return e&&e.length>0},t.prototype.dispatchSortChangedEvents=function(){var e={type:Ke.EVENT_SORT_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},t.prototype.clearSortBarThisColumn=function(e,t){this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((function(n){n!==e&&n.setSort(void 0,t)}))},t.prototype.getNextSortDirection=function(e){var t;if(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gridOptionsWrapper.getSortingOrder()?this.gridOptionsWrapper.getSortingOrder():n.DEFAULT_SORTING_ORDER,!Array.isArray(t)||t.length<=0)return console.warn("ag-grid: sortingOrder must be an array with at least one element, currently it's "+t),null;var r,o=t.indexOf(e.getSort()),i=o<0,a=o==t.length-1;return r=i||a?t[0]:t[o+1],n.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("ag-grid: invalid sort type "+r),null):r},t.prototype.getColumnsWithSortingOrdered=function(){var e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns(),t=e.filter((function(e){return!!e.getSort()})),n={};return e.forEach((function(e,t){return n[e.getId()]=t})),t.sort((function(e,t){var r=e.getSortIndex(),o=t.getSortIndex();return null!=r&&null!=o?r-o:null==r&&null==o?n[e.getId()]>n[t.getId()]?1:-1:null==o?-1:1})),t},t.prototype.getSortModel=function(){return this.getColumnsWithSortingOrdered().map((function(e){return{sort:e.getSort(),colId:e.getId()}}))},t.prototype.getSortOptions=function(){return this.getColumnsWithSortingOrdered().map((function(e){return{sort:e.getSort(),column:e}}))},t.DEFAULT_SORTING_ORDER=[Ce.SORT_ASC,Ce.SORT_DESC,null],hp([de("columnModel")],t.prototype,"columnModel",void 0),hp([de("columnApi")],t.prototype,"columnApi",void 0),hp([de("gridApi")],t.prototype,"gridApi",void 0),t=n=hp([pe("sortController")],t)}(ze),gp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},mp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.gridInstanceId=n.gridInstanceSequence.next(),t}var n;return gp(t,e),n=t,t.prototype.stampTopLevelGridCompWithGridInstance=function(e){e[n.GRID_DOM_KEY]=this.gridInstanceId},t.prototype.getRenderedCellForEvent=function(e){return Le(this.gridOptionsWrapper,e,Ts.DOM_DATA_KEY_CELL_CTRL)},t.prototype.isEventFromThisGrid=function(e){return this.isElementInThisGrid(e.target)},t.prototype.isElementInThisGrid=function(e){for(var t=e;t;){var r=t[n.GRID_DOM_KEY];if(o(r))return r===this.gridInstanceId;t=t.parentElement}return!1},t.prototype.getCellPositionForEvent=function(e){var t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null},t.prototype.getNormalisedPosition=function(e){var t,n,r=this.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_NORMAL,o=e;if(null!=o.clientX||null!=o.clientY?(t=o.clientX,n=o.clientY):(t=o.x,n=o.y),r){var i=this.ctrlsService.getGridBodyCtrl(),a=i.getScrollFeature().getVScrollPosition();t+=i.getScrollFeature().getHScrollPosition().left,n+=a.top}return{x:t,y:n}},t.gridInstanceSequence=new qr,t.GRID_DOM_KEY="__ag_grid_instance",vp([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t=n=vp([pe("mouseEventService")],t)}(ze),yp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},wp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yp(t,e),t.prototype.getNextCellToFocus=function(e,t){for(var n=t,r=!1;!r;){switch(e){case mo.UP:n=this.getCellAbove(n);break;case mo.DOWN:n=this.getCellBelow(n);break;case mo.RIGHT:n=this.gridOptionsWrapper.isEnableRtl()?this.getCellToLeft(n):this.getCellToRight(n);break;case mo.LEFT:n=this.gridOptionsWrapper.isEnableRtl()?this.getCellToRight(n):this.getCellToLeft(n);break;default:n=null,console.warn("AG Grid: unknown key for navigation "+e)}r=!n||this.isCellGoodToFocusOn(n)}return n},t.prototype.isCellGoodToFocusOn=function(e){var t,n=e.column;switch(e.rowPinned){case Ce.PINNED_TOP:t=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case Ce.PINNED_BOTTOM:t=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:t=this.rowModel.getRow(e.rowIndex)}return!!t&&!n.isSuppressNavigable(t)},t.prototype.getCellToLeft=function(e){if(!e)return null;var t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null},t.prototype.getCellToRight=function(e){if(!e)return null;var t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null},t.prototype.getRowBelow=function(e){var t=e.rowIndex,n=e.rowPinned;if(this.isLastRowInContainer(e))switch(n){case Ce.PINNED_BOTTOM:return null;case Ce.PINNED_TOP:return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender(Ce.PINNED_BOTTOM)?{rowIndex:0,rowPinned:Ce.PINNED_BOTTOM}:null;default:return this.pinnedRowModel.isRowsToRender(Ce.PINNED_BOTTOM)?{rowIndex:0,rowPinned:Ce.PINNED_BOTTOM}:null}return{rowIndex:t+1,rowPinned:n}},t.prototype.getCellBelow=function(e){if(!e)return null;var t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null},t.prototype.isLastRowInContainer=function(e){var t=e.rowPinned,n=e.rowIndex;return t===Ce.PINNED_TOP?this.pinnedRowModel.getPinnedTopRowData().length-1<=n:t===Ce.PINNED_BOTTOM?this.pinnedRowModel.getPinnedBottomRowData().length-1<=n:this.paginationProxy.getPageLastRow()<=n},t.prototype.getRowAbove=function(e){var t=e.rowIndex,n=e.rowPinned;return(n?0===t:t===this.paginationProxy.getPageFirstRow())?n===Ce.PINNED_TOP?null:n&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender(Ce.PINNED_TOP)?this.getLastFloatingTopRow():null:{rowIndex:t-1,rowPinned:n}},t.prototype.getCellAbove=function(e){if(!e)return null;var t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null},t.prototype.getLastBodyCell=function(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null}},t.prototype.getLastFloatingTopRow=function(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:Ce.PINNED_TOP}},t.prototype.getNextTabbedCell=function(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)},t.prototype.getNextTabbedCellForwards=function(e){var t=this.columnModel.getAllDisplayedColumns(),n=e.rowIndex,r=e.rowPinned,o=this.columnModel.getDisplayedColAfter(e.column);if(!o){o=t[0];var a=this.getRowBelow(e);if(i(a))return null;if(!a.rowPinned&&!this.paginationProxy.isRowInPage(a))return null;n=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:n,column:o,rowPinned:r}},t.prototype.getNextTabbedCellBackwards=function(e){var t=this.columnModel.getAllDisplayedColumns(),n=e.rowIndex,r=e.rowPinned,o=this.columnModel.getDisplayedColBefore(e.column);if(!o){o=v(t);var a=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(i(a))return null;if(!a.rowPinned&&!this.paginationProxy.isRowInPage(a))return null;n=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:n,column:o,rowPinned:r}},bp([de("columnModel")],t.prototype,"columnModel",void 0),bp([de("rowModel")],t.prototype,"rowModel",void 0),bp([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),bp([de("paginationProxy")],t.prototype,"paginationProxy",void 0),t=bp([pe("cellNavigationService")],t)}(ze),Cp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Sp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Cp(t,e),t.prototype.formatValue=function(e,t,n,r,o,i){void 0===i&&(i=!0);var a,s=null,l=e.getColDef();if(o?a=o:i&&(a=t&&t.rowPinned&&l.pinnedRowValueFormatter?l.pinnedRowValueFormatter:l.valueFormatter),a){var c={value:r,node:t,data:t?t.data:null,colDef:l,column:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};c.$scope=n,s=this.expressionService.evaluate(a,c)}else if(l.refData)return l.refData[r]||"";return null==s&&Array.isArray(r)&&(s=r.join(", ")),s},xp([de("expressionService")],t.prototype,"expressionService",void 0),t=xp([pe("valueFormatterService")],t)}(ze),Ep=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_p=function(e){function t(t){return e.call(this,t,"ag-radio-button","radio")||this}return Ep(t,e),t.prototype.isSelected=function(){return this.eInput.checked},t.prototype.toggle=function(){this.eInput.disabled||this.isSelected()||this.setValue(!0)},t.prototype.addInputListeners=function(){e.prototype.addInputListeners.call(this),this.addManagedListener(this.eventService,Ke.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))},t.prototype.onChange=function(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)},t}(jl),Rp=["mouseover","mouseout","mouseenter","mouseleave"],Op=function(){function e(){this.isOutsideAngular=function(e){return S(Rp,e)}}return e.prototype.setTimeout=function(e,t){window.setTimeout(e,t)},e.prototype.setInterval=function(e,t){return new $r((function(n){n(window.setInterval(e,t))}))},e.prototype.addEventListener=function(e,t,n,r){e.addEventListener(t,n,r)},e.prototype.dispatchEvent=function(e,t,n){t()},e.prototype.frameworkComponent=function(e){return null},e}(),Ap=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Tp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))},t.prototype.onDisplayedColumnsChanged=function(){this.update()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.update()},t.prototype.update=function(){this.updateImpl(),setTimeout(this.updateImpl.bind(this),500)},t.prototype.updateImpl=function(){var e=this.ctrlsService.getCenterRowContainerCtrl();if(e){var t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}},t.prototype.setScrollsVisible=function(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var t={type:Ke.EVENT_SCROLL_VISIBILITY_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}},t.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},t.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},Pp([de("columnApi")],t.prototype,"columnApi",void 0),Pp([de("gridApi")],t.prototype,"gridApi",void 0),Pp([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Pp([ce],t.prototype,"postConstruct",null),t=Pp([pe("scrollVisibleService")],t)}(ze),Dp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Np=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dp(t,e),t.prototype.processAllCellClasses=function(e,t,n,r){this.processClassRules(e.cellClassRules,t,n,r),this.processStaticCellClasses(e,t,n)},t.prototype.processClassRules=function(e,t,n,r){if(null!=e)for(var o=Object.keys(e),i={},a={},s=function(s){var c,u=o[s],p=e[u];"string"===typeof p?c=l.expressionService.evaluate(p,t):"function"===typeof p&&(c=p(t)),u.split(" ").forEach((function(e){null!=e&&""!=e.trim()&&(c?i[e]=!0:a[e]=!0)})),r&&Object.keys(a).forEach(r),Object.keys(i).forEach(n)},l=this,c=0;c<o.length;c++)s(c)},t.prototype.getStaticCellClasses=function(e,t){var n,r=e.cellClass;if(!r)return[];"function"===typeof r?n=(0,e.cellClass)(t):n=r;return"string"===typeof n&&(n=[n]),n},t.prototype.processStaticCellClasses=function(e,t,n){this.getStaticCellClasses(e,t).forEach((function(e){n(e)}))},kp([de("expressionService")],t.prototype,"expressionService",void 0),t=kp([pe("stylingService")],t)}(ze),Mp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ip=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Lp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mp(t,e),t.prototype.setMouseOver=function(e){this.selectedColumns=e;var t={type:Ke.EVENT_COLUMN_HOVER_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.clearMouseOver=function(){this.selectedColumns=null;var e={type:Ke.EVENT_COLUMN_HOVER_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},t.prototype.isHovered=function(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0},Ip([de("columnApi")],t.prototype,"columnApi",void 0),Ip([de("gridApi")],t.prototype,"gridApi",void 0),t=Ip([pe("columnHoverService")],t)}(ze),Fp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Hp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.executeNextFuncs=[],t.executeLaterFuncs=[],t.active=!1,t.animationThreadCount=0,t}return Fp(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){return e.gridBodyCtrl=t.gridBodyCtrl}))},t.prototype.isActive=function(){return this.active},t.prototype.start=function(){this.active||this.gridOptionsWrapper.isSuppressColumnMoveAnimation()||this.gridOptionsWrapper.isEnableRtl()||(this.ensureAnimationCssClassPresent(),this.active=!0)},t.prototype.finish=function(){this.active&&(this.flush(),this.active=!1)},t.prototype.executeNextVMTurn=function(e){this.active?this.executeNextFuncs.push(e):e()},t.prototype.executeLaterVMTurn=function(e){this.active?this.executeLaterFuncs.push(e):e()},t.prototype.ensureAnimationCssClassPresent=function(){var e=this;this.animationThreadCount++;var t=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push((function(){e.animationThreadCount===t&&e.gridBodyCtrl.setColumnMovingCss(!1)}))},t.prototype.flush=function(){var e=this.executeNextFuncs;this.executeNextFuncs=[];var t=this.executeLaterFuncs;this.executeLaterFuncs=[],0===e.length&&0===t.length||(window.setTimeout((function(){return e.forEach((function(e){return e()}))}),0),window.setTimeout((function(){return t.forEach((function(e){return e()}))}),300))},Gp([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Gp([ce],t.prototype,"postConstruct",null),t=Gp([pe("columnAnimationService")],t)}(ze),Wp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},jp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return Wp(t,e),n=t,t.prototype.createAutoGroupColumns=function(e){var t=this,n=[],r=this.gridOptionsWrapper.isTreeData(),o=this.gridOptionsWrapper.isGroupMultiAutoColumn();return r&&o&&(console.warn("AG Grid: you cannot mix groupMultiAutoColumn with treeData, only one column can be used to display groups when doing tree data"),o=!1),o?e.forEach((function(e,r){n.push(t.createOneAutoGroupColumn(e,r))})):n.push(this.createOneAutoGroupColumn()),n},t.prototype.createOneAutoGroupColumn=function(e,t){var r,o=this.generateDefaultColDef(e);(r=e?Ce.GROUP_AUTO_COLUMN_ID+"-"+e.getId():n.GROUP_AUTO_COLUMN_BUNDLE_ID,W(o,this.gridOptionsWrapper.getAutoGroupColumnDef()),(o=this.columnFactory.mergeColDefs(o)).colId=r,this.gridOptionsWrapper.isTreeData())||i(o.field)&&i(o.valueGetter)&&i(o.filterValueGetter)&&(o.filter=!1);t&&t>0&&(o.headerCheckboxSelection=!1);var a=new _e(o,null,r,!0);return this.context.createBean(a),a},t.prototype.generateDefaultColDef=function(e){var t=this.gridOptionsWrapper.getAutoGroupColumnDef(),n={headerName:this.gridOptionsWrapper.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererFramework||t.cellRendererSelector)||(n.cellRenderer="agGroupCellRenderer"),e){var r=e.getColDef();V(n,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:r.headerValueGetter}),r.cellRenderer&&V(n,{cellRendererParams:{innerRenderer:r.cellRenderer,innerRendererParams:r.cellRendererParams}}),n.showRowGroup=e.getColId()}else n.showRowGroup=!0;return n},t.GROUP_AUTO_COLUMN_BUNDLE_ID=Ce.GROUP_AUTO_COLUMN_ID,Vp([de("columnModel")],t.prototype,"columnModel",void 0),Vp([de("columnFactory")],t.prototype,"columnFactory",void 0),t=n=Vp([pe("autoGroupColService")],t)}(ze),Bp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Up=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentPage=0,t.topDisplayedRowIndex=0,t.bottomDisplayedRowIndex=0,t.pixelOffset=0,t.masterRowCount=0,t}return Bp(t,e),t.prototype.postConstruct=function(){this.active=this.gridOptionsWrapper.isPagination(),this.paginateChildRows=this.gridOptionsWrapper.isPaginateChildRows(),this.addManagedListener(this.eventService,Ke.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(this.gridOptionsWrapper,"paginationPageSize",this.onPaginationPageSizeChanged.bind(this)),this.onModelUpdated()},t.prototype.ensureRowHeightsValid=function(e,t,n,r){var o=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return o&&this.calculatePages(),o},t.prototype.onModelUpdated=function(e){this.calculatePages();var t={type:Ke.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,keepRenderedRows:!!e&&e.keepRenderedRows,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.onPaginationPageSizeChanged=function(){this.calculatePages();var e={type:Ke.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,keepRenderedRows:!0,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},t.prototype.goToPage=function(e){if(this.active&&this.currentPage!==e){this.currentPage=e;var t={type:Ke.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!0,api:this.gridApi,columnApi:this.columnApi};this.onModelUpdated(t)}},t.prototype.getPixelOffset=function(){return this.pixelOffset},t.prototype.getRow=function(e){return this.rowModel.getRow(e)},t.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},t.prototype.getRowIndexAtPixel=function(e){return this.rowModel.getRowIndexAtPixel(e)},t.prototype.getCurrentPageHeight=function(){return i(this.topRowBounds)||i(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)},t.prototype.getCurrentPagePixelRange=function(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}},t.prototype.isRowPresent=function(e){return!!this.rowModel.isRowPresent(e)&&(e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex)},t.prototype.isEmpty=function(){return this.rowModel.isEmpty()},t.prototype.isRowsToRender=function(){return this.rowModel.isRowsToRender()},t.prototype.getNodesInRangeForSelection=function(e,t){return this.rowModel.getNodesInRangeForSelection(e,t)},t.prototype.forEachNode=function(e){return this.rowModel.forEachNode(e)},t.prototype.getType=function(){return this.rowModel.getType()},t.prototype.getRowBounds=function(e){var t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t},t.prototype.getPageFirstRow=function(){return this.topRowBounds?this.topRowBounds.rowIndex:-1},t.prototype.getPageLastRow=function(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1},t.prototype.getRowCount=function(){return this.rowModel.getRowCount()},t.prototype.getPageForIndex=function(e){return Math.floor(e/this.pageSize)},t.prototype.goToPageWithIndex=function(e){if(this.active){var t=this.getPageForIndex(e);this.goToPage(t)}},t.prototype.isRowInPage=function(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage},t.prototype.isLastPageFound=function(){return this.rowModel.isLastRowIndexKnown()},t.prototype.getCurrentPage=function(){return this.currentPage},t.prototype.goToNextPage=function(){this.goToPage(this.currentPage+1)},t.prototype.goToPreviousPage=function(){this.goToPage(this.currentPage-1)},t.prototype.goToFirstPage=function(){this.goToPage(0)},t.prototype.goToLastPage=function(){var e=this.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)},t.prototype.getPageSize=function(){return this.pageSize},t.prototype.getTotalPages=function(){return this.totalPages},t.prototype.setPageSize=function(){this.pageSize=this.gridOptionsWrapper.getPaginationPageSize(),(null==this.pageSize||this.pageSize<1)&&(this.pageSize=100)},t.prototype.calculatePages=function(){this.active?(this.setPageSize(),this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly()):this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(o(this.topRowBounds)?this.topRowBounds.rowTop:0)},t.prototype.setPixelOffset=function(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:Ke.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))},t.prototype.setZeroRows=function(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0},t.prototype.calculatePagesMasterRowsOnly=function(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)this.setZeroRows();else{var e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!mt(this.currentPage)||this.currentPage<0)&&(this.currentPage=0);var t=this.pageSize*this.currentPage,n=this.pageSize*(this.currentPage+1)-1;if(n>e&&(n=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),n===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{var r=this.rowModel.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=r-1}}},t.prototype.getMasterRowCount=function(){return this.masterRowCount},t.prototype.calculatePagesAllRows=function(){if(this.masterRowCount=this.rowModel.getRowCount(),0!==this.masterRowCount){var e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!mt(this.currentPage)||this.currentPage<0)&&(this.currentPage=0),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}else this.setZeroRows()},t.prototype.calculatedPagesNotActive=function(){this.pageSize=this.rowModel.getRowCount(),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1},zp([de("rowModel")],t.prototype,"rowModel",void 0),zp([de("columnApi")],t.prototype,"columnApi",void 0),zp([de("gridApi")],t.prototype,"gridApi",void 0),zp([ce],t.prototype,"postConstruct",null),t=zp([pe("paginationProxy")],t)}(ze),Yp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},qp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yp(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.centerRowContainerCon=t.centerRowContainerCtrl,e.addManagedListener(e.eventService,Ke.EVENT_BODY_HEIGHT_CHANGED,e.onBodyHeightChanged.bind(e)),e.addManagedListener(e.eventService,Ke.EVENT_SCROLL_VISIBILITY_CHANGED,e.onScrollVisibilityChanged.bind(e)),e.checkPageSize()}))},t.prototype.notActive=function(){return!this.gridOptionsWrapper.isPaginationAutoPageSize()},t.prototype.onScrollVisibilityChanged=function(){this.checkPageSize()},t.prototype.onBodyHeightChanged=function(){this.checkPageSize()},t.prototype.checkPageSize=function(){if(!this.notActive()){var e=this.gridOptionsWrapper.getRowHeightAsNumber(),t=this.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();if(t>0){var n=Math.floor(t/e);this.gridOptionsWrapper.setProperty("paginationPageSize",n)}}},Xp([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Xp([ce],t.prototype,"postConstruct",null),t=Xp([pe("paginationAutoPageSizeService")],t)}(ze),Kp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$p=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Qp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cacheVersion=0,t}return Kp(t,e),t.prototype.init=function(){this.active=this.gridOptionsWrapper.isValueCache(),this.neverExpires=this.gridOptionsWrapper.isValueCacheNeverExpires()},t.prototype.onDataChanged=function(){this.neverExpires||this.expire()},t.prototype.expire=function(){this.cacheVersion++},t.prototype.setValue=function(e,t,n){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=n)},t.prototype.getValue=function(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]},$p([ce],t.prototype,"init",null),t=$p([pe("valueCache")],t)}(ze),Zp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jp=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ed=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zp(t,e),t.prototype.init=function(){this.rowModel.getType()===Ce.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,Ke.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))},t.prototype.onCellValueChanged=function(e){e.source!==Ce.SOURCE_PASTE&&this.doChangeDetection(e.node,e.column)},t.prototype.doChangeDetection=function(e,t){if(!this.gridOptionsWrapper.isSuppressChangeDetection()){if(this.clientSideRowModel&&!e.isRowPinned()){var n=this.gridOptionsWrapper.isAggregateOnlyChangedColumns(),r=new ts(n,this.clientSideRowModel.getRootNode());r.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(r)}this.rowRenderer.refreshCells()}},Jp([de("rowModel")],t.prototype,"rowModel",void 0),Jp([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Jp([ce],t.prototype,"init",null),t=Jp([pe("changeDetectionService")],t)}(ze),td=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},rd=function(e,t){return function(n,r){t(n,r,e)}},od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.consuming=!1,t}return td(t,e),t.prototype.setBeans=function(e){this.logger=e.create("AlignedGridsService")},t.prototype.init=function(){this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))},t.prototype.fireEvent=function(e){if(!this.consuming){var t=this.gridOptionsWrapper.getAlignedGrids();t&&t.forEach((function(t){if(t.api){var n=t.api.__getAlignedGridService();e(n)}}))}},t.prototype.onEvent=function(e){this.consuming=!0,e(),this.consuming=!1},t.prototype.fireColumnEvent=function(e){this.fireEvent((function(t){t.onColumnEvent(e)}))},t.prototype.fireScrollEvent=function(e){"horizontal"===e.direction&&this.fireEvent((function(t){t.onScrollEvent(e)}))},t.prototype.onScrollEvent=function(e){var t=this;this.onEvent((function(){t.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left)}))},t.prototype.getMasterColumns=function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e)})):e.column&&t.push(e.column),t},t.prototype.getColumnIds=function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e.getColId())})):e.column&&t.push(e.column.getColId()),t},t.prototype.onColumnEvent=function(e){var t=this;this.onEvent((function(){switch(e.type){case Ke.EVENT_COLUMN_MOVED:case Ke.EVENT_COLUMN_VISIBLE:case Ke.EVENT_COLUMN_PINNED:case Ke.EVENT_COLUMN_RESIZED:var n=e;t.processColumnEvent(n);break;case Ke.EVENT_COLUMN_GROUP_OPENED:var r=e;t.processGroupOpenedEvent(r);break;case Ke.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.")}}))},t.prototype.processGroupOpenedEvent=function(e){var t=e.columnGroup,n=null;if(t){var r=t.getGroupId();n=this.columnModel.getOriginalColumnGroup(r)}t&&!n||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+t.isExpanded()),this.columnModel.setColumnGroupOpened(n,t.isExpanded(),"alignedGridChanged"))},t.prototype.processColumnEvent=function(e){var t=this,n=e.column,r=null;if(n&&(r=this.columnModel.getPrimaryColumn(n.getColId())),!n||r){var o=this.getMasterColumns(e);switch(e.type){case Ke.EVENT_COLUMN_MOVED:var i=e,a=e.columnApi.getColumnState().map((function(e){return{colId:e.colId}}));this.columnModel.applyColumnState({state:a,applyOrder:!0},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing "+e.type+" toIndex = "+i.toIndex);break;case Ke.EVENT_COLUMN_VISIBLE:var s=e;a=e.columnApi.getColumnState().map((function(e){return{colId:e.colId,hide:e.hide}}));this.columnModel.applyColumnState({state:a},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing "+e.type+" visible = "+s.visible);break;case Ke.EVENT_COLUMN_PINNED:var l=e;a=e.columnApi.getColumnState().map((function(e){return{colId:e.colId,pinned:e.pinned}}));this.columnModel.applyColumnState({state:a},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing "+e.type+" pinned = "+l.pinned);break;case Ke.EVENT_COLUMN_RESIZED:var c=e;o.forEach((function(n){t.logger.log("onColumnEvent-> processing "+e.type+" actualWidth = "+n.getActualWidth());var r=[{key:n.getColId(),newWidth:n.getActualWidth()}];t.columnModel.setColumnWidths(r,!1,c.finished,"alignedGridChanged")}))}var u=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing(),p=this.gridOptionsWrapper.getAlignedGrids();p&&p.forEach((function(e){e.api&&e.api.setAlwaysShowVerticalScroll(u)}))}},nd([de("columnModel")],t.prototype,"columnModel",void 0),nd([de("ctrlsService")],t.prototype,"ctrlsService",void 0),nd([rd(0,ge("loggerFactory"))],t.prototype,"setBeans",null),nd([ce],t.prototype,"init",null),t=nd([pe("alignedGridsService")],t)}(ze),id=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ad=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},sd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return id(t,e),t.prototype.adaptFunction=function(e,t){var n=this.componentMetadataProvider.retrieve(e);return n&&n.functionAdapter?n.functionAdapter(t):null},t.prototype.adaptCellRendererFunction=function(e){return function(){function t(){}return t.prototype.refresh=function(e){return!1},t.prototype.getGui=function(){var t=e(this.params),n=typeof t;return"string"===n||"number"===n||"boolean"===n?Tn("<span>"+t+"</span>"):null==t?Tn("<span></span>"):t},t.prototype.init=function(e){this.params=e},t}()},t.prototype.doesImplementIComponent=function(e){return!!e&&(e.prototype&&"getGui"in e.prototype)},ad([de("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),t=ad([pe("agComponentUtils")],t)}(ze),ld=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ud=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ld(t,e),t.prototype.postConstruct=function(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached"]},floatingFilterWrapperComponent:{mandatoryMethodList:[],optionalMethodList:[]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},pinnedRowCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged"]},filterComponent:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]}}},t.prototype.retrieve=function(e){return this.componentMetaData[e]},cd([de("agComponentUtils")],t.prototype,"agComponentUtils",void 0),cd([ce],t.prototype,"postConstruct",null),t=cd([pe("componentMetadataProvider")],t)}(ze),pd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},hd={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:20,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:56,headerCellMinWidth:48,listItemHeight:32,rowHeight:48,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:32,headerCellMinWidth:24,listItemHeight:24,rowHeight:28,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:240}},fd={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},gd={},vd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pd(t,e),t.prototype.getSassVariable=function(e,t){var n="ag-theme-"+(e.match("material")?"material":e.match("balham")?"balham":e.match("alpine")?"alpine":"custom"),r=hd[n][t],o=0;gd[e]||(gd[e]={});var i=gd[e][t];if(null!=i)return i;if(fd[t]){var a=fd[t],s=document.createElement("div");un(s,e),s.style.position="absolute";var l=a.reduce((function(e,t){var n=document.createElement("div");return n.style.position="static",un(n,t),e.appendChild(n),n}),s);if(document.body){document.body.appendChild(s);var c=-1!==t.toLowerCase().indexOf("height")?"height":"width";o=parseInt(window.getComputedStyle(l)[c],10),document.body.removeChild(s)}}return gd[e][t]=o||r,gd[e][t]},t.prototype.isThemeDark=function(){var e=this.getTheme().theme;return!!e&&e.indexOf("dark")>=0},t.prototype.chartMenuPanelWidth=function(){var e=this.getTheme().themeFamily;return this.getSassVariable(e,"chartMenuPanelWidth")},t.prototype.getTheme=function(){for(var e=/\bag-(material|(?:theme-([\w\-]*)))\b/,t=this.eGridDiv,n=null;t&&!(n=e.exec(t.className));)t=t.parentElement||void 0;if(!n)return{};var r=n[0];if(void 0===n[2]){var o=r.replace("ag-","ag-theme-");K((function(){return console.warn("AG Grid: As of v19 old theme are no longer provided. Please replace "+r+" with "+o+".")}),"using-old-theme")}return{theme:r,el:t,themeFamily:r.replace(/-dark$/,"")}},dd([de("eGridDiv")],t.prototype,"eGridDiv",void 0),t=dd([pe("environment")],t)}(ze),md=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},bd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createTasksP1={list:[],sorted:!1},t.createTasksP2={list:[],sorted:!1},t.destroyTasks=[],t.ticking=!1,t.scrollGoingDown=!0,t.lastScrollTop=0,t.taskCount=0,t.cancelledTasks=new Set,t}return md(t,e),t.prototype.setScrollTop=function(e){this.scrollGoingDown=e>this.lastScrollTop,this.lastScrollTop=e},t.prototype.init=function(){this.useAnimationFrame=!this.gridOptionsWrapper.isSuppressAnimationFrame()},t.prototype.isOn=function(){return this.useAnimationFrame},t.prototype.verifyAnimationFrameOn=function(e){!1===this.useAnimationFrame&&console.warn("AG Grid: AnimationFrameService."+e+" called but animation frames are off")},t.prototype.createTask=function(e,t,n){this.verifyAnimationFrameOn(n);var r={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[n],r),this.schedule()},t.prototype.cancelTask=function(e){this.cancelledTasks.add(e)},t.prototype.addTaskToList=function(e,t){e.list.push(t),e.sorted=!1},t.prototype.sortTaskList=function(e){if(!e.sorted){var t=this.scrollGoingDown?1:-1;e.list.sort((function(e,n){return e.index!==n.index?t*(n.index-e.index):n.createOrder-e.createOrder})),e.sorted=!0}},t.prototype.addDestroyTask=function(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()},t.prototype.executeFrame=function(e){this.verifyAnimationFrameOn("executeFrame");for(var t=this.createTasksP1,n=t.list,r=this.createTasksP2,o=r.list,i=this.destroyTasks,a=(new Date).getTime(),s=(new Date).getTime()-a,l=e<=0,c=this.ctrlsService.getGridBodyCtrl();l||s<e;){if(!c.getScrollFeature().executeAnimationFrameScroll()){var u=void 0;if(n.length)this.sortTaskList(t),u=n.pop().task;else if(o.length)this.sortTaskList(r),u=o.pop().task;else{if(!i.length){this.cancelledTasks.clear();break}u=i.pop()}this.cancelledTasks.has(u)||u()}s=(new Date).getTime()-a}n.length||o.length||i.length?this.requestFrame():this.stopTicking()},t.prototype.stopTicking=function(){this.ticking=!1},t.prototype.flushAllFrames=function(){this.useAnimationFrame&&this.executeFrame(-1)},t.prototype.schedule=function(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))},t.prototype.requestFrame=function(){var e=this.executeFrame.bind(this,60);window.requestAnimationFrame?window.requestAnimationFrame(e):window.webkitRequestAnimationFrame?window.webkitRequestAnimationFrame(e):window.setTimeout(e,0)},t.prototype.isQueueEmpty=function(){return!this.ticking},t.prototype.debounce=function(e){var t=this,n=!1;return function(){t.isOn()?n||(n=!0,t.addDestroyTask((function(){n=!1,e()}))):t.getFrameworkOverrides().setTimeout(e,0)}},yd([de("ctrlsService")],t.prototype,"ctrlsService",void 0),yd([ce],t.prototype,"init",null),t=yd([pe("animationFrameService")],t)}(ze),wd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cd=function(){return Cd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cd.apply(this,arguments)},xd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Sd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeLastPageEventProcessed=0,t}return wd(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}))},t.prototype.handlePageScrollingKey=function(e){var t=e.which||e.keyCode,n=e.altKey,r=e.ctrlKey||e.metaKey,o=this.mouseEventService.getCellPositionForEvent(e);if(!o)return!1;var i=!1;switch(t){case mo.PAGE_HOME:case mo.PAGE_END:r||n||(this.onHomeOrEndKey(t),i=!0);break;case mo.LEFT:case mo.RIGHT:r&&!n&&(this.onCtrlLeftOrRight(t,o),i=!0);break;case mo.UP:case mo.DOWN:r&&!n&&(this.onCtrlUpOrDown(t,o),i=!0);break;case mo.PAGE_DOWN:r||n||(this.onPageDown(o),i=!0);break;case mo.PAGE_UP:r||n||(this.onPageUp(o),i=!0)}return i&&e.preventDefault(),i},t.prototype.isTimeSinceLastPageEventToRecent=function(){return(new Date).getTime()-this.timeLastPageEventProcessed<100},t.prototype.setTimeLastPageEventProcessed=function(){this.timeLastPageEventProcessed=(new Date).getTime()},t.prototype.navigateTo=function(e){var t=e.scrollIndex,n=e.scrollType,r=e.scrollColumn,i=e.focusIndex,a=e.focusColumn;if(o(r)&&!r.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(r),o(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,n),this.animationFrameService.flushAllFrames(),this.focusService.setFocusedCell(i,a,null,!0),this.rangeService){var s={rowIndex:i,rowPinned:null,column:a};this.rangeService.setRangeToCell(s)}},t.prototype.onPageDown=function(e){if(!this.isTimeSinceLastPageEventToRecent()){var t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),n=this.gridOptionsWrapper.getScrollbarWidth(),r=t.bottom-t.top;this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(r-=n);var o=this.paginationProxy.getPixelOffset(),i=t.top+r,a=this.paginationProxy.getRowIndexAtPixel(i+o),s=this.paginationProxy.getRow(e.rowIndex).rowTop+r-o,l=this.paginationProxy.getRowIndexAtPixel(s+o),c=this.paginationProxy.getPageLastRow();l>c&&(l=c),a>c&&(a=c),this.navigateTo({scrollIndex:a,scrollType:"top",scrollColumn:null,focusIndex:l,focusColumn:e.column}),this.setTimeLastPageEventProcessed()}},t.prototype.onPageUp=function(e){if(!this.isTimeSinceLastPageEventToRecent()){var t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),n=this.gridOptionsWrapper.getScrollbarWidth(),r=t.bottom-t.top;this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(r-=n);var o=this.paginationProxy.getPixelOffset(),i=t.top,a=this.paginationProxy.getRowIndexAtPixel(i+o),s=this.paginationProxy.getRow(e.rowIndex),l=s.rowTop+s.rowHeight-r-o,c=this.paginationProxy.getRowIndexAtPixel(l+o),u=this.paginationProxy.getPageFirstRow();c<u&&(c=u),a<u&&(a=u),this.navigateTo({scrollIndex:a,scrollType:"bottom",scrollColumn:null,focusIndex:c,focusColumn:e.column}),this.setTimeLastPageEventProcessed()}},t.prototype.getIndexToFocus=function(e,t){var n=e;if(t){var r=this.paginationProxy.getRow(e);r&&r.stub&&(n-=1)}return n},t.prototype.onCtrlUpOrDown=function(e,t){var n=e===mo.UP,r=n?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:t.column,focusIndex:this.getIndexToFocus(r,!n),focusColumn:t.column})},t.prototype.onCtrlLeftOrRight=function(e,t){var n=e===mo.LEFT,r=this.columnModel.getAllDisplayedColumns(),o=n!==this.gridOptionsWrapper.isEnableRtl()?r[0]:v(r);this.navigateTo({scrollIndex:t.rowIndex,scrollType:null,scrollColumn:o,focusIndex:t.rowIndex,focusColumn:o})},t.prototype.onHomeOrEndKey=function(e){var t=e===mo.PAGE_HOME,n=this.columnModel.getAllDisplayedColumns(),r=t?n[0]:v(n),o=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:r,focusIndex:this.getIndexToFocus(o,!t),focusColumn:r})},t.prototype.onTabKeyDown=function(e,t){var n=t.shiftKey;if(this.tabToNextCellCommon(e,n))t.preventDefault();else if(n){var r=e.getRowPosition(),o=r.rowIndex;if(r.rowPinned?0===o:o===this.paginationProxy.getPageFirstRow()){t.preventDefault();var i=this.headerNavigationService.getHeaderRowCount()-1,a=v(this.columnModel.getAllDisplayedColumns());this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:i,column:a},event:t})}}else e instanceof Ts&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(!1)&&t.preventDefault()},t.prototype.tabToNextCell=function(e){var t=this.focusService.getFocusedCell();if(!t)return!1;var n=this.getCellByPosition(t);return!!(n||(n=this.rowRenderer.getRowByPosition(t))&&n.isFullWidth())&&this.tabToNextCellCommon(n,e)},t.prototype.tabToNextCellCommon=function(e,t){var n=e.isEditing();if(!n&&e instanceof Ts){var r=e.getRowCtrl();r&&(n=r.isEditing())}return(n?this.gridOptionsWrapper.isFullRowEdit()?this.moveToNextEditingRow(e,t):this.moveToNextEditingCell(e,t):this.moveToNextCellNotEditing(e,t))||!!this.focusService.getFocusedHeader()},t.prototype.moveToNextEditingCell=function(e,t){var n=e.getCellPosition();e.stopEditing();var r=this.findNextCellToFocusOn(n,t,!0);return null!=r&&(r.startEditing(null,null,!0),r.focusCell(!1),!0)},t.prototype.moveToNextEditingRow=function(e,t){var n=e.getCellPosition(),r=this.findNextCellToFocusOn(n,t,!0);if(null==r)return!1;var o=r.getCellPosition(),i=this.isCellEditable(n),a=this.isCellEditable(o),s=o&&n.rowIndex===o.rowIndex&&n.rowPinned===o.rowPinned;(i&&e.setFocusOutOnEditor(),s)||(e.getRowCtrl().stopEditing(),r.getRowCtrl().startRowEditing());return a?(r.setFocusInOnEditor(),r.focusCell()):r.focusCell(!0),!0},t.prototype.moveToNextCellNotEditing=function(e,t){var n,r=this.columnModel.getAllDisplayedColumns();n=e instanceof Hs?Cd(Cd({},e.getRowPosition()),{column:t?r[0]:v(r)}):e.getCellPosition();var i=this.findNextCellToFocusOn(n,t,!1);if(i instanceof Ts)i.focusCell(!0);else if(i)return this.tryToFocusFullWidthRow(i.getRowPosition(),t);return o(i)},t.prototype.findNextCellToFocusOn=function(e,t,n){for(var r=e;;){t||(r=this.getLastCellOfColSpan(r)),r=this.cellNavigationService.getNextTabbedCell(r,t);var i=this.gridOptionsWrapper.getTabToNextCellFunc();if(o(i)){var a=i({backwards:t,editing:n,previousCellPosition:e,nextCellPosition:r||null,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()});o(a)?(a.floating&&(K((function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")}),"no floating in userCell"),a.rowPinned=a.floating),r={rowIndex:a.rowIndex,column:a.column,rowPinned:a.rowPinned}):r=null}if(!r)return null;if(r.rowIndex<0){var s=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:s+r.rowIndex,column:r.column}}),null}var l=this.gridOptionsWrapper.isFullRowEdit();if(n&&!l)if(!this.isCellEditable(r))continue;this.ensureCellVisible(r);var c=this.getCellByPosition(r);if(c){if(!c.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(r),c}else{var u=this.rowRenderer.getRowByPosition(r);if(u&&u.isFullWidth())return u}}},t.prototype.isCellEditable=function(e){var t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)},t.prototype.getCellByPosition=function(e){var t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null},t.prototype.lookupRowNodeForCell=function(e){return e.rowPinned===Ce.PINNED_TOP?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.rowPinned===Ce.PINNED_BOTTOM?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)},t.prototype.navigateToNextCell=function(e,t,n,r){for(var a=n,s=!1;a&&(a===n||!this.isValidNavigateCell(a));)this.gridOptionsWrapper.isEnableRtl()?t===mo.LEFT&&(a=this.getLastCellOfColSpan(a)):t===mo.RIGHT&&(a=this.getLastCellOfColSpan(a)),s=i(a=this.cellNavigationService.getNextCellToFocus(t,a));if(s&&e&&e.keyCode===mo.UP&&(a={rowIndex:-1,rowPinned:null,column:n.column}),r){var l=this.gridOptionsWrapper.getNavigateToNextCellFunc();if(o(l)){var c=l({key:t,previousCellPosition:n,nextCellPosition:a||null,event:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()});o(c)?(c.floating&&(K((function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")}),"no floating in userCell"),c.rowPinned=c.floating),a={rowPinned:c.rowPinned,rowIndex:c.rowIndex,column:c.column}):a=null}}if(a)if(a.rowIndex<0){var u=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:u+a.rowIndex,column:n.column},event:e||void 0})}else{var p=this.getNormalisedPosition(a);p?this.focusPosition(p):this.tryToFocusFullWidthRow(a)}},t.prototype.getNormalisedPosition=function(e){this.ensureCellVisible(e);var t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null},t.prototype.tryToFocusFullWidthRow=function(e,t){void 0===t&&(t=!1);var n=this.columnModel.getAllDisplayedColumns(),r=this.rowRenderer.getRowByPosition(e);if(!r||!r.isFullWidth())return!1;var o={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?v(n):n[0])};return this.focusPosition(o),!0},t.prototype.focusPosition=function(e){this.focusService.setFocusedCell(e.rowIndex,e.column,e.rowPinned,!0),this.rangeService&&this.rangeService.setRangeToCell(e)},t.prototype.isValidNavigateCell=function(e){return!!this.rowPositionUtils.getRowNode(e)},t.prototype.getLastCellOfColSpan=function(e){var t=this.getCellByPosition(e);if(!t)return e;var n=t.getColSpanningList();return 1===n.length?e:{rowIndex:e.rowIndex,column:v(n),rowPinned:e.rowPinned}},t.prototype.ensureCellVisible=function(e){i(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column),this.gridBodyCon.getScrollFeature().horizontallyScrollHeaderCenterAndFloatingCenter(),this.animationFrameService.flushAllFrames()},xd([de("mouseEventService")],t.prototype,"mouseEventService",void 0),xd([de("paginationProxy")],t.prototype,"paginationProxy",void 0),xd([de("focusService")],t.prototype,"focusService",void 0),xd([de("animationFrameService")],t.prototype,"animationFrameService",void 0),xd([he("rangeService")],t.prototype,"rangeService",void 0),xd([de("columnModel")],t.prototype,"columnModel",void 0),xd([de("ctrlsService")],t.prototype,"ctrlsService",void 0),xd([de("rowRenderer")],t.prototype,"rowRenderer",void 0),xd([de("headerNavigationService")],t.prototype,"headerNavigationService",void 0),xd([de("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),xd([de("cellNavigationService")],t.prototype,"cellNavigationService",void 0),xd([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),xd([ce],t.prototype,"postConstruct",null),t=xd([pe("navigationService")],t)}(ze),Ed=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_d=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Rd=function(e,t){return function(n,r){t(n,r,e)}},Od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scrollY=0,t.uiBodyHeight=0,t}return Ed(t,e),t.prototype.agWire=function(e){this.logger=e.create("RowContainerHeightService")},t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Ke.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=tn(),this.logger.log("maxDivHeight = "+this.maxDivHeight)},t.prototype.isStretching=function(){return this.stretching},t.prototype.getDivStretchOffset=function(){return this.divStretchOffset},t.prototype.updateOffset=function(){if(this.stretching){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}},t.prototype.calculateOffset=function(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;var e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.logger.log("Div Stretch Offset = "+t+" ("+this.pixelsToShave+" * "+e+")"),this.setDivStretchOffset(t)},t.prototype.setUiContainerHeight=function(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:Ke.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))},t.prototype.clearOffset=function(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)},t.prototype.setDivStretchOffset=function(e){var t="number"===typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:Ke.EVENT_HEIGHT_SCALE_CHANGED}))},t.prototype.setModelHeight=function(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()},t.prototype.getUiContainerHeight=function(){return this.uiContainerHeight},t.prototype.getRealPixelPosition=function(e){return e-this.divStretchOffset},t.prototype.getUiBodyHeight=function(){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return e.bottom-e.top},t.prototype.getScrollPositionForPixel=function(e){if(this.pixelsToShave<=0)return e;var t=e/(this.modelHeight-this.getUiBodyHeight());return this.maxScrollY*t},_d([de("ctrlsService")],t.prototype,"ctrlsService",void 0),_d([Rd(0,ge("loggerFactory"))],t.prototype,"agWire",null),_d([ce],t.prototype,"postConstruct",null),t=_d([pe("rowContainerHeightService")],t)}(ze),Ad=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Td=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ad(t,e),t.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsWrapper.isGroupSelectsChildren(),this.isRowSelectableFunc=this.gridOptionsWrapper.getIsRowSelectableFunc()},t.prototype.updateSelectableAfterGrouping=function(e){if(this.isRowSelectableFunc){this.recurseDown(e.childrenAfterGroup,(function(e){return e.childrenAfterGroup}))}},t.prototype.updateSelectableAfterFiltering=function(e){if(this.isRowSelectableFunc){this.recurseDown(e.childrenAfterGroup,(function(e){return e.childrenAfterFilter}))}},t.prototype.recurseDown=function(e,t){var n=this;e&&e.forEach((function(e){if(e.group){var r;if(e.hasChildren()&&n.recurseDown(t(e),t),n.groupSelectsChildren)r=o(p(t(e),"selectable",!0));else r=!!n.isRowSelectableFunc&&n.isRowSelectableFunc(e);e.setRowSelectable(r)}}))},Pd([ce],t.prototype,"init",null),t=Pd([pe("selectableService")],t)}(ze),Dd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Nd=function(e){function t(){var t=e.call(this)||this;return t.previousAndFirstButtonsDisabled=!1,t.nextButtonDisabled=!1,t.lastButtonDisabled=!1,t}return Dd(t,e),t.prototype.postConstruct=function(){var e=this,t=this.gridOptionsWrapper.isEnableRtl();this.setTemplate(this.getTemplate()),this.btFirst.insertAdjacentElement("afterbegin",Nr(t?"last":"first",this.gridOptionsWrapper)),this.btPrevious.insertAdjacentElement("afterbegin",Nr(t?"next":"previous",this.gridOptionsWrapper)),this.btNext.insertAdjacentElement("afterbegin",Nr(t?"previous":"next",this.gridOptionsWrapper)),this.btLast.insertAdjacentElement("afterbegin",Nr(t?"first":"last",this.gridOptionsWrapper)),this.gridOptionsWrapper.isPagination()&&!this.gridOptionsWrapper.isSuppressPaginationPanel()?(this.addManagedListener(this.eventService,Ke.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach((function(t){var n=t.el,r=t.fn;e.addManagedListener(n,"click",r),e.addManagedListener(n,"keydown",(function(e){e.keyCode!==mo.ENTER&&e.keyCode!==mo.SPACE||(e.preventDefault(),r())}))})),this.onPaginationChanged()):this.setDisplayed(!1)},t.prototype.onPaginationChanged=function(){this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels()},t.prototype.onBtFirst=function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()},t.prototype.setCurrentPageLabel=function(){var e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),n=e?t+1:0;this.lbCurrent.innerHTML=this.formatNumber(n)},t.prototype.formatNumber=function(e){var t=this.gridOptionsWrapper.getPaginationNumberFormatterFunc();return t?t({value:e}):bt(e)},t.prototype.getTemplate=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=e("page","Page"),n=e("to","to"),r=e("of","of"),o=e("firstPage","First Page"),i=e("previousPage","Previous Page"),a=e("nextPage","Next Page"),s=e("lastPage","Last Page"),l=this.getCompId();return'<div class="ag-paging-panel ag-unselectable" id="ag-'+l+'">\n <span class="ag-paging-row-summary-panel" role="status">\n <span id="ag-'+l+'-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-'+l+'-to">'+n+'</span>\n <span id="ag-'+l+'-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-'+l+'-of">'+r+'</span>\n <span id="ag-'+l+'-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n </span>\n <span class="ag-paging-page-summary-panel" role="presentation">\n <div ref="btFirst" class="ag-paging-button" role="button" aria-label="'+o+'" tabindex="0"></div>\n <div ref="btPrevious" class="ag-paging-button" role="button" aria-label="'+i+'" tabindex="0"></div>\n <span class="ag-paging-description" role="status">\n <span id="ag-'+l+'-start-page">'+t+'</span>\n <span id="ag-'+l+'-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>\n <span id="ag-'+l+'-of-page">'+r+'</span>\n <span id="ag-'+l+'-of-page-number" ref="lbTotal" class="ag-paging-number"></span>\n </span>\n <div ref="btNext" class="ag-paging-button" role="button" aria-label="'+a+'" tabindex="0"></div>\n <div ref="btLast" class="ag-paging-button" role="button" aria-label="'+s+'" tabindex="0"></div>\n </span>\n </div>'},t.prototype.onBtNext=function(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()},t.prototype.onBtPrevious=function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()},t.prototype.onBtLast=function(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()},t.prototype.enableOrDisableButtons=function(){var e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),n=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,dn(this.btFirst,"ag-disabled",this.previousAndFirstButtonsDisabled),sr(this.btFirst,this.previousAndFirstButtonsDisabled),dn(this.btPrevious,"ag-disabled",this.previousAndFirstButtonsDisabled),sr(this.btPrevious,this.previousAndFirstButtonsDisabled);var r=this.isZeroPagesToDisplay(),o=t&&e===n-1;this.nextButtonDisabled=o||r,dn(this.btNext,"ag-disabled",this.nextButtonDisabled),sr(this.btNext,this.nextButtonDisabled),this.lastButtonDisabled=!t||r||e===n-1,dn(this.btLast,"ag-disabled",this.lastButtonDisabled),sr(this.btLast,this.lastButtonDisabled)},t.prototype.updateRowLabels=function(){var e,t,n=this.paginationProxy.getCurrentPage(),r=this.paginationProxy.getPageSize(),o=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;this.isZeroPagesToDisplay()?e=t=0:(t=(e=r*n+1)+r-1,o&&t>i&&(t=i)),this.lbFirstRowOnPage.innerHTML=this.formatNumber(e),this.rowNodeBlockLoader.isLoading()?this.lbLastRowOnPage.innerHTML="?":this.lbLastRowOnPage.innerHTML=this.formatNumber(t)},t.prototype.isZeroPagesToDisplay=function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&0===t},t.prototype.setTotalLabels=function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),n=e?this.paginationProxy.getMasterRowCount():null;if(1===n){var r=this.paginationProxy.getRow(0);if(r&&r.group&&!(r.groupData||r.aggData))return void this.setTotalLabelsToZero()}if(e)this.lbTotal.innerHTML=this.formatNumber(t),this.lbRecordCount.innerHTML=this.formatNumber(n);else{var o=this.gridOptionsWrapper.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=o,this.lbRecordCount.innerHTML=o}},t.prototype.setTotalLabelsToZero=function(){this.lbFirstRowOnPage.innerHTML=this.formatNumber(0),this.lbCurrent.innerHTML=this.formatNumber(0),this.lbLastRowOnPage.innerHTML=this.formatNumber(0),this.lbTotal.innerHTML=this.formatNumber(0),this.lbRecordCount.innerHTML=this.formatNumber(0)},kd([de("paginationProxy")],t.prototype,"paginationProxy",void 0),kd([de("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),kd([ao("btFirst")],t.prototype,"btFirst",void 0),kd([ao("btPrevious")],t.prototype,"btPrevious",void 0),kd([ao("btNext")],t.prototype,"btNext",void 0),kd([ao("btLast")],t.prototype,"btLast",void 0),kd([ao("lbRecordCount")],t.prototype,"lbRecordCount",void 0),kd([ao("lbFirstRowOnPage")],t.prototype,"lbFirstRowOnPage",void 0),kd([ao("lbLastRowOnPage")],t.prototype,"lbLastRowOnPage",void 0),kd([ao("lbCurrent")],t.prototype,"lbCurrent",void 0),kd([ao("lbTotal")],t.prototype,"lbTotal",void 0),kd([ce],t.prototype,"postConstruct",null),t}(io),Md=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Id=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ld=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.polyfillFunctions=[],t}return Md(t,e),t.prototype.observeResize=function(e,t){var n=this,r=re(t,50),o=this.gridOptionsWrapper.isSuppressBrowserResizeObserver();return!!window.ResizeObserver&&!o?function(){var t=new window.ResizeObserver(r);return t.observe(e),function(){return t.disconnect()}}():function(){var r=kn(e),o=Dn(e),i=!0;return function a(){if(i){var s=kn(e),l=Dn(e);(s!==r||l!==o)&&(r=s,o=l,t()),n.doNextPolyfillTurn(a)}}(),function(){return i=!1}}()},t.prototype.doNextPolyfillTurn=function(e){this.polyfillFunctions.push(e),this.schedulePolyfill()},t.prototype.schedulePolyfill=function(){var e=this;if(!this.polyfillScheduled){this.polyfillScheduled=!0,this.getFrameworkOverrides().setTimeout((function(){var t=e.polyfillFunctions;e.polyfillScheduled=!1,e.polyfillFunctions=[],t.forEach((function(e){return e()}))}),50)}},t=Id([pe("resizeObserverService")],t)}(ze),Fd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e[e.Loading=0]="Loading",e[e.NoRows=1]="NoRows"}(Gu||(Gu={}));var Hd=function(e){function n(){var t=e.call(this,n.TEMPLATE)||this;return t.inProgress=!1,t.destroyRequested=!1,t}return Fd(n,e),n.prototype.updateLayoutClasses=function(e,n){dn(this.eOverlayWrapper,t.LayoutCssClasses.AUTO_HEIGHT,n.autoHeight),dn(this.eOverlayWrapper,t.LayoutCssClasses.NORMAL,n.normal),dn(this.eOverlayWrapper,t.LayoutCssClasses.PRINT,n.print)},n.prototype.postConstruct=function(){this.createManagedBean(new Ac(this)),this.setDisplayed(!1),this.addManagedListener(this.eventService,Ke.EVENT_ROW_DATA_CHANGED,this.onRowDataChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_ROW_DATA_UPDATED,this.onRowDataChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.gridOptionsWrapper.isRowModelDefault()&&!this.gridOptionsWrapper.getRowData()&&this.showLoadingOverlay(),this.gridApi.registerOverlayWrapperComp(this)},n.prototype.setWrapperTypeClass=function(e){dn(this.eOverlayWrapper,"ag-overlay-loading-wrapper",e===Gu.Loading),dn(this.eOverlayWrapper,"ag-overlay-no-rows-wrapper",e===Gu.NoRows)},n.prototype.showLoadingOverlay=function(){if(!this.gridOptionsWrapper.isSuppressLoadingOverlay()){var e={api:this.gridOptionsWrapper.getApi()},t=this.userComponentFactory.getLoadingOverlayCompDetails(e).newAgStackInstance();this.showOverlay(t,Gu.Loading)}},n.prototype.showNoRowsOverlay=function(){if(!this.gridOptionsWrapper.isSuppressNoRowsOverlay()){var e={api:this.gridOptionsWrapper.getApi()},t=this.userComponentFactory.getNoRowsOverlayCompDetails(e).newAgStackInstance();this.showOverlay(t,Gu.NoRows)}},n.prototype.showOverlay=function(e,t){var n=this;this.inProgress||(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.inProgress=!0,e&&e.then((function(e){n.inProgress=!1,n.eOverlayWrapper.appendChild(e.getGui()),n.activeOverlay=e,n.destroyRequested&&(n.destroyRequested=!1,n.destroyActiveOverlay())})),this.setDisplayed(!0))},n.prototype.destroyActiveOverlay=function(){this.inProgress?this.destroyRequested=!0:this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),On(this.eOverlayWrapper))},n.prototype.hideOverlay=function(){this.destroyActiveOverlay(),this.setDisplayed(!1)},n.prototype.destroy=function(){this.destroyActiveOverlay(),e.prototype.destroy.call(this)},n.prototype.showOrHideOverlay=function(){var e=this.paginationProxy.isEmpty(),t=this.gridOptionsWrapper.isSuppressNoRowsOverlay();e&&!t?this.showNoRowsOverlay():this.hideOverlay()},n.prototype.onRowDataChanged=function(){this.showOrHideOverlay()},n.prototype.onNewColumnsLoaded=function(){this.columnModel.isReady()&&!this.paginationProxy.isEmpty()&&this.hideOverlay()},n.TEMPLATE='\n <div class="ag-overlay" aria-hidden="true">\n <div class="ag-overlay-panel">\n <div class="ag-overlay-wrapper" ref="eOverlayWrapper"></div>\n </div>\n </div>',Gd([de("userComponentFactory")],n.prototype,"userComponentFactory",void 0),Gd([de("paginationProxy")],n.prototype,"paginationProxy",void 0),Gd([de("gridApi")],n.prototype,"gridApi",void 0),Gd([de("columnModel")],n.prototype,"columnModel",void 0),Gd([ao("eOverlayWrapper")],n.prototype,"eOverlayWrapper",void 0),Gd([ce],n.prototype,"postConstruct",null),n}(io),Wd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},jd=function(e){function t(n){void 0===n&&(n={});var r=e.call(this,t.getTemplate(n))||this;r.suppressEnabledCheckbox=!0,r.suppressOpenCloseIcons=!1;var o=n.title,i=n.enabled,a=n.items,s=n.suppressEnabledCheckbox,l=n.suppressOpenCloseIcons;return r.title=o,r.cssIdentifier=n.cssIdentifier||"default",r.enabled=null==i||i,r.items=a||[],r.alignItems=n.alignItems||"center",null!=s&&(r.suppressEnabledCheckbox=s),null!=l&&(r.suppressOpenCloseIcons=l),r}return Wd(t,e),t.getTemplate=function(e){var t=e.cssIdentifier||"default";return'<div class="ag-group ag-'+t+'-group" role="presentation">\n <div class="ag-group-title-bar ag-'+t+'-group-title-bar ag-unselectable" ref="eTitleBar" role="button">\n <span class="ag-group-title-bar-icon ag-'+t+'-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>\n <span class="ag-group-title-bar-icon ag-'+t+'-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>\n <span ref="eTitle" class="ag-group-title ag-'+t+'-group-title"></span>\n </div>\n <div ref="eToolbar" class="ag-group-toolbar ag-'+t+'-group-toolbar">\n <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>\n </div>\n <div ref="eContainer" class="ag-group-container ag-group-container-'+(e.direction||"vertical")+" ag-"+t+'-group-container"></div>\n </div>'},t.prototype.postConstruct=function(){if(this.items.length){var e=this.items;this.items=[],this.addItems(e)}var t=this.gridOptionsWrapper.getLocaleTextFunc();this.cbGroupEnabled.setLabel(t("enabled","Enabled")),this.title&&this.setTitle(this.title),this.enabled&&this.setEnabled(this.enabled),this.setAlignItems(this.alignItems),this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract(),this.refreshAriaStatus(),this.refreshChildDisplay()},t.prototype.setupExpandContract=function(){var e=this;this.eGroupClosedIcon.appendChild(kr("columnSelectClosed",this.gridOptionsWrapper,null)),this.eGroupOpenedIcon.appendChild(kr("columnSelectOpen",this.gridOptionsWrapper,null)),this.addManagedListener(this.eTitleBar,"click",(function(){return e.toggleGroupExpand()})),this.addManagedListener(this.eTitleBar,"keydown",(function(t){switch(t.keyCode){case mo.ENTER:case mo.SPACE:t.preventDefault(),e.toggleGroupExpand();break;case mo.RIGHT:case mo.LEFT:t.preventDefault(),e.toggleGroupExpand(t.keyCode===mo.RIGHT)}}))},t.prototype.refreshAriaStatus=function(){this.suppressOpenCloseIcons||lr(this.eTitleBar,this.expanded)},t.prototype.refreshChildDisplay=function(){var e=!this.suppressOpenCloseIcons;gn(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),gn(this.eGroupOpenedIcon,e&&this.expanded),gn(this.eGroupClosedIcon,e&&!this.expanded)},t.prototype.isExpanded=function(){return this.expanded},t.prototype.setAlignItems=function(e){var t=this.getGui();return this.alignItems!==e&&pn(t,"ag-group-item-alignment-"+this.alignItems),this.alignItems=e,un(t,"ag-group-item-alignment-"+this.alignItems),this},t.prototype.toggleGroupExpand=function(e){return this.suppressOpenCloseIcons?(this.expanded=!0,this.refreshChildDisplay(),gn(this.eContainer,!0),this):(e=null!=e?e:!this.expanded,this.expanded===e||(this.expanded=e,this.refreshAriaStatus(),this.refreshChildDisplay(),gn(this.eContainer,e),this.dispatchEvent({type:this.expanded?t.EVENT_EXPANDED:t.EVENT_COLLAPSED})),this)},t.prototype.addItems=function(e){var t=this;e.forEach((function(e){return t.addItem(e)}))},t.prototype.addItem=function(e){var t=this.eContainer,n=e instanceof io?e.getGui():e;un(n,"ag-group-item"),un(n,"ag-"+this.cssIdentifier+"-group-item"),t.appendChild(n),this.items.push(n)},t.prototype.hideItem=function(e,t){dn(this.items[t],"ag-hidden",e)},t.prototype.setTitle=function(e){return this.eTitle.innerText=e,this},t.prototype.addCssClassToTitleBar=function(e){un(this.eTitleBar,e)},t.prototype.setEnabled=function(e,t){return this.enabled=e,this.refreshDisabledStyles(),this.toggleGroupExpand(e),t||this.cbGroupEnabled.setValue(e),this},t.prototype.isEnabled=function(){return this.enabled},t.prototype.onEnableChange=function(e){var t=this;return this.cbGroupEnabled.onValueChange((function(n){t.setEnabled(n,!0),e(n)})),this},t.prototype.hideEnabledCheckbox=function(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this},t.prototype.hideOpenCloseIcons=function(e){return this.suppressOpenCloseIcons=e,e&&this.toggleGroupExpand(!0),this},t.prototype.refreshDisabledStyles=function(){dn(this.getGui(),"ag-disabled",!this.enabled),this.suppressEnabledCheckbox&&!this.enabled?(un(this.eTitleBar,"ag-disabled-group-title-bar"),this.eTitleBar.removeAttribute("tabindex")):(pn(this.eTitleBar,"ag-disabled-group-title-bar"),this.eTitleBar.setAttribute("tabindex","0")),dn(this.eContainer,"ag-disabled-group-container",!this.enabled)},t.EVENT_EXPANDED="expanded",t.EVENT_COLLAPSED="collapsed",Vd([ao("eTitleBar")],t.prototype,"eTitleBar",void 0),Vd([ao("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),Vd([ao("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),Vd([ao("eToolbar")],t.prototype,"eToolbar",void 0),Vd([ao("cbGroupEnabled")],t.prototype,"cbGroupEnabled",void 0),Vd([ao("eTitle")],t.prototype,"eTitle",void 0),Vd([ao("eContainer")],t.prototype,"eContainer",void 0),Vd([ce],t.prototype,"postConstruct",null),t}(io),Bd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ud=function(e){function t(t,n){var r=e.call(this)||this;return r.element=t,r.dragStartPosition={x:0,y:0},r.position={x:0,y:0},r.lastSize={width:-1,height:-1},r.positioned=!1,r.resizersAdded=!1,r.resizeListeners=[],r.boundaryEl=null,r.isResizing=!1,r.isMoving=!1,r.resizable={},r.movable=!1,r.currentResizer=null,r.config=V({},{popup:!1},n),r}return Bd(t,e),t.prototype.center=function(){var e=this.offsetParent,t=e.clientHeight,n=e.clientWidth/2-this.getWidth()/2,r=t/2-this.getHeight()/2;this.offsetElement(n,r)},t.prototype.initialisePosition=function(){var e=this.config,t=e.centered,n=e.forcePopupParentAsOffsetParent,r=e.minWidth,o=e.width,i=e.minHeight,a=e.height,s=e.x,l=e.y;this.offsetParent||this.setOffsetParent();var c=0,u=0,p=!!this.element.offsetParent;if(p){var d=this.findBoundaryElement(),h=window.getComputedStyle(d);if(null!=h.minWidth){var f=d.offsetWidth-this.element.offsetWidth;u=parseInt(h.minWidth,10)-f}if(null!=h.minHeight){var g=d.offsetHeight-this.element.offsetHeight;c=parseInt(h.minHeight,10)-g}}if(this.minHeight=i||c,this.minWidth=r||u,o&&this.setWidth(o),a&&this.setHeight(a),o&&a||this.refreshSize(),t)this.center();else if(s||l)this.offsetElement(s,l);else if(p&&n&&this.boundaryEl){var v=parseFloat(this.boundaryEl.style.top),m=parseFloat(this.boundaryEl.style.left);this.offsetElement(isNaN(m)?0:m,isNaN(v)?0:v)}this.positioned=!!this.offsetParent},t.prototype.isPositioned=function(){return this.positioned},t.prototype.getPosition=function(){return this.position},t.prototype.setMovable=function(e,t){if(this.config.popup&&e!==this.movable){this.movable=e;var n=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(n),this.moveElementDragListener=n):(this.dragService.removeDragSource(n),this.moveElementDragListener=void 0)}},t.prototype.setResizable=function(e){var t=this;if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"===typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach((function(n){var r=!!e[n],o=t.getResizerElement(n),i={dragStartPixels:0,eElement:o,onDragStart:function(e){return t.onResizeStart(e,n)},onDragging:t.onResize.bind(t),onDragStop:function(e){return t.onResizeEnd(e,n)}};!!t.resizable[n]===r&&(t.isAlive()||r)||(r?(t.dragService.addDragSource(i),t.resizeListeners.push(i),o.style.pointerEvents="all"):o.style.pointerEvents="none")}))},t.prototype.removeSizeFromEl=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")},t.prototype.restoreLastSize=function(){this.element.style.flex="0 0 auto";var e=this.lastSize,t=e.height,n=e.width;-1!==n&&(this.element.style.width=n+"px"),-1!==t&&(this.element.style.height=t+"px")},t.prototype.getHeight=function(){return this.element.offsetHeight},t.prototype.setHeight=function(e){var t=this.config.popup,n=this.element,r=!1;if("string"===typeof e&&-1!==e.indexOf("%"))Vn(n,e),e=xn(n),r=!0;else if(this.positioned){var o=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect();e=Math.max(this.minHeight,e);var a=this.offsetParent.clientHeight,s=t?this.position.y:o.top,l=t?0:i.top;a&&e+s>a+l&&(e=a-s)}this.getHeight()!==e&&(r?(n.style.maxHeight="unset",n.style.minHeight="unset"):t?Vn(n,e):(n.style.height=e+"px",n.style.flex="0 0 auto",this.lastSize.height="number"===typeof e?e:parseFloat(e)))},t.prototype.getWidth=function(){return this.element.offsetWidth},t.prototype.setWidth=function(e){var t=this.element,n=this.config.popup,r=!1;if("string"===typeof e&&-1!==e.indexOf("%"))Wn(t,e),e=Sn(t),r=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var o=this.offsetParent.clientWidth,i=n?this.position.x:this.element.getBoundingClientRect().left;o&&e+i>o&&(e=o-i)}this.getWidth()!==e&&(r?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Wn(t,e):(t.style.width=e+"px",t.style.flex=" unset",this.lastSize.width="number"===typeof e?e:parseFloat(e)))},t.prototype.offsetElement=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var n=this.config.forcePopupParentAsOffsetParent?this.boundaryEl:this.element;this.popupService.positionPopup({ePopup:n,x:e,y:t,keepWithinBounds:!0}),this.setPosition(parseFloat(n.style.left),parseFloat(n.style.top))},t.prototype.setPosition=function(e,t){this.position.x=e,this.position.y=t},t.prototype.updateDragStartPosition=function(e,t){this.dragStartPosition={x:e,y:t}},t.prototype.calculateMouseMovement=function(e){var t=e.e,n=e.isLeft,r=e.isTop,o=e.anywhereWithin,i=e.topBuffer,a=t.clientX-this.dragStartPosition.x,s=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!n,!!o,a)?0:a,movementY:this.shouldSkipY(t,!!r,i,s)?0:s}},t.prototype.shouldSkipX=function(e,t,n,r){var o=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),a=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.x:o.left,l=s<=0&&i.left>=e.clientX||i.right<=e.clientX&&i.right<=a.right;return!!l||(l=t?r<0&&e.clientX>s+i.left||r>0&&e.clientX<s+i.left:n?r<0&&e.clientX>a.right||r>0&&e.clientX<s+i.left:r<0&&e.clientX>a.right||r>0&&e.clientX<a.right)},t.prototype.shouldSkipY=function(e,t,n,r){void 0===n&&(n=0);var o=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),a=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.y:o.top,l=s<=0&&i.top>=e.clientY||i.bottom<=e.clientY&&i.bottom<=a.bottom;return!!l||(l=t?r<0&&e.clientY>s+i.top+n||r>0&&e.clientY<s+i.top:r<0&&e.clientY>a.bottom||r>0&&e.clientY<a.bottom)},t.prototype.createResizeMap=function(){var e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}},t.prototype.addResizers=function(){if(!this.resizersAdded){var e=this.element;if(e){var t=(new DOMParser).parseFromString('<div class="ag-resizer-wrapper">\n <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>\n <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>\n <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>\n <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>\n <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>\n <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>\n <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>\n <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>\n </div>',"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}}},t.prototype.removeResizers=function(){this.resizerMap=void 0;var e=this.element.querySelector(".ag-resizer-wrapper");e&&this.element.removeChild(e),this.resizersAdded=!1},t.prototype.getResizerElement=function(e){return this.resizerMap[e].element},t.prototype.onResizeStart=function(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},un(this.element,"ag-resizing"),un(this.resizerMap[t].element,"ag-active");var n=this.config,r=n.popup,o=n.forcePopupParentAsOffsetParent;r||o||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.getSiblings=function(){var e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter((function(e){return!hn(e,"ag-hidden")})):null},t.prototype.getMinSizeOfSiblings=function(){for(var e=this.getSiblings()||[],t=0,n=0,r=0;r<e.length;r++){var o=e[r],i=!!o.style.flex&&"0 0 auto"!==o.style.flex;if(o!==this.element){var a=this.minHeight||0,s=this.minWidth||0;if(i){var l=window.getComputedStyle(o);l.minHeight&&(a=parseInt(l.minHeight,10)),l.minWidth&&(s=parseInt(l.minWidth,10))}else a=o.offsetHeight,s=o.offsetWidth;t+=a,n+=s}}return{height:t,width:n}},t.prototype.applySizeToSiblings=function(e){var t=null,n=this.getSiblings();if(n){for(var r=0;r<n.length;r++){var o=n[r];o!==t&&(e?o.style.height=o.offsetHeight+"px":o.style.width=o.offsetWidth+"px",o.style.flex="0 0 auto",o===this.element&&(t=n[r+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}},t.prototype.onResize=function(e){if(this.isResizing&&this.currentResizer){var t=this.config,n=t.popup,r=t.forcePopupParentAsOffsetParent,o=this.currentResizer,i=o.isTop,a=o.isRight,s=o.isBottom,l=o.isLeft,c=a||l,u=s||i,p=this.calculateMouseMovement({e:e,isLeft:l,isTop:i}),d=p.movementX,h=p.movementY,f=this.position.x,g=this.position.y,v=0,m=0;if(c&&d){var y=l?-1:1,b=this.getWidth(),w=b+d*y,C=!1;l&&(f+(v=b-w)<=0||w<=this.minWidth)&&(C=!0,v=0),C||this.setWidth(w)}if(u&&h){y=i?-1:1;var x=this.getHeight(),S=x+h*y,E=!1;i?(g+(m=x-S)<=0||S<=this.minHeight)&&(E=!0,m=0):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&x<S&&this.getMinSizeOfSiblings().height+S>this.element.parentElement.offsetHeight&&(E=!0),E||this.setHeight(S)}this.updateDragStartPosition(e.clientX,e.clientY),((n||r)&&v||m)&&this.offsetElement(f+v,g+m)}},t.prototype.onResizeEnd=function(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;var n={type:"resize",api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()};pn(this.element,"ag-resizing"),pn(this.resizerMap[t].element,"ag-active"),this.dispatchEvent(n)},t.prototype.refreshSize=function(){var e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))},t.prototype.onMoveStart=function(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,un(this.element,"ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.onMove=function(e){if(this.isMoving){var t,n=this.position,r=n.x,o=n.y;this.config.calculateTopBuffer&&(t=this.config.calculateTopBuffer());var i=this.calculateMouseMovement({e:e,isTop:!0,anywhereWithin:!0,topBuffer:t}),a=i.movementX,s=i.movementY;this.offsetElement(r+a,o+s),this.updateDragStartPosition(e.clientX,e.clientY)}},t.prototype.onMoveEnd=function(){this.isMoving=!1,this.boundaryEl=null,pn(this.element,"ag-moving")},t.prototype.setOffsetParent=function(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent},t.prototype.findBoundaryElement=function(){for(var e=this.element;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element},t.prototype.clearResizeListeners=function(){for(;this.resizeListeners.length;){var e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.clearResizeListeners(),this.removeResizers()},zd([de("popupService")],t.prototype,"popupService",void 0),zd([de("dragService")],t.prototype,"dragService",void 0),t}(ze),Yd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},qd=function(e){function t(n){var r=e.call(this,t.getTemplate(n))||this;return r.closable=!0,r.config=n,r}return Yd(t,e),t.getTemplate=function(e){var t=e&&e.cssIdentifier||"default";return'<div class="ag-panel ag-'+t+'-panel" tabindex="-1">\n <div ref="eTitleBar" class="ag-panel-title-bar ag-'+t+'-panel-title-bar ag-unselectable">\n <span ref="eTitle" class="ag-panel-title-bar-title ag-'+t+'-panel-title-bar-title"></span>\n <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-'+t+'-panel-title-bar-buttons"></div>\n </div>\n <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-'+t+'-panel-content-wrapper"></div>\n </div>'},t.prototype.postConstruct=function(){var e=this,t=this.config,n=t.component,r=t.closable,o=t.hideTitleBar,i=t.title,a=t.minWidth,s=void 0===a?250:a,l=t.width,c=t.minHeight,u=void 0===c?250:c,p=t.height,d=t.centered,h=t.popup,f=t.x,g=t.y;this.positionableFeature=new Ud(this.getGui(),{minWidth:s,width:l,minHeight:u,height:p,centered:d,x:f,y:g,popup:h,calculateTopBuffer:function(){return e.positionableFeature.getHeight()-e.getBodyHeight()}}),this.createManagedBean(this.positionableFeature);var v=this.getGui();n&&this.setBodyComponent(n),o?un(this.eTitleBar,"ag-hidden"):(i&&this.setTitle(i),this.setClosable(null!=r?r:this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",(function(t){if(v.contains(t.relatedTarget)||v.contains(document.activeElement)||e.eTitleBarButtons.contains(t.target))t.preventDefault();else{var n=e.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");n&&n.focus()}})),h&&this.positionableFeature.isPositioned()||(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")},t.prototype.renderComponent=function(){var e=this,t=this.getGui();t.focus(),this.close=function(){t.parentElement.removeChild(t),e.destroy()}},t.prototype.getHeight=function(){return this.positionableFeature.getHeight()},t.prototype.setHeight=function(e){this.positionableFeature.setHeight(e)},t.prototype.getWidth=function(){return this.positionableFeature.getWidth()},t.prototype.setWidth=function(e){this.positionableFeature.setWidth(e)},t.prototype.setClosable=function(e){if(e!==this.closable&&(this.closable=e),e){var n=this.closeButtonComp=new io(t.CLOSE_BTN_TEMPLATE);this.getContext().createBean(n),(r=n.getGui()).appendChild(un(Nr("close",this.gridOptionsWrapper),"ag-panel-title-bar-button-icon")),this.addTitleBarButton(n),n.addManagedListener(r,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){var r;(r=this.closeButtonComp.getGui()).parentElement.removeChild(r),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}},t.prototype.setBodyComponent=function(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())},t.prototype.addTitleBarButton=function(e,t){var n=this.eTitleBarButtons,r=n.children,o=r.length;null==t&&(t=o),t=Math.max(0,Math.min(t,o));var i=e.getGui();un(i,"ag-panel-title-bar-button"),0===t?n.insertAdjacentElement("afterbegin",i):t===o?n.insertAdjacentElement("beforeend",i):r[t-1].insertAdjacentElement("afterend",i),e.setParentComponent(this)},t.prototype.getBodyHeight=function(){return wn(this.eContentWrapper)},t.prototype.getBodyWidth=function(){return Cn(this.eContentWrapper)},t.prototype.setTitle=function(e){this.eTitle.innerText=e},t.prototype.onBtClose=function(){this.close()},t.prototype.destroy=function(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));var t=this.getGui();t&&t.offsetParent&&this.close(),e.prototype.destroy.call(this)},t.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',Xd([ao("eContentWrapper")],t.prototype,"eContentWrapper",void 0),Xd([ao("eTitleBar")],t.prototype,"eTitleBar",void 0),Xd([ao("eTitleBarButtons")],t.prototype,"eTitleBarButtons",void 0),Xd([ao("eTitle")],t.prototype,"eTitle",void 0),Xd([ce],t.prototype,"postConstruct",null),t}(io),Kd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$d=function(){return $d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$d.apply(this,arguments)},Qd=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Zd=function(e){function t(t){var n=e.call(this,$d($d({},t),{popup:!0}))||this;return n.isMaximizable=!1,n.isMaximized=!1,n.maximizeListeners=[],n.resizeListenerDestroy=null,n.lastPosition={x:0,y:0,width:0,height:0},n}return Kd(t,e),t.prototype.postConstruct=function(){var t=this,n=this.getGui(),r=this.config,o=r.movable,i=r.resizable,a=r.maximizable;un(n,"ag-dialog"),e.prototype.postConstruct.call(this),this.addManagedListener(n,"focusin",(function(e){n.contains(e.relatedTarget)||t.popupService.bringPopupToFront(n)})),o&&this.setMovable(o),a&&this.setMaximizable(a),i&&this.setResizable(i)},t.prototype.renderComponent=function(){var e=this.getGui(),t=this.config,n=t.alwaysOnTop,r=t.modal,o=t.title,i=this.gridOptionsWrapper.getLocaleTextFunc(),a=this.popupService.addPopup({modal:r,eChild:e,closeOnEsc:!0,closedCallback:this.destroy.bind(this),alwaysOnTop:n,ariaLabel:o||i("ariaLabelDialog","Dialog")});a&&(this.close=a.hideFunc)},t.prototype.toggleMaximize=function(){var e=this.positionableFeature.getPosition();if(this.isMaximized){var t=this.lastPosition,n=t.x,r=t.y,o=t.width,i=t.height;this.setWidth(o),this.setHeight(i),this.positionableFeature.offsetElement(n,r)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()},t.prototype.refreshMaximizeIcon=function(){gn(this.maximizeIcon,!this.isMaximized),gn(this.minimizeIcon,this.isMaximized)},t.prototype.clearMaximizebleListeners=function(){this.maximizeListeners.length&&(this.maximizeListeners.forEach((function(e){return e()})),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)},t.prototype.destroy=function(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),e.prototype.destroy.call(this)},t.prototype.setResizable=function(e){this.positionableFeature.setResizable(e)},t.prototype.setMovable=function(e){this.positionableFeature.setMovable(e,this.eTitleBar)},t.prototype.setMaximizable=function(e){var t=this;if(!e)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));var n=this.eTitleBar;if(n&&e!==this.isMaximizable){var r=this.maximizeButtonComp=this.createBean(new io('<div class="ag-dialog-button"></span>')),o=r.getGui();o.appendChild(this.maximizeIcon=Nr("maximize",this.gridOptionsWrapper)),un(this.maximizeIcon,"ag-panel-title-bar-button-icon"),o.appendChild(this.minimizeIcon=Nr("minimize",this.gridOptionsWrapper)),un(this.minimizeIcon,"ag-panel-title-bar-button-icon"),un(this.minimizeIcon,"ag-hidden"),r.addManagedListener(o,"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(r,0),this.maximizeListeners.push(this.addManagedListener(n,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",(function(){t.isMaximized=!1,t.refreshMaximizeIcon()}))}},Qd([de("popupService")],t.prototype,"popupService",void 0),t}(qd),Jd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eh=function(e){function t(t,n,r){return void 0===n&&(n="ag-text-field"),void 0===r&&(r="text"),e.call(this,t,n,r)||this}return Jd(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()},t.prototype.setValue=function(t,n){var r=e.prototype.setValue.call(this,t,n);return this.eInput.value!==t&&(this.eInput.value=o(t)?t:""),r},t.prototype.preventDisallowedCharacters=function(){var e=new RegExp("["+this.config.allowedCharPattern+"]");this.addManagedListener(this.eInput,"keypress",(function(t){t.key&&!e.test(t.key)&&t.preventDefault()})),this.addManagedListener(this.eInput,"paste",(function(t){O(t.clipboardData.getData("text"),(function(t){return!e.test(t)}))&&t.preventDefault()}))},t}(Vo),th=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nh=function(e){function t(t){return e.call(this,t,"ag-text-area",null,"textarea")||this}return th(t,e),t.prototype.setValue=function(t,n){var r=e.prototype.setValue.call(this,t,n);return this.eInput.value=t,r},t.prototype.setCols=function(e){return this.eInput.cols=e,this},t.prototype.setRows=function(e){return this.eInput.rows=e,this},t}(Vo),rh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ih=function(e){function t(n){var r=e.call(this,n,t.TEMPLATE)||this;return r.labelAlignment="top",r}return rh(t,e),t.prototype.init=function(){un(this.eSlider.getGui(),"ag-slider-field")},t.prototype.onValueChange=function(e){var t=this,n=Po.EVENT_CHANGED;return this.addManagedListener(this.eText,n,(function(){var n=parseFloat(t.eText.getValue());t.eSlider.setValue(n.toString(),!0),e(n||0)})),this.addManagedListener(this.eSlider,n,(function(){var n=t.eSlider.getValue();t.eText.setValue(n,!0),e(parseFloat(n))})),this},t.prototype.setSliderWidth=function(e){return this.eSlider.setWidth(e),this},t.prototype.setTextFieldWidth=function(e){return this.eText.setWidth(e),this},t.prototype.setMinValue=function(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this},t.prototype.setMaxValue=function(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this},t.prototype.getValue=function(){return this.eText.getValue()},t.prototype.setValue=function(e){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),this.dispatchEvent({type:Po.EVENT_CHANGED})),this},t.prototype.setStep=function(e){return this.eSlider.setStep(e),this.eText.setStep(e),this},t.TEMPLATE='<div class="ag-slider">\n <label ref="eLabel"></label>\n <div class="ag-wrapper ag-slider-wrapper">\n <ag-input-range ref="eSlider"></ag-input-range>\n <ag-input-number-field ref="eText"></ag-input-number-field>\n </div>\n </div>',oh([ao("eLabel")],t.prototype,"eLabel",void 0),oh([ao("eSlider")],t.prototype,"eSlider",void 0),oh([ao("eText")],t.prototype,"eText",void 0),oh([ce],t.prototype,"init",null),t}(Oo),ah=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},lh=function(e){function t(n){var r=e.call(this,t.TEMPLATE)||this;return r.H=1,r.S=1,r.B=1,r.A=1,r.isSpectrumDragging=!1,r.isSpectrumHueDragging=!1,r.isSpectrumAlphaDragging=!1,r.colorChanged=!1,r.picker=n.picker,r}return ah(t,e),t.prototype.postConstruct=function(){var e=this.getGui();this.initRecentColors(),this.addManagedListener(this.spectrumVal,"mousedown",this.onSpectrumDraggerDown.bind(this)),this.addManagedListener(e,"mousemove",this.onSpectrumDraggerMove.bind(this)),this.addManagedListener(this.spectrumHue,"mousedown",this.onSpectrumHueDown.bind(this)),this.addManagedListener(e,"mousemove",this.onSpectrumHueMove.bind(this)),this.addManagedListener(this.spectrumAlpha,"mousedown",this.onSpectrumAlphaDown.bind(this)),this.addManagedListener(e,"mousemove",this.onSpectrumAlphaMove.bind(this)),this.addManagedListener(document,"mouseup",this.onMouseUp.bind(this)),this.addManagedListener(this.recentColors,"click",this.onRecentColorClick.bind(this))},t.prototype.refreshSpectrumRect=function(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()},t.prototype.refreshHueRect=function(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()},t.prototype.refreshAlphaRect=function(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()},t.prototype.onSpectrumDraggerDown=function(e){this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(e)},t.prototype.onSpectrumDraggerMove=function(e){this.isSpectrumDragging&&this.moveDragger(e)},t.prototype.onSpectrumHueDown=function(e){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(e)},t.prototype.onSpectrumHueMove=function(e){this.isSpectrumHueDragging&&this.moveHueSlider(e)},t.prototype.onSpectrumAlphaDown=function(e){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(e)},t.prototype.onSpectrumAlphaMove=function(e){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(e)},t.prototype.onMouseUp=function(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1},t.prototype.moveDragger=function(e){var t=this.spectrumValRect;if(t){var n=e.clientX-t.left,r=e.clientY-t.top;n=Math.max(n,0),n=Math.min(n,t.width),r=Math.max(r,0),r=Math.min(r,t.height),this.setSpectrumValue(n/t.width,1-r/t.height)}},t.prototype.moveHueSlider=function(e){var t=this.spectrumHueRect;if(t){var n=this.spectrumHueSlider,r=n.getBoundingClientRect(),o=e.clientX-t.left;o=Math.max(o,0),o=Math.min(o,t.width),this.H=1-o/t.width,n.style.left=o+r.width/2+"px",this.update()}},t.prototype.moveAlphaSlider=function(e){var t=this.spectrumAlphaRect;if(t){var n=this.spectrumAlphaSlider,r=n.getBoundingClientRect(),o=e.clientX-t.left;o=Math.max(o,0),o=Math.min(o,t.width),this.A=o/t.width,n.style.left=o+r.width/2+"px",this.update()}},t.prototype.update=function(){var e=Ft.fromHSB(360*this.H,this.S,this.B,this.A),t=Ft.fromHSB(360*this.H,1,1),n=e.toRgbaString(),r=this.picker;Ft.fromString(r.getValue()).toRgbaString()!==n&&(this.colorChanged=!0),r.setValue(n),this.spectrumColor.style.backgroundColor=t.toRgbaString(),this.spectrumDragger.style.backgroundColor=n},t.prototype.setSpectrumValue=function(e,t){var n=this.spectrumValRect||this.refreshSpectrumRect();if(n){var r=this.spectrumDragger,o=r.getBoundingClientRect();e=Math.max(0,e),e=Math.min(1,e),t=Math.max(0,t),t=Math.min(1,t),this.S=e,this.B=t,r.style.left=e*n.width-o.width/2+"px",r.style.top=(1-t)*n.height-o.height/2+"px",this.update()}},t.prototype.initRecentColors=function(){var e=t.recentColors.map((function(e,t){return'<div class="ag-recent-color" id='+t+' style="background-color: '+e+'; width: 15px; height: 15px;" recent-color="'+e+'"></div>'}));this.recentColors.innerHTML=e.join("")},t.prototype.setValue=function(e){var t=Ft.fromString(e),n=t.toHSB(),r=n[0],o=n[1],i=n[2];this.H=(isNaN(r)?0:r)/360,this.A=t.a;var a=this.spectrumHueRect||this.refreshHueRect(),s=this.spectrumAlphaRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left=(this.H-1)*-a.width+"px",this.spectrumAlphaSlider.style.left=this.A*s.width+"px",this.setSpectrumValue(o,i)},t.prototype.onRecentColorClick=function(e){var n=e.target;if(o(n.id)){var r=parseInt(n.id,10);this.setValue(t.recentColors[r]),this.destroy()}},t.prototype.addRecentColor=function(){var e=Ft.fromHSB(360*this.H,this.S,this.B,this.A).toRgbaString(),n=t.recentColors;this.colorChanged&&n[0]!==e&&(n=n.filter((function(t){return t!=e})),(n=[e].concat(n)).length>t.maxRecentColors&&(n=n.slice(0,t.maxRecentColors)),t.recentColors=n)},t.prototype.destroy=function(){this.addRecentColor(),e.prototype.destroy.call(this)},t.maxRecentColors=8,t.recentColors=[],t.TEMPLATE='<div class="ag-color-panel">\n <div ref="spectrumColor" class="ag-spectrum-color">\n <div class="ag-spectrum-sat ag-spectrum-fill">\n <div ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">\n <div ref="spectrumDragger" class="ag-spectrum-dragger"></div>\n </div>\n </div>\n </div>\n <div class="ag-spectrum-tools">\n <div ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">\n <div class="ag-spectrum-hue-background"></div>\n <div ref="spectrumHueSlider" class="ag-spectrum-slider"></div>\n </div>\n <div ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">\n <div class="ag-spectrum-alpha-background"></div>\n <div ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>\n </div>\n <div ref="recentColors" class="ag-recent-colors"></div>\n </div>\n </div>',sh([ao("spectrumColor")],t.prototype,"spectrumColor",void 0),sh([ao("spectrumVal")],t.prototype,"spectrumVal",void 0),sh([ao("spectrumDragger")],t.prototype,"spectrumDragger",void 0),sh([ao("spectrumHue")],t.prototype,"spectrumHue",void 0),sh([ao("spectrumHueSlider")],t.prototype,"spectrumHueSlider",void 0),sh([ao("spectrumAlpha")],t.prototype,"spectrumAlpha",void 0),sh([ao("spectrumAlphaSlider")],t.prototype,"spectrumAlphaSlider",void 0),sh([ao("recentColors")],t.prototype,"recentColors",void 0),sh([ce],t.prototype,"postConstruct",null),t}(io),ch=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uh=function(e){function t(t){var n=e.call(this,t,"ag-color-picker","colorPicker")||this;return t&&t.color&&(n.value=t.color),n}return ch(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.value&&this.setValue(this.value)},t.prototype.showPicker=function(){var e=this,t=this.getGui().getBoundingClientRect(),n=this.createBean(new Zd({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:t.right-190,y:t.top-250}));this.isPickerDisplayed=!0,un(n.getGui(),"ag-color-dialog");var r=this.createBean(new lh({picker:this}));return r.addDestroyFunc((function(){n.isAlive()&&e.destroyBean(n)})),n.setParentComponent(this),n.setBodyComponent(r),r.setValue(this.getValue()),n.addDestroyFunc((function(){e.isDestroyingPicker?e.isDestroyingPicker=!1:(e.isDestroyingPicker=!0,r.isAlive()&&e.destroyBean(r)),e.isAlive()&&e.getFocusableElement().focus(),e.isPickerDisplayed=!1})),n},t.prototype.setValue=function(t){return this.value===t?this:(this.eDisplayField.style.backgroundColor=t,e.prototype.setValue.call(this,t))},t.prototype.getValue=function(){return this.value},t}(ko),ph=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dh=function(e){function t(t){return e.call(this,t,"ag-number-field","number")||this}return ph(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"blur",(function(){var e=parseFloat(t.eInput.value),n=isNaN(e)?"":t.normalizeValue(e.toString());t.value!==n&&t.setValue(n)}))},t.prototype.normalizeValue=function(e){if(""===e)return"";this.precision&&(e=this.adjustPrecision(e));var t=parseFloat(e);return null!=this.min&&t<this.min?e=this.min.toString():null!=this.max&&t>this.max&&(e=this.max.toString()),e},t.prototype.adjustPrecision=function(e){if(this.precision){var t=parseFloat(e).toFixed(this.precision);e=parseFloat(t).toString()}return e},t.prototype.setMin=function(e){return this.min===e||(this.min=e,qn(this.eInput,"min",e)),this},t.prototype.setMax=function(e){return this.max===e||(this.max=e,qn(this.eInput,"max",e)),this},t.prototype.setPrecision=function(e){return this.precision=e,this},t.prototype.setStep=function(e){return this.step===e||(this.step=e,qn(this.eInput,"step",e)),this},t.prototype.setValue=function(t,n){return(t=this.adjustPrecision(t))!=this.normalizeValue(t)?this:e.prototype.setValue.call(this,t,n)},t}(eh),hh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fh=function(e){function t(t){return e.call(this,t,"ag-range-field","range")||this}return hh(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this);var t=this.config,n=t.min,r=t.max,o=t.step;null!=n&&this.setMinValue(n),null!=r&&this.setMaxValue(r),this.setStep(o||1)},t.prototype.addInputListeners=function(){var e=this,t=qt()?"change":"input";this.addManagedListener(this.eInput,t,(function(t){var n=t.target.value;e.setValue(n)}))},t.prototype.setMinValue=function(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this},t.prototype.setMaxValue=function(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this},t.prototype.setStep=function(e){return this.eInput.setAttribute("step",e.toString()),this},t.prototype.setValue=function(t,n){null!=this.min&&(t=Math.max(parseFloat(t),this.min).toString()),null!=this.max&&(t=Math.min(parseFloat(t),this.max).toString());var r=e.prototype.setValue.call(this,t,n);return this.eInput.value=t,r},t}(Vo),gh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},mh=function(e){function t(n){var r=e.call(this,n,t.TEMPLATE)||this;return r.radius=0,r.offsetX=0,r.offsetY=0,r}return gh(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:function(e){t.parentCircleRect=t.eParentCircle.getBoundingClientRect()},onDragging:function(e){return t.calculateAngleDrag(e)},onDragStop:function(){}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(""+this.degrees).onValueChange((function(e){null!=e&&""!==e||(e="0"),e=t.eAngleValue.normalizeValue(e);var n=parseFloat(e);n>180&&(n-=360),t.setValue(n)})),this.updateNumberInput(),o(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListener(this,Po.EVENT_CHANGED,(function(){t.eAngleValue.getInputElement().contains(document.activeElement)||t.updateNumberInput()}))},t.prototype.updateNumberInput=function(){var e=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(e.toString())},t.prototype.positionChildCircle=function(e){var t=this.parentCircleRect||{width:24,height:24},n=this.eChildCircle,r=t.width/2,o=t.height/2;n.style.left=r+8*Math.cos(e)+"px",n.style.top=o+8*Math.sin(e)+"px"},t.prototype.calculatePolar=function(){var e=this.offsetX,t=this.offsetY,n=Math.atan2(t,e);this.degrees=this.toDegrees(n),this.radius=Math.sqrt(e*e+t*t),this.positionChildCircle(n)},t.prototype.calculateCartesian=function(){var e=this.toRadians(this.getValue()),t=this.getRadius();this.setOffsetX(Math.cos(e)*t).setOffsetY(Math.sin(e)*t)},t.prototype.setOffsetX=function(e){return this.offsetX!==e&&(this.offsetX=e,this.calculatePolar()),this},t.prototype.setOffsetY=function(e){return this.offsetY!==e&&(this.offsetY=e,this.calculatePolar()),this},t.prototype.calculateAngleDrag=function(e){var t=this.parentCircleRect,n=t.width/2,r=t.height/2,o=e.clientX-t.left-n,i=e.clientY-t.top-r,a=Math.atan2(i,o);this.setValue(a,!0)},t.prototype.toDegrees=function(e){return e/Math.PI*180},t.prototype.toRadians=function(e){return e/180*Math.PI},t.prototype.normalizeNegativeValue=function(e){return e<0?360+e:e},t.prototype.normalizeAngle180=function(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e},t.prototype.getRadius=function(){return this.radius},t.prototype.setRadius=function(e){return this.radius===e||(this.radius=e,this.calculateCartesian()),this},t.prototype.onValueChange=function(e){var t=this;return this.addManagedListener(this,Po.EVENT_CHANGED,(function(){e(t.degrees)})),this},t.prototype.getValue=function(e){return e?this.toRadians(this.degrees):this.degrees},t.prototype.setValue=function(e,t){var n;return n=t?e:this.normalizeAngle180(this.toRadians(e)),e=this.toDegrees(n),this.degrees!==e&&(this.degrees=Math.floor(e),this.calculateCartesian(),this.positionChildCircle(n),this.dispatchEvent({type:Po.EVENT_CHANGED})),this},t.prototype.setWidth=function(e){return Wn(this.getGui(),e),this},t.prototype.destroy=function(){this.dragService.removeDragSource(this.dragListener),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-angle-select">\n <div ref="eLabel"></div>\n <div class="ag-wrapper ag-angle-select-wrapper">\n <div ref="eAngleSelectField" class="ag-angle-select-field">\n <div ref="eParentCircle" class="ag-angle-select-parent-circle">\n <div ref="eChildCircle" class="ag-angle-select-child-circle"></div>\n </div>\n </div>\n <ag-input-number-field ref="eAngleValue"></ag-input-number-field>\n </div>\n </div>',vh([ao("eLabel")],t.prototype,"eLabel",void 0),vh([ao("eParentCircle")],t.prototype,"eParentCircle",void 0),vh([ao("eChildCircle")],t.prototype,"eChildCircle",void 0),vh([ao("eAngleValue")],t.prototype,"eAngleValue",void 0),vh([de("dragService")],t.prototype,"dragService",void 0),t}(Oo),yh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bh=function(e){function t(t){return e.call(this,t,"ag-toggle-button")||this}return yh(t,e),t.prototype.setValue=function(t,n){return e.prototype.setValue.call(this,t,n),dn(this.getGui(),"ag-selected",this.getValue()),this},t}(jl),wh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ch=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},xh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return wh(t,e),t.prototype.getFirstRow=function(){var e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e=Ce.PINNED_TOP:this.rowModel.getRowCount()?(e=null,t=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e=Ce.PINNED_BOTTOM),void 0===e?null:{rowIndex:t,rowPinned:e}},t.prototype.getLastRow=function(){var e,t=null,n=this.pinnedRowModel.getPinnedBottomRowCount(),r=this.pinnedRowModel.getPinnedTopRowCount();return n?(t=Ce.PINNED_BOTTOM,e=n-1):this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageLastRow()):r&&(t=Ce.PINNED_TOP,e=r-1),void 0===e?null:{rowIndex:e,rowPinned:t}},t.prototype.getRowNode=function(e){switch(e.rowPinned){case Ce.PINNED_TOP:return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case Ce.PINNED_BOTTOM:return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},t.prototype.sameRow=function(e,t){return!e&&!t||!(e&&!t||!e&&t)&&(e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned)},t.prototype.before=function(e,t){switch(e.rowPinned){case Ce.PINNED_TOP:if(t.rowPinned!==Ce.PINNED_TOP)return!0;break;case Ce.PINNED_BOTTOM:if(t.rowPinned!==Ce.PINNED_BOTTOM)return!1;break;default:if(o(t.rowPinned))return t.rowPinned!==Ce.PINNED_TOP}return e.rowIndex<t.rowIndex},Ch([de("rowModel")],t.prototype,"rowModel",void 0),Ch([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Ch([de("paginationProxy")],t.prototype,"paginationProxy",void 0),t=Ch([pe("rowPositionUtils")],t)}(ze),Sh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Eh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Sh(t,e),t.prototype.createId=function(e){var t=e.rowIndex,n=e.rowPinned,r=e.column;return this.createIdFromValues(t,r,n)},t.prototype.createIdFromValues=function(e,t,n){return e+"."+(null==n?"null":n)+"."+t.getId()},t.prototype.equals=function(e,t){var n=e.column===t.column,r=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return n&&r&&o},t=Eh([pe("cellPositionUtils")],t)}(ze),Rh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ah=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rh(t,e),t.prototype.init=function(){this.setPinnedTopRowData(this.gridOptionsWrapper.getPinnedTopRowData()),this.setPinnedBottomRowData(this.gridOptionsWrapper.getPinnedBottomRowData())},t.prototype.isEmpty=function(e){return a(e===Ce.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows)},t.prototype.isRowsToRender=function(e){return!this.isEmpty(e)},t.prototype.getRowAtPixel=function(e,t){var n=t===Ce.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows;if(a(n))return 0;for(var r=0;r<n.length;r++){var o=n[r];if(o.rowTop+o.rowHeight-1>=e)return r}return n.length-1},t.prototype.setPinnedTopRowData=function(e){this.pinnedTopRows=this.createNodesFromData(e,!0);var t={type:Ke.EVENT_PINNED_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.setPinnedBottomRowData=function(e){this.pinnedBottomRows=this.createNodesFromData(e,!1);var t={type:Ke.EVENT_PINNED_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.createNodesFromData=function(e,t){var n=this,r=[];if(e){var o=0;e.forEach((function(e,i){var a=new Qi(n.beans);a.data=e;var s=t?Qi.ID_PREFIX_TOP_PINNED:Qi.ID_PREFIX_BOTTOM_PINNED;a.id=s+i,a.rowPinned=t?Ce.PINNED_TOP:Ce.PINNED_BOTTOM,a.setRowTop(o),a.setRowHeight(n.gridOptionsWrapper.getRowHeightForNode(a).height),a.setRowIndex(i),o+=a.rowHeight,r.push(a)}))}return r},t.prototype.getPinnedTopRowData=function(){return this.pinnedTopRows},t.prototype.getPinnedBottomRowData=function(){return this.pinnedBottomRows},t.prototype.getPinnedTopTotalHeight=function(){return this.getTotalHeight(this.pinnedTopRows)},t.prototype.getPinnedTopRowCount=function(){return this.pinnedTopRows?this.pinnedTopRows.length:0},t.prototype.getPinnedBottomRowCount=function(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0},t.prototype.getPinnedTopRow=function(e){return this.pinnedTopRows[e]},t.prototype.getPinnedBottomRow=function(e){return this.pinnedBottomRows[e]},t.prototype.forEachPinnedTopRow=function(e){a(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)},t.prototype.forEachPinnedBottomRow=function(e){a(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)},t.prototype.getPinnedBottomTotalHeight=function(){return this.getTotalHeight(this.pinnedBottomRows)},t.prototype.getTotalHeight=function(e){if(!e||0===e.length)return 0;var t=v(e);return t.rowTop+t.rowHeight},Oh([de("columnApi")],t.prototype,"columnApi",void 0),Oh([de("gridApi")],t.prototype,"gridApi",void 0),Oh([de("beans")],t.prototype,"beans",void 0),Oh([ce],t.prototype,"init",null),t=Oh([pe("pinnedRowModel")],t)}(ze),Ph=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Th=function(e){this.cellValueChanges=e},Dh=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.initialRange=n,o.finalRange=r,o}return Ph(t,e),t}(Th),kh=function(){function e(t){this.actionStack=[],this.maxStackSize=t||e.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}return e.prototype.pop=function(){return this.actionStack.pop()},e.prototype.push=function(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))},e.prototype.clear=function(){this.actionStack=[]},e.prototype.getCurrentStackSize=function(){return this.actionStack.length},e.DEFAULT_STACK_SIZE=10,e}(),Nh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ih=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellValueChanges=[],t.activeCellEdit=null,t.activeRowEdit=null,t.isPasting=!1,t.isFilling=!1,t.onCellValueChanged=function(e){var n={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},r=null!==t.activeCellEdit&&t.cellPositionUtils.equals(t.activeCellEdit,n),o=null!==t.activeRowEdit&&t.rowPositionUtils.sameRow(t.activeRowEdit,n);if(r||o||t.isPasting||t.isFilling){var i=e.rowPinned,a=e.rowIndex,s=e.column,l=e.oldValue,c=e.value,u={rowPinned:i,rowIndex:a,columnId:s.getColId(),newValue:c,oldValue:l};t.cellValueChanges.push(u)}},t.clearStacks=function(){t.undoStack.clear(),t.redoStack.clear()},t}return Nh(n,e),n.prototype.init=function(){if(this.gridOptionsWrapper.isUndoRedoCellEditing()){var e=this.gridOptionsWrapper.getUndoRedoCellEditingLimit();e<=0||(this.undoStack=new kh(e),this.redoStack=new kh(e),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addManagedListener(this.eventService,Ke.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,Ke.EVENT_MODEL_UPDATED,this.clearStacks),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,Ke.EVENT_ROW_DRAG_END,this.clearStacks))}},n.prototype.getCurrentUndoStackSize=function(){return this.undoStack?this.undoStack.getCurrentStackSize():0},n.prototype.getCurrentRedoStackSize=function(){return this.redoStack?this.redoStack.getCurrentStackSize():0},n.prototype.undo=function(){if(this.undoStack){var e=this.undoStack.pop();e&&e.cellValueChanges&&(this.processAction(e,(function(e){return e.oldValue})),e instanceof Dh?this.processRangeAndCellFocus(e.cellValueChanges,e.initialRange):this.processRangeAndCellFocus(e.cellValueChanges),this.redoStack.push(e))}},n.prototype.redo=function(){if(this.redoStack){var e=this.redoStack.pop();e&&e.cellValueChanges&&(this.processAction(e,(function(e){return e.newValue})),e instanceof Dh?this.processRangeAndCellFocus(e.cellValueChanges,e.finalRange):this.processRangeAndCellFocus(e.cellValueChanges),this.undoStack.push(e))}},n.prototype.processAction=function(e,t){var n=this;e.cellValueChanges.forEach((function(e){var r=e.rowIndex,o=e.rowPinned,i=e.columnId,a={rowIndex:r,rowPinned:o},s=n.getRowNode(a);s.displayed&&s.setDataValue(i,t(e))}))},n.prototype.processRangeAndCellFocus=function(e,t){var n;if(t){var r=t.startRow,o=t.endRow;n={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:t.startColumn.getColId()},this.setLastFocusedCell(n);var i={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:t.startColumn,columns:t.columns};this.gridApi.addCellRange(i)}else{var a=e[0],s={rowIndex:a.rowIndex,rowPinned:a.rowPinned},l=this.getRowNode(s);n={rowPinned:a.rowPinned,rowIndex:l.rowIndex,columnId:a.columnId},this.setLastFocusedCell(n)}},n.prototype.setLastFocusedCell=function(e){var n=e.rowIndex,r=e.columnId,o=e.rowPinned;this.gridApi.ensureIndexVisible(n),this.gridApi.ensureColumnVisible(r),xe.isRegistered(t.ModuleNames.RangeSelectionModule)&&this.gridApi.clearRangeSelection(),this.focusService.setFocusedCell(n,r,o,!0)},n.prototype.addRowEditingListeners=function(){var e=this;this.addManagedListener(this.eventService,Ke.EVENT_ROW_EDITING_STARTED,(function(t){e.activeRowEdit={rowIndex:t.rowIndex,rowPinned:t.rowPinned}})),this.addManagedListener(this.eventService,Ke.EVENT_ROW_EDITING_STOPPED,(function(){var t=new Th(e.cellValueChanges);e.pushActionsToUndoStack(t),e.activeRowEdit=null}))},n.prototype.addCellEditingListeners=function(){var e=this;this.addManagedListener(this.eventService,Ke.EVENT_CELL_EDITING_STARTED,(function(t){e.activeCellEdit={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned}})),this.addManagedListener(this.eventService,Ke.EVENT_CELL_EDITING_STOPPED,(function(){if(e.activeCellEdit=null,!e.activeRowEdit&&!e.isPasting&&!e.isFilling){var t=new Th(e.cellValueChanges);e.pushActionsToUndoStack(t)}}))},n.prototype.addPasteListeners=function(){var e=this;this.addManagedListener(this.eventService,Ke.EVENT_PASTE_START,(function(){e.isPasting=!0})),this.addManagedListener(this.eventService,Ke.EVENT_PASTE_END,(function(){var t=new Th(e.cellValueChanges);e.pushActionsToUndoStack(t),e.isPasting=!1}))},n.prototype.addFillListeners=function(){var e=this;this.addManagedListener(this.eventService,Ke.EVENT_FILL_START,(function(){e.isFilling=!0})),this.addManagedListener(this.eventService,Ke.EVENT_FILL_END,(function(t){var n=new Dh(e.cellValueChanges,t.initialRange,t.finalRange);e.pushActionsToUndoStack(n),e.isFilling=!1}))},n.prototype.pushActionsToUndoStack=function(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()},n.prototype.getRowNode=function(e){switch(e.rowPinned){case Ce.PINNED_TOP:return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case Ce.PINNED_BOTTOM:return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},Mh([de("focusService")],n.prototype,"focusService",void 0),Mh([de("gridApi")],n.prototype,"gridApi",void 0),Mh([de("rowModel")],n.prototype,"rowModel",void 0),Mh([de("pinnedRowModel")],n.prototype,"pinnedRowModel",void 0),Mh([de("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0),Mh([de("rowPositionUtils")],n.prototype,"rowPositionUtils",void 0),Mh([ce],n.prototype,"init",null),n=Mh([pe("undoRedoService")],n)}(ze),Lh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Gh=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Lh(n,e),n.prototype.findHeader=function(e,t){var n,r,o;if(e.column instanceof Oe?(r="getDisplayedGroup"+t,n=this.columnModel[r](e.column)):(o="getDisplayedCol"+t,n=this.columnModel[o](e.column)),n)return{column:n,headerRowIndex:e.headerRowIndex}},n.prototype.findColAtEdgeForHeaderRow=function(e,n){var r=this.columnModel.getAllDisplayedColumns(),o=r["start"===n?0:r.length-1];if(o){var i=this.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()).getRowType(e);return console.log("level="+e+" type = "+i),i==t.HeaderRowType.COLUMN_GROUP?{headerRowIndex:e,column:this.columnModel.getColumnGroupAtLevel(o,e)}:{headerRowIndex:null==i?-1:e,column:o}}},Fh([de("columnModel")],n.prototype,"columnModel",void 0),Fh([de("ctrlsService")],n.prototype,"ctrlsService",void 0),n=Fh([pe("headerPositionUtils")],n)}(ze),Hh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Wh=function(){function e(){}return e.prototype.buildColumnDefs=function(e,t,n){var r=this,o=[],i={};return e.forEach((function(e){for(var a=!0,s=r.createDefFromColumn(e,t,n),l=e.getOriginalParent();l;){var c=null;if(l.isPadding())l=l.getOriginalParent();else{var u=i[l.getGroupId()];if(u){u.children.push(s),a=!1;break}(c=r.createDefFromGroup(l))&&(c.children=[s],i[c.groupId]=c,s=c,l=l.getOriginalParent())}}a&&o.push(s)})),o},e.prototype.createDefFromGroup=function(e){var t=M(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t},e.prototype.createDefFromColumn=function(e,t,n){var r=M(e.getColDef());return r.colId=e.getColId(),r.width=e.getActualWidth(),r.rowGroup=e.isRowGroupActive(),r.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,r.pivot=e.isPivotActive(),r.pivotIndex=e.isPivotActive()?n.indexOf(e):null,r.aggFunc=e.isValueActive()?e.getAggFunc():null,r.hide=!e.isVisible()||void 0,r.pinned=e.isPinned()?e.getPinned():null,r.sort=e.getSort()?e.getSort():null,r.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,r},e=Hh([pe("columnDefFactory")],e)}(),Vh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},jh=function(){function e(){}return e.prototype.getInitialRowClasses=function(e){var t=[];return o(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),E(t,this.processClassesFromGridOptions(e.rowNode,e.scope)),E(t,this.preProcessRowClassRules(e.rowNode,e.scope)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&(e.pinned===Ce.PINNED_LEFT&&t.push("ag-cell-last-left-pinned"),e.pinned===Ce.PINNED_RIGHT&&t.push("ag-cell-first-right-pinned")),t},e.prototype.processClassesFromGridOptions=function(e,t){var n=[],r=function(e){"string"===typeof e?n.push(e):Array.isArray(e)&&e.forEach((function(e){return n.push(e)}))},o=this.gridOptionsWrapper.getRowClass();if(o){if("function"===typeof o)return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];r(o)}var i=this.gridOptionsWrapper.getRowClassFunc();i&&r(i({data:e.data,node:e,rowIndex:e.rowIndex,$scope:t,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}));return n},e.prototype.preProcessRowClassRules=function(e,t){var n=[];return this.processRowClassRules(e,t,(function(e){n.push(e)}),(function(e){})),n},e.prototype.processRowClassRules=function(e,t,n,r){var o={data:e.data,node:e,rowIndex:e.rowIndex,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),$scope:t,context:this.gridOptionsWrapper.getContext()};this.stylingService.processClassRules(this.gridOptionsWrapper.rowClassRules(),o,n,r)},e.prototype.calculateRowLevel=function(e){return e.group?e.level:e.parent?e.parent.level+1:0},Vh([de("stylingService")],e.prototype,"stylingService",void 0),Vh([de("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),e=Vh([pe("rowCssClassCalculator")],e)}(),Bh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zh=function(e){function t(n){var r=e.call(this)||this;return r.state=t.STATE_WAITING_TO_LOAD,r.version=0,r.id=n,r}return Bh(t,e),t.prototype.getId=function(){return this.id},t.prototype.load=function(){this.state=t.STATE_LOADING,this.loadFromDatasource()},t.prototype.getVersion=function(){return this.version},t.prototype.setStateWaitingToLoad=function(){this.version++,this.state=t.STATE_WAITING_TO_LOAD},t.prototype.getState=function(){return this.state},t.prototype.pageLoadFailed=function(e){this.isRequestMostRecentAndLive(e)&&(this.state=t.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)},t.prototype.success=function(e,t){this.successCommon(e,t)},t.prototype.pageLoaded=function(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})},t.prototype.isRequestMostRecentAndLive=function(e){var t=e===this.version,n=this.isAlive();return t&&n},t.prototype.successCommon=function(e,n){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(e)&&(this.state=t.STATE_LOADED,this.processServerResult(n))},t.prototype.dispatchLoadCompleted=function(e){void 0===e&&(e=!0);var n={type:t.EVENT_LOAD_COMPLETE,success:e,block:this};this.dispatchEvent(n)},t.EVENT_LOAD_COMPLETE="loadComplete",t.STATE_WAITING_TO_LOAD="needsLoading",t.STATE_LOADING="loading",t.STATE_LOADED="loaded",t.STATE_FAILED="failed",t}(ze),Uh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Xh=function(e,t){return function(n,r){t(n,r,e)}},qh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.activeBlockLoadsCount=0,t.blocks=[],t.active=!0,t}var n;return Uh(t,e),n=t,t.prototype.postConstruct=function(){this.maxConcurrentRequests=this.gridOptionsWrapper.getMaxConcurrentDatasourceRequests();var e=this.gridOptionsWrapper.getBlockLoadDebounceMillis();e&&e>0&&(this.checkBlockToLoadDebounce=Xr.debounce(this.performCheckBlocksToLoad.bind(this),e))},t.prototype.setBeans=function(e){this.logger=e.create("RowNodeBlockLoader")},t.prototype.addBlock=function(e){this.blocks.push(e),e.addEventListener(zh.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()},t.prototype.removeBlock=function(e){Xr.removeFromArray(this.blocks,e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.active=!1},t.prototype.loadComplete=function(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),0==this.activeBlockLoadsCount&&this.dispatchEvent({type:n.BLOCK_LOADER_FINISHED_EVENT})},t.prototype.checkBlockToLoad=function(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()},t.prototype.performCheckBlocksToLoad=function(){if(this.active)if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)this.logger.log("checkBlockToLoad: max loads exceeded");else{var e=null;this.blocks.forEach((function(t){t.getState()===zh.STATE_WAITING_TO_LOAD&&(e=t)})),e&&(e.load(),this.activeBlockLoadsCount++,this.printCacheStatus())}},t.prototype.getBlockState=function(){var e={};return this.blocks.forEach((function(t){var n=t.getBlockStateJson(),r=n.id,o=n.state;e[r]=o})),e},t.prototype.printCacheStatus=function(){this.logger.isLogging()&&this.logger.log("printCacheStatus: activePageLoadsCount = "+this.activeBlockLoadsCount+", blocks = "+JSON.stringify(this.getBlockState()))},t.prototype.isLoading=function(){return this.activeBlockLoadsCount>0},t.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished",Yh([ce],t.prototype,"postConstruct",null),Yh([Xh(0,ge("loggerFactory"))],t.prototype,"setBeans",null),t=n=Yh([pe("rowNodeBlockLoader")],t)}(ze),Kh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},$h=function(){function e(){}return e.prototype.doFullSort=function(e,t){var n=e.map((function(e,t){return{currentPos:t,rowNode:e}}));return n.sort(this.compareRowNodes.bind(this,t)),n.map((function(e){return e.rowNode}))},e.prototype.compareRowNodes=function(e,t,n){for(var r=t.rowNode,o=n.rowNode,i=0,a=e.length;i<a;i++){var s=e[i],l=s.sort===Ce.SORT_DESC,c=this.getValue(r,s.column),u=this.getValue(o,s.column),p=void 0,d=this.getComparator(s,r);if(p=d?d(c,u,r,o,l):Xr.defaultComparator(c,u,this.gridOptionsWrapper.isAccentedSort()),!isNaN(p)&&0!==p)return s.sort===Ce.SORT_ASC?p:-1*p}return t.currentPos-n.currentPos},e.prototype.getComparator=function(e,t){var n=e.column,r=n.getColDef().comparator;if(null!=r)return r;if(t.rowGroupColumn)return t.rowGroupColumn.getColDef().comparator;if(n.getColDef().showRowGroup){var o=!t.group&&n.getColDef().field;if(o){var i=this.columnModel.getPrimaryColumn(o);if(i)return i.getColDef().comparator}}},e.prototype.getValue=function(e,t){return this.valueService.getValue(t,e,!1,!1)},Kh([de("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),Kh([de("valueService")],e.prototype,"valueService",void 0),Kh([de("columnModel")],e.prototype,"columnModel",void 0),e=Kh([pe("rowNodeSorter")],e)}(),Qh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zh=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Jh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ready=!1,t.readyCallbacks=[],t}return Qh(t,e),t.prototype.checkReady=function(){if(this.ready=null!=this.gridCtrl&&null!=this.gridBodyCtrl&&null!=this.centerRowContainerCtrl&&null!=this.leftRowContainerCtrl&&null!=this.rightRowContainerCtrl&&null!=this.bottomCenterRowContainerCtrl&&null!=this.bottomLeftRowContainerCtrl&&null!=this.bottomRightRowContainerCtrl&&null!=this.topCenterRowContainerCtrl&&null!=this.topLeftRowContainerCtrl&&null!=this.topRightRowContainerCtrl&&null!=this.centerHeaderRowContainerCtrl&&null!=this.leftHeaderRowContainerCtrl&&null!=this.rightHeaderRowContainerCtrl&&null!=this.fakeHScrollCtrl&&null!=this.gridHeaderCtrl,this.ready){var e=this.createReadyParams();this.readyCallbacks.forEach((function(t){return t(e)})),this.readyCallbacks.length=0}},t.prototype.whenReady=function(e){this.ready?e(this.createReadyParams()):this.readyCallbacks.push(e)},t.prototype.createReadyParams=function(){return{centerRowContainerCtrl:this.centerRowContainerCtrl,leftRowContainerCtrl:this.leftRowContainerCtrl,rightRowContainerCtrl:this.rightRowContainerCtrl,bottomCenterRowContainerCtrl:this.bottomCenterRowContainerCtrl,bottomLeftRowContainerCtrl:this.bottomLeftRowContainerCtrl,bottomRightRowContainerCtrl:this.bottomRightRowContainerCtrl,topCenterRowContainerCtrl:this.topCenterRowContainerCtrl,topLeftRowContainerCtrl:this.topLeftRowContainerCtrl,topRightRowContainerCtrl:this.topRightRowContainerCtrl,centerHeaderRowContainerCtrl:this.centerHeaderRowContainerCtrl,leftHeaderRowContainerCtrl:this.leftHeaderRowContainerCtrl,rightHeaderRowContainerCtrl:this.rightHeaderRowContainerCtrl,fakeHScrollCtrl:this.fakeHScrollCtrl,gridBodyCtrl:this.gridBodyCtrl,gridCtrl:this.gridCtrl,gridHeaderCtrl:this.gridHeaderCtrl}},t.prototype.registerFakeHScrollCtrl=function(e){this.fakeHScrollCtrl=e,this.checkReady()},t.prototype.registerGridHeaderCtrl=function(e){this.gridHeaderCtrl=e,this.checkReady()},t.prototype.registerCenterRowContainerCtrl=function(e){this.centerRowContainerCtrl=e,this.checkReady()},t.prototype.registerLeftRowContainerCtrl=function(e){this.leftRowContainerCtrl=e,this.checkReady()},t.prototype.registerRightRowContainerCtrl=function(e){this.rightRowContainerCtrl=e,this.checkReady()},t.prototype.registerTopCenterRowContainerCtrl=function(e){this.topCenterRowContainerCtrl=e,this.checkReady()},t.prototype.registerTopLeftRowContainerCon=function(e){this.topLeftRowContainerCtrl=e,this.checkReady()},t.prototype.registerTopRightRowContainerCtrl=function(e){this.topRightRowContainerCtrl=e,this.checkReady()},t.prototype.registerBottomCenterRowContainerCtrl=function(e){this.bottomCenterRowContainerCtrl=e,this.checkReady()},t.prototype.registerBottomLeftRowContainerCtrl=function(e){this.bottomLeftRowContainerCtrl=e,this.checkReady()},t.prototype.registerBottomRightRowContainerCtrl=function(e){this.bottomRightRowContainerCtrl=e,this.checkReady()},t.prototype.registerHeaderContainer=function(e,t){switch(t){case Ce.PINNED_LEFT:this.leftHeaderRowContainerCtrl=e;break;case Ce.PINNED_RIGHT:this.rightHeaderRowContainerCtrl=e;break;default:this.centerHeaderRowContainerCtrl=e}this.checkReady()},t.prototype.registerGridBodyCtrl=function(e){this.gridBodyCtrl=e,this.checkReady()},t.prototype.registerGridCtrl=function(e){this.gridCtrl=e,this.checkReady()},t.prototype.getFakeHScrollCtrl=function(){return this.fakeHScrollCtrl},t.prototype.getGridHeaderCtrl=function(){return this.gridHeaderCtrl},t.prototype.getGridCtrl=function(){return this.gridCtrl},t.prototype.getCenterRowContainerCtrl=function(){return this.centerRowContainerCtrl},t.prototype.getTopCenterRowContainerCtrl=function(){return this.topCenterRowContainerCtrl},t.prototype.getBottomCenterRowContainerCtrl=function(){return this.bottomCenterRowContainerCtrl},t.prototype.getGridBodyCtrl=function(){return this.gridBodyCtrl},t.prototype.getHeaderRowContainerCtrls=function(){return[this.leftHeaderRowContainerCtrl,this.rightHeaderRowContainerCtrl,this.centerHeaderRowContainerCtrl]},t.prototype.getHeaderRowContainerCtrl=function(e){switch(e){case Ce.PINNED_LEFT:return this.leftHeaderRowContainerCtrl;case Ce.PINNED_RIGHT:return this.rightHeaderRowContainerCtrl;default:return this.centerHeaderRowContainerCtrl}},t=Zh([pe("ctrlsService")],t)}(ze),ef=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tf=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},nf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registry={},t}return ef(t,e),t.prototype.register=function(e){this.registry[e.controllerName]=e.controllerClass},t.prototype.getInstance=function(e){var t=this.registry[e];if(null!=t)return new t},t=tf([pe("ctrlsFactory")],t)}(ze),rf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),of=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},af=function(e){function t(){return e.call(this)||this}return rf(t,e),t.prototype.setComp=function(e,t,n,r){this.view=e,this.eViewport=n,this.eContainer=r,this.eGui=t,this.addManagedListener(this.eventService,Ke.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged();var o=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,o),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,o),this.addManagedListener(this.gridOptionsWrapper,es.PROP_DOM_LAYOUT,o),this.setFakeHScrollSpacerWidths(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()),this.ctrlsService.registerFakeHScrollCtrl(this)},t.prototype.addActiveListenerToggles=function(){var e=this;["mouseenter","mousedown","touchstart"].forEach((function(t){return e.addManagedListener(e.eGui,t,(function(){return e.view.addOrRemoveCssClass("ag-scrollbar-active",!0)}))})),["mouseleave","mouseup","touchend"].forEach((function(t){return e.addManagedListener(e.eGui,t,(function(){return e.view.addOrRemoveCssClass("ag-scrollbar-active",!1)}))}))},t.prototype.postConstruct=function(){this.enableRtl=this.gridOptionsWrapper.isEnableRtl(),this.invisibleScrollbar=on()},t.prototype.onScrollVisibilityChanged=function(){this.setScrollVisible(),this.setFakeHScrollSpacerWidths()},t.prototype.hideAndShowInvisibleScrollAsNeeded=function(){var e=this;this.addManagedListener(this.eventService,Ke.EVENT_BODY_SCROLL,(function(t){"horizontal"===t.direction&&e.view.addOrRemoveCssClass("ag-scrollbar-scrolling",!0)})),this.addManagedListener(this.eventService,Ke.EVENT_BODY_SCROLL_END,(function(){return e.view.addOrRemoveCssClass("ag-scrollbar-scrolling",!1)}))},t.prototype.setFakeHScrollSpacerWidths=function(){var e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.columnModel.getDisplayedColumnsRightWidth(),n=!this.enableRtl&&e,r=this.gridOptionsWrapper.getScrollbarWidth();n&&(t+=r),this.view.setRightSpacerFixedWidth(t),this.view.includeRightSpacerScrollerCss("ag-scroller-corner",t<=r);var o=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&e&&(o+=r),this.view.setLeftSpacerFixedWidth(o),this.view.includeLeftSpacerScrollerCss("ag-scroller-corner",o<=r)},t.prototype.setScrollVisible=function(){var e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,n=this.gridOptionsWrapper.isSuppressHorizontalScroll(),r=e&&this.gridOptionsWrapper.getScrollbarWidth()||0,o=n?0:0===r&&t?15:r,i=qt()&&e;this.view.addOrRemoveCssClass("ag-scrollbar-invisible",t),this.view.setHeight(o),this.view.setViewportHeight(o+(i?1:0)),this.view.setContainerHeight(o)},t.prototype.getViewport=function(){return this.eViewport},t.prototype.getContainer=function(){return this.eContainer},of([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),of([de("columnModel")],t.prototype,"columnModel",void 0),of([de("ctrlsService")],t.prototype,"ctrlsService",void 0),of([ce],t.prototype,"postConstruct",null),t}(ze),sf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lf=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},cf=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return sf(t,e),t.prototype.postConstruct=function(){var e=this,t={addOrRemoveCssClass:function(t,n){return e.addOrRemoveCssClass(t,n)},setHeight:function(t){return Vn(e.getGui(),t)},setContainerHeight:function(t){return Vn(e.eContainer,t)},setViewportHeight:function(t){return Vn(e.eViewport,t)},setRightSpacerFixedWidth:function(t){return Wn(e.eRightSpacer,t)},setLeftSpacerFixedWidth:function(t){return Wn(e.eLeftSpacer,t)},includeLeftSpacerScrollerCss:function(t,n){return dn(e.eLeftSpacer,t,n)},includeRightSpacerScrollerCss:function(t,n){return dn(e.eRightSpacer,t,n)}};this.createManagedBean(new af).setComp(t,this.getGui(),this.eViewport,this.eContainer),this.createManagedBean(new gl((function(t){return e.eContainer.style.width=t+"px"})))},t.TEMPLATE='<div class="ag-body-horizontal-scroll" aria-hidden="true">\n <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>\n <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">\n <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>\n </div>\n <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>\n </div>',lf([ao("eLeftSpacer")],t.prototype,"eLeftSpacer",void 0),lf([ao("eRightSpacer")],t.prototype,"eRightSpacer",void 0),lf([ao("eViewport")],t.prototype,"eViewport",void 0),lf([ao("eContainer")],t.prototype,"eContainer",void 0),lf([ce],t.prototype,"postConstruct",null),t}(io),uf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pf=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},df=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uf(t,e),t.prototype.postConstruct=function(){var e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,Ke.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.gridOptionsWrapper,es.PROP_DOM_LAYOUT,e)},t.prototype.checkContainerWidths=function(){var e=this.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_PRINT,t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),n=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:Ke.EVENT_LEFT_PINNED_WIDTH_CHANGED})),n!=this.rightWidth&&(this.rightWidth=n,this.eventService.dispatchEvent({type:Ke.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))},t.prototype.getPinnedRightWidth=function(){return this.rightWidth},t.prototype.getPinnedLeftWidth=function(){return this.leftWidth},pf([de("columnModel")],t.prototype,"columnModel",void 0),pf([ce],t.prototype,"postConstruct",null),t=pf([pe("pinnedWidthService")],t)}(ze),hf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ff=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},gf=function(e){function t(t){var n=e.call(this,'<div class="ag-popup-editor" tabindex="-1"/>')||this;return n.params=t,n}return hf(t,e),t.prototype.postConstruct=function(){this.gridOptionsWrapper.setDomData(this.getGui(),t.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()},t.prototype.addKeyDownListener=function(){var e=this,t=this.getGui(),n=this.params;this.addManagedListener(t,"keydown",(function(t){Fr(e.gridOptionsWrapper,t,n.node,n.column,!0)||n.onKeyDown(t)}))},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",ff([ce],t.prototype,"postConstruct",null),t}(Ai),vf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mf=function(){return mf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mf.apply(this,arguments)},yf=function(e){function t(t,n,r,o,i,a,s){var l=e.call(this)||this;l.scope=null,l.rendererVersion=0,l.editorVersion=0,l.scope=t,l.beans=n,l.column=r.getColumn(),l.rowNode=r.getRowNode(),l.rowCtrl=r.getRowCtrl(),l.autoHeightCell=o,l.eRow=a,l.setTemplate('<div comp-id="'+l.getCompId()+'"/>');var c=l.getGui(),u=c.style;l.eCellValue=c;var p=function(e,t,n){var r=n||c;null!=t&&""!=t?r.setAttribute(e,t):r.removeAttribute(e)},d={addOrRemoveCssClass:function(e,t){return l.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return Ln(c,e)},setAriaSelected:function(e){return br(c,e)},setAriaExpanded:function(e){return lr(c,e)},getFocusableElement:function(){return l.getFocusableElement()},setLeft:function(e){return u.left=e},setWidth:function(e){return u.width=e},setAriaColIndex:function(e){return gr(l.getGui(),e)},setHeight:function(e){return u.height=e},setZIndex:function(e){return u.zIndex=e},setTabIndex:function(e){return p("tabindex",e.toString())},setRole:function(e){return tr(c,e)},setColId:function(e){return p("col-id",e)},setTitle:function(e){return p("title",e)},setUnselectable:function(e){return p("unselectable",e,l.eCellValue)},setTransition:function(e){return u.transition=e||""},setIncludeSelection:function(e){return l.includeSelection=e},setIncludeRowDrag:function(e){return l.includeRowDrag=e},setIncludeDndSource:function(e){return l.includeDndSource=e},setForceWrapper:function(e){return l.forceWrapper=e},setRenderDetails:function(e,t,n){return l.setRenderDetails(e,t,n)},setEditDetails:function(e,t,n){return l.setEditDetails(e,t,n)},getCellEditor:function(){return l.cellEditor||null},getCellRenderer:function(){return l.cellRenderer||null},getParentOfValue:function(){return l.eCellValue}};return l.cellCtrl=r,r.setComp(d,l.scope,l.getGui(),i,s),l}return vf(t,e),t.prototype.setRenderDetails=function(e,t,n){if(!(this.cellEditor&&!this.cellEditorPopupWrapper)){this.firstRender=null==this.firstRender;var r=this.isUsingAngular1Template(),o=this.setupControlsWrapper();if(e)!(n||o)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e));else this.destroyRenderer(),r?this.insertValueUsingAngular1Template():this.insertValueWithoutCellRenderer(t)}},t.prototype.setEditDetails=function(e,t,n){e?this.createCellEditorInstance(e,t,n):this.destroyEditor()},t.prototype.removeControlsWrapper=function(){this.eCellValue=this.getGui(),this.eCellWrapper=null,this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)},t.prototype.setupControlsWrapper=function(){var e=this.includeRowDrag||this.includeDndSource||this.includeSelection||this.forceWrapper;return this.addOrRemoveCssClass("ag-cell-value",!e),e&&!this.eCellWrapper?(this.addControlsWrapper(),true):!(e||!this.eCellWrapper)&&(this.removeControlsWrapper(),true)},t.prototype.addControlsWrapper=function(){this.getGui().innerHTML='<div ref="eCellWrapper" class="ag-cell-wrapper" role="presentation">\n <span ref="eCellValue" class="ag-cell-value" role="presentation"></span>\n </div>',this.eCellValue=this.getRefElement("eCellValue"),this.eCellWrapper=this.getRefElement("eCellWrapper"),this.forceWrapper||this.eCellValue.setAttribute("unselectable","on");var e=this.eCellValue.id="cell-"+this.getCompId(),t=[];this.includeRowDrag&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue),t.push(this.checkboxSelectionComp.getCheckboxId())),t.push(e),ar(this.getGui(),t.join(" "))},t.prototype.createCellEditorInstance=function(e,t,n){var r=this,o=this.editorVersion,a=e.newAgStackInstance();if(a){var s=e.params;a.then((function(e){return r.afterCellEditorCreated(o,e,s,t,n)})),i(this.cellEditor)&&s.cellStartedEdit&&this.cellCtrl.focusCell(!0)}},t.prototype.insertValueWithoutCellRenderer=function(e){var t=null!=e?ot(e):null;null!=t?this.eCellValue.innerHTML=t:On(this.eCellValue)},t.prototype.insertValueUsingAngular1Template=function(){var e,t=this,n=this.column.getColDef(),r=n.template,o=n.templateUrl;null!=r?e=r:null!=o&&(e=this.beans.templateService.getTemplate(o,(function(){return t.cellCtrl.refreshCell({forceRefresh:!0})}))),null!=e&&(this.eCellValue.innerHTML=e,this.updateAngular1ScopeAndCompile())},t.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer(),this.destroyEditor()},t.prototype.destroyRenderer=function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),An(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++},t.prototype.destroyEditor=function(){var e=this.beans.context;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),An(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++},t.prototype.refreshCellRenderer=function(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh)return!1;if(this.cellRendererClass!==e.componentClass)return!1;var t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t},t.prototype.createCellRendererInstance=function(e){var t=this,n=this.beans.gridOptionsWrapper.isAngularCompileRows(),r=this.beans.gridOptionsWrapper.isSuppressAnimationFrame(),o=!n&&!r&&!this.autoHeightCell,i=this.rendererVersion,a=e.componentClass,s=function(){if(!(t.rendererVersion!==i||!t.isAlive())){var n=e.newAgStackInstance(),r=t.afterCellRendererCreated.bind(t,i,a);n&&n.then(r)}};o&&this.firstRender?this.beans.animationFrameService.createTask(s,this.rowNode.rowIndex,"createTasksP2"):s()},t.prototype.isUsingAngular1Template=function(){var e=this.column.getColDef();return null!=e.template||null!=e.templateUrl},t.prototype.getCtrl=function(){return this.cellCtrl},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getCellRenderer=function(){return this.cellRenderer},t.prototype.getCellEditor=function(){return this.cellEditor},t.prototype.afterCellRendererCreated=function(e,t,n){this.isAlive()&&e===this.rendererVersion?(this.cellRenderer=n,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui&&(On(this.eCellValue),this.eCellValue.appendChild(this.cellRendererGui),this.updateAngular1ScopeAndCompile())):this.beans.context.destroyBean(n)},t.prototype.afterCellEditorCreated=function(e,t,n,r,o){if(e!==this.editorVersion)this.beans.context.destroyBean(t);else{if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return this.beans.context.destroyBean(t),void this.cellCtrl.stopEditing();if(!t.getGui)return console.warn("AG Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method"),void this.beans.context.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui(),r||void 0!==t.isPopup&&t.isPopup()?(r||this.cellCtrl.hackSayEditingInPopup(),this.addPopupCellEditor(n,o)):this.addInCellEditor(),t.afterGuiAttached&&t.afterGuiAttached()}},t.prototype.addInCellEditor=function(){var e=this.getGui();e.contains(document.activeElement)&&e.focus(),this.destroyRenderer(),this.removeControlsWrapper(),this.clearCellElement(),this.cellEditorGui&&e.appendChild(this.cellEditorGui)},t.prototype.addPopupCellEditor=function(e,t){var n=this;this.beans.gridOptionsWrapper.isFullRowEdit()&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var r=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new gf(e));var o=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&o.appendChild(this.cellEditorGui);var i=this.beans.popupService,a=this.beans.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus(),s=(null!=t||r.getPopupPosition&&r.getPopupPosition(),{column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),ePopup:o,keepWithinBounds:!0}),l="under"===t?i.positionPopupUnderComponent.bind(i,s):i.positionPopupOverComponent.bind(i,s),c=this.beans.gridOptionsWrapper.getLocaleTextFunc(),u=i.addPopup({modal:a,eChild:o,closeOnEsc:!0,closedCallback:function(){n.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:l,ariaLabel:c("ariaLabelCellEditor","Cell Editor")});u&&(this.hideEditorPopup=u.hideFunc)},t.prototype.detach=function(){this.eRow.removeChild(this.getGui())},t.prototype.destroy=function(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControlsWrapper(),this.angularCompiledElement&&(this.angularCompiledElement.remove(),this.angularCompiledElement=void 0),e.prototype.destroy.call(this)},t.prototype.clearCellElement=function(){var e=this.getGui();e.contains(document.activeElement)&&!qt()&&e.focus({preventScroll:!0}),On(e)},t.prototype.updateAngular1ScopeAndCompile=function(){this.beans.gridOptionsWrapper.isAngularCompileRows()&&this.scope&&(this.scope.data=mf({},this.rowNode.data),this.angularCompiledElement&&this.angularCompiledElement.remove(),this.angularCompiledElement=this.beans.$compile(this.eCellValue.children)(this.scope),this.beans.ctrlsService.getGridBodyCtrl().requestAngularApply())},t}(io),bf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wf=function(e){function t(t,n,r){var o=e.call(this)||this;o.cellComps={},o.beans=n,o.rowCtrl=t,o.setTemplate('<div comp-id="'+o.getCompId()+'" style="'+o.getInitialStyle()+'"/>');var i=o.getGui(),a=i.style,s={setDisplay:function(e){null==e?a.removeProperty("display"):a.setProperty("display","none")},setDomOrder:function(e){return o.domOrder=e},setCellCtrls:function(e){return o.setCellCtrls(e)},showFullWidth:function(e){return o.showFullWidth(e)},getFullWidthCellRenderer:function(){return o.getFullWidthCellRenderer()},addOrRemoveCssClass:function(e,t){return o.addOrRemoveCssClass(e,t)},setAriaExpanded:function(e){return lr(i,e)},setUserStyles:function(e){return Ln(i,e)},setAriaSelected:function(e){return br(i,e)},setAriaLabel:function(e){or(i,null==e?"":e)},setHeight:function(e){return a.height=e},setTop:function(e){return a.top=e},setTransform:function(e){return a.transform=e},setRowIndex:function(e){return i.setAttribute("row-index",e)},setRole:function(e){return tr(i,e)},setAriaRowIndex:function(e){return hr(o.getGui(),e)},setRowId:function(e){return i.setAttribute("row-id",e)},setRowBusinessKey:function(e){return i.setAttribute("row-business-key",e)},setTabIndex:function(e){return i.setAttribute("tabindex",e.toString())}};return t.setComp(s,o.getGui(),r),o}return bf(t,e),t.prototype.getInitialStyle=function(){var e=this.rowCtrl.getInitialTransform(),t=this.rowCtrl.getInitialRowTop();return e?"transform: "+e:"top: "+t},t.prototype.showFullWidth=function(e){var t=this,n=e.newAgStackInstance(this.rowCtrl.getFullWidthCellRendererType());n&&n.then((function(e){if(t.isAlive()){var n=e.getGui();t.getGui().appendChild(n),t.rowCtrl.getRowType()===ls.FullWidthDetail&&t.rowCtrl.setupDetailRowAutoHeight(n),t.setFullWidthRowComp(e)}else t.beans.context.destroyBean(e)}))},t.prototype.setCellCtrls=function(e){var t=this,n=V({},this.cellComps);e.forEach((function(e){var r=e.getInstanceId();null==t.cellComps[r]?t.newCellComp(e):n[r]=null}));var r=H(n).filter((function(e){return null!=e}));this.destroyCells(r),this.ensureDomOrder(e)},t.prototype.ensureDomOrder=function(e){var t=this;if(this.domOrder){var n=[];e.forEach((function(e){var r=t.cellComps[e.getInstanceId()];r&&n.push(r.getGui())})),Mn(this.getGui(),n)}},t.prototype.newCellComp=function(e){var t=new yf(this.rowCtrl.getScope(),this.beans,e,!1,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui())},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyAllCells()},t.prototype.destroyAllCells=function(){var e=H(this.cellComps).filter((function(e){return null!=e}));this.destroyCells(e)},t.prototype.setFullWidthRowComp=function(e){var t=this;this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc((function(){t.fullWidthCellRenderer=t.beans.context.destroyBean(t.fullWidthCellRenderer)}))},t.prototype.getFullWidthCellRenderer=function(){return this.fullWidthCellRenderer},t.prototype.destroyCells=function(e){var t=this;e.forEach((function(e){if(e){var n=e.getCtrl().getInstanceId();t.cellComps[n]===e&&(e.detach(),e.destroy(),t.cellComps[n]=null)}}))},t}(io),Cf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xf=function(){return xf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},xf.apply(this,arguments)},Sf=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};var Ef=function(e){function n(){var n=e.call(this,function(){var e=io.elementGettingCreated.getAttribute("name"),n=mu.getRowContainerCssClasses(e),r=e===t.RowContainerName.CENTER,o=e===t.RowContainerName.TOP_CENTER||e===t.RowContainerName.BOTTOM_CENTER;return r?'<div class="'+n.wrapper+'" ref="eWrapper" role="presentation" unselectable="on">\n <div class="'+n.viewport+'" ref="eViewport" role="presentation">\n <div class="'+n.container+'" ref="eContainer" role="rowgroup" unselectable="on"></div>\n </div>\n </div>':o?'<div class="'+n.viewport+'" ref="eViewport" role="presentation" unselectable="on">\n <div class="'+n.container+'" ref="eContainer" role="presentation" unselectable="on"></div>\n </div>':'<div class="'+n.container+'" ref="eContainer" role="presentation" unselectable="on"></div>'}())||this;return n.rowComps={},n.name=io.elementGettingCreated.getAttribute("name"),n}return Cf(n,e),n.prototype.postConstruct=function(){var e=this,t={setViewportHeight:function(t){return e.eViewport.style.height=t},setRowCtrls:function(t){return e.setRowCtrls(t)},setDomOrder:function(t){e.domOrder=t},setContainerWidth:function(t){return e.eContainer.style.width=t}};this.createManagedBean(new mu(this.name)).setComp(t,this.eContainer,this.eViewport,this.eWrapper)},n.prototype.preDestroy=function(){this.setRowCtrls([])},n.prototype.setRowCtrls=function(e){var t=this,n=xf({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;e.forEach((function(e){var r=e.getInstanceId(),o=n[r];if(o)t.rowComps[r]=o,delete n[r],t.ensureDomOrder(o.getGui());else{var i=t.newRowComp(e);t.rowComps[r]=i,t.appendRow(i.getGui())}})),H(n).forEach((function(e){t.eContainer.removeChild(e.getGui()),e.destroy()}))},n.prototype.appendRow=function(e){this.domOrder?In(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e},n.prototype.ensureDomOrder=function(e){this.domOrder&&(Nn(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},n.prototype.newRowComp=function(e){var t=mu.getPinned(this.name);return new wf(e,this.beans,t)},Sf([de("beans")],n.prototype,"beans",void 0),Sf([ao("eViewport")],n.prototype,"eViewport",void 0),Sf([ao("eContainer")],n.prototype,"eContainer",void 0),Sf([ao("eWrapper")],n.prototype,"eWrapper",void 0),Sf([ce],n.prototype,"postConstruct",null),Sf([ue],n.prototype,"preDestroy",null),n}(io),_f=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rf=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Of=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.events=[],t}return _f(t,e),t.prototype.postConstruct=function(){this.rowModel.getType()==Ce.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel)},t.prototype.dispatchExpanded=function(e){var t=this;this.events.push(e),null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce((function(){t.clientSideRowModel&&t.clientSideRowModel.onRowGroupOpened(),t.events.forEach((function(e){return t.eventService.dispatchEvent(e)})),t.events=[]}))),this.dispatchExpandedDebounced()},Rf([de("animationFrameService")],t.prototype,"animationFrameService",void 0),Rf([de("rowModel")],t.prototype,"rowModel",void 0),Rf([ce],t.prototype,"postConstruct",null),t=Rf([pe("rowNodeEventThrottle")],t)}(ze),Af=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pf=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Tf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Af(t,e),t.prototype.hideActiveMenu=function(){this.hidePopup&&this.hidePopup()},t.prototype.showMenuAfterMouseEvent=function(e,t){var n=this;this.showPopup(e,(function(r){n.popupService.positionPopupUnderMouseEvent({column:e,type:"columnMenu",mouseEvent:t,ePopup:r})}),t.target)},t.prototype.showMenuAfterButtonClick=function(e,t,n){var r=this;this.showPopup(e,(function(o){r.popupService.positionPopupUnderComponent({type:n,eventSource:t,ePopup:o,keepWithinBounds:!0,column:e})}),t)},t.prototype.showPopup=function(e,t,n){var r,o=this,i=this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU"),a=document.createElement("div");tr(a,"presentation"),un(a,"ag-menu"),this.tabListener=this.addManagedListener(a,"keydown",(function(e){return o.trapFocusWithin(e,a)})),i.guiPromise.then((function(e){return a.appendChild(e)}));var s=n||this.ctrlsService.getGridBodyCtrl().getGui(),l=this.gridOptionsWrapper.getLocaleTextFunc(),c=this.popupService.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:function(t){e.setMenuVisible(!1,"contextMenu");var r=t instanceof KeyboardEvent;if(o.tabListener&&(o.tabListener=o.tabListener()),r&&n&&Pn(n)){var i=o.focusService.findTabbableParent(n);i&&i.focus()}},positionCallback:function(){return t(a)},anchorToElement:s,ariaLabel:l("ariaLabelColumnMenu","Column Menu")});c&&(this.hidePopup=r=c.hideFunc),i.filterPromise.then((function(e){t(a),e.afterGuiAttached&&e.afterGuiAttached({container:"columnMenu",hidePopup:r})})),e.setMenuVisible(!0,"contextMenu")},t.prototype.trapFocusWithin=function(e,t){e.keyCode!==mo.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))},t.prototype.isMenuEnabled=function(e){return e.isFilterAllowed()},Pf([de("filterManager")],t.prototype,"filterManager",void 0),Pf([de("popupService")],t.prototype,"popupService",void 0),Pf([de("focusService")],t.prototype,"focusService",void 0),Pf([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t=Pf([pe("menuFactory")],t)}(ze),Df=function(){function e(e,t,n){t?(this.gridOptions=t,(new kf).create(e,t,(function(t){var n=new lp(e);t.createBean(n)}),n)):console.error("AG Grid: no gridOptions provided to the grid")}return e.prototype.destroy=function(){this.gridOptions&&this.gridOptions.api&&this.gridOptions.api.destroy()},e}(),kf=function(){function e(){}return e.prototype.create=function(e,n,r,o){var i=this,a=!!n.debug,s=this.getRegisteredModules(o),l=this.createBeansList(n.rowModelType,s),c=this.createProvidedBeans(e,n,o);if(l){var u={providedBeanInstances:c,beanClasses:l,debug:a},p=new Uu("AG Grid",(function(){return n.debug})),d=new Uu("Context",(function(){return u.debug})),h=new se(u,d),f=h.getBean("beans");this.registerModuleUserComponents(f,s),this.registerStackComponents(f,s),this.registerControllers(f,s),r(h),f.ctrlsService.whenReady((function(){i.setColumnsAndData(f),i.dispatchGridReadyEvent(f,n);var e=xe.isRegistered(t.ModuleNames.EnterpriseCoreModule);p.log("initialised successfully, enterprise = "+e)}))}},e.prototype.registerControllers=function(e,t){t.forEach((function(t){t.controllers&&t.controllers.forEach((function(t){return e.ctrlsFactory.register(t)}))}))},e.prototype.registerStackComponents=function(e,t){var n=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(n)},e.prototype.getRegisteredModules=function(e){var t=e?e.modules:null,n=xe.getRegisteredModules(),r=[],o={};function i(e,t){var n;o[(n=t).moduleName]||(o[n.moduleName]=!0,r.push(n),xe.register(n,e)),t.dependantModules&&t.dependantModules.forEach(i.bind(null,e))}return t&&t.forEach(i.bind(null,!0)),n&&n.forEach(i.bind(null,!xe.isPackageBased())),r},e.prototype.registerModuleUserComponents=function(e,t){this.extractModuleEntity(t,(function(e){return e.userComponents?e.userComponents:[]})).forEach((function(t){e.userComponentRegistry.registerDefaultComponent(t.componentName,t.componentClass)}))},e.prototype.createProvidedBeans=function(e,t,n){var r=n?n.frameworkOverrides:null;i(r)&&(r=new Op);var o={gridOptions:t,eGridDiv:e,$scope:n?n.$scope:null,$compile:n?n.$compile:null,globalEventListener:n?n.globalEventListener:null,frameworkOverrides:r};return n&&n.providedBeanInstances&&V(o,n.providedBeanInstances),o},e.prototype.createAgStackComponentsList=function(e){var t=[{componentName:"AgCheckbox",componentClass:jl},{componentName:"AgRadioButton",componentClass:_p},{componentName:"AgToggleButton",componentClass:bh},{componentName:"AgInputTextField",componentClass:eh},{componentName:"AgInputTextArea",componentClass:nh},{componentName:"AgInputNumberField",componentClass:dh},{componentName:"AgInputRange",componentClass:fh},{componentName:"AgSelect",componentClass:Go},{componentName:"AgSlider",componentClass:ih},{componentName:"AgAngleSelect",componentClass:mh},{componentName:"AgColorPicker",componentClass:uh},{componentName:"AgGridBody",componentClass:Cu},{componentName:"AgHeaderRoot",componentClass:mc},{componentName:"AgPagination",componentClass:Nd},{componentName:"AgOverlayWrapper",componentClass:Hd},{componentName:"AgGroupComponent",componentClass:jd},{componentName:"AgPanel",componentClass:qd},{componentName:"AgDialog",componentClass:Zd},{componentName:"AgRowContainer",componentClass:Ef},{componentName:"AgFakeHorizontalScroll",componentClass:cf}],n=this.extractModuleEntity(e,(function(e){return e.agStackComponents?e.agStackComponents:[]}));return t=t.concat(n)},e.prototype.createBeansList=function(e,t){var n=this.getRowModelClass(e,t);if(n){var r=[n,ys,xh,_h,Gh,qp,Eu,Aa,sd,ud,Ld,za,Od,Qu,Ah,pp,Rt,we,es,Wu,is,Cc,ft,cl,Up,Bs,Au,qe,Du,od,Sd,Qp,Ec,zu,St,qu,Tf,ra,ss,Iu,mp,vd,wp,Sp,Np,Tp,fp,Lp,Hp,Td,jp,ed,bd,Ih,Mt,Wh,jh,qh,$h,Jh,df,Of,nf],o=this.extractModuleEntity(t,(function(e){return e.beans?e.beans:[]}));r.push.apply(r,o);var i=[];return r.forEach((function(e){i.indexOf(e)<0&&i.push(e)})),i}},e.prototype.extractModuleEntity=function(e,t){return[].concat.apply([],e.map(t))},e.prototype.setColumnsAndData=function(e){var t=e.gridOptionsWrapper.getColumnDefs();e.columnModel.setColumnDefs(t||[],"gridInitializing"),e.rowModel.start()},e.prototype.dispatchGridReadyEvent=function(e,t){var n={type:Ke.EVENT_GRID_READY,api:t.api,columnApi:t.columnApi};e.eventService.dispatchEvent(n)},e.prototype.getRowModelClass=function(e,n){e||(e=Ce.ROW_MODEL_TYPE_CLIENT_SIDE);var r={};n.forEach((function(e){k(e.rowModels,(function(e,t){r[e]=t}))}));var i=r[e];if(o(i))return i;e===Ce.ROW_MODEL_TYPE_INFINITE&&console.error('AG Grid: Row Model "Infinite" not found. Please ensure the '+t.ModuleNames.InfiniteRowModelModule+" is registered.';"),console.error("AG Grid: could not find matching row model for rowModelType "+e),e===Ce.ROW_MODEL_TYPE_VIEWPORT&&console.error('AG Grid: Row Model "Viewport" not found. Please ensure the AG Grid Enterprise Module '+t.ModuleNames.ViewportRowModelModule+" is registered.';"),e===Ce.ROW_MODEL_TYPE_SERVER_SIDE&&console.error('AG Grid: Row Model "Server Side" not found. Please ensure the AG Grid Enterprise Module '+t.ModuleNames.ServerSideRowModelModule+" is registered.';"),e===Ce.ROW_MODEL_TYPE_CLIENT_SIDE&&console.error('AG Grid: Row Model "Client Side" not found. Please ensure the '+t.ModuleNames.ClientSideRowModelModule+" is registered.';")},e}();function Nf(e,t,n,r){var o,i=r.agGrid;if(o=t.$eval(i)){var a=e[0],s=new Df(a,o,{$scope:t,$compile:n}),l=i+".quickFilterText",c=t.$watch(l,(function(e){o.api.setQuickFilter(e)}));t.$on("$destroy",(function(){c(),s&&s.destroy(),s=null}))}else console.warn("WARNING - grid options for AG Grid not found. Please ensure the attribute ag-grid points to a valid object on the scope")}var Mf=!1;var If,Lf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ff=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Gf=function(e){function t(n){var r=e.call(this,t.getTemplate(n.cssClass))||this;return r.items=[],r.params=n,n.items&&n.items.forEach((function(e){return r.addItem(e)})),r}return Lf(t,e),t.prototype.postConstruct=function(){this.createManagedBean(new Co(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))},t.getTemplate=function(e){return'<div class="ag-tabs '+e+'">\n <div ref="eHeader" role="tablist" class="ag-tabs-header '+(e?e+"-header":"")+'"></div>\n <div ref="eBody" role="presentation" class="ag-tabs-body '+(e?e+"-body":"")+'"></div>\n </div>'},t.prototype.handleKeyDown=function(e){switch(e.keyCode){case mo.RIGHT:case mo.LEFT:if(!this.eHeader.contains(document.activeElement))return;var t=this.items.indexOf(this.activeItem),n=e.keyCode===mo.RIGHT?Math.min(t+1,this.items.length-1):Math.max(t-1,0);if(t===n)return;e.preventDefault();var r=this.items[n];this.showItemWrapper(r),r.eHeaderButton.focus();break;case mo.UP:case mo.DOWN:e.stopPropagation()}},t.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented){var t=this,n=t.focusService,r=t.eHeader,o=t.eBody,i=t.activeItem,a=document.activeElement;if(e.preventDefault(),r.contains(a))n.focusInto(o,e.shiftKey);else if(n.isFocusUnderManagedComponent(o))i.eHeaderButton.focus();else{var s=n.findNextFocusableElement(o,!1,e.shiftKey);s?s.focus():i.eHeaderButton.focus()}}},t.prototype.setAfterAttachedParams=function(e){this.afterAttachedParams=e},t.prototype.showFirstItem=function(){this.items.length>0&&this.showItemWrapper(this.items[0])},t.prototype.addItem=function(e){var t=document.createElement("span");tr(t,"tab"),t.setAttribute("tabIndex","-1"),t.appendChild(e.title),un(t,"ag-tab"),this.eHeader.appendChild(t),or(t,e.titleLabel);var n={tabbedItem:e,eHeaderButton:t};this.items.push(n),t.addEventListener("click",this.showItemWrapper.bind(this,n))},t.prototype.showItem=function(e){var t=p(this.items,(function(t){return t.tabbedItem===e}));t&&this.showItemWrapper(t)},t.prototype.showItemWrapper=function(e){var t=this;this.params.onItemClicked&&this.params.onItemClicked({item:e.tabbedItem}),this.activeItem!==e?(On(this.eBody),e.tabbedItem.bodyPromise.then((function(n){t.eBody.appendChild(n);var r=!t.focusService.isKeyboardMode();t.focusService.focusInto(t.eBody,!1,r),e.tabbedItem.afterAttachedCallback&&e.tabbedItem.afterAttachedCallback(t.afterAttachedParams)})),this.activeItem&&pn(this.activeItem.eHeaderButton,"ag-tab-selected"),un(e.eHeaderButton,"ag-tab-selected"),this.activeItem=e):ie(this.params.onActiveItemClicked)},Ff([de("focusService")],t.prototype,"focusService",void 0),Ff([ao("eHeader")],t.prototype,"eHeader",void 0),Ff([ao("eBody")],t.prototype,"eBody",void 0),Ff([ce],t.prototype,"postConstruct",null),t}(io);(If=t.ServerSideTransactionResultStatus||(t.ServerSideTransactionResultStatus={})).Applied="Applied",If.StoreNotFound="StoreNotFound",If.StoreLoading="StoreLoading",If.StoreWaitingToLoad="StoreWaitingToLoad",If.StoreLoadingFailed="StoreLoadingFailed",If.StoreWrongType="StoreWrongType",If.Cancelled="Cancelled";var Hf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wf=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Vf=function(e){function t(n,r,o){void 0===n&&(n="default"),void 0===r&&(r="listbox");var i=e.call(this,t.getTemplate(n))||this;return i.cssIdentifier=n,i.ariaRole=r,i.listName=o,i.renderedRows=new Map,i.rowHeight=20,i.isDestroyed=!1,i}return Hf(t,e),t.prototype.postConstruct=function(){var e=this;this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:function(t){return e.onFocusIn(t)},onFocusOut:function(t){return e.onFocusOut(t)},focusInnerElement:function(t){return e.focusInnerElement(t)},onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}}),this.setAriaProperties()},t.prototype.setAriaProperties=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;tr(t,this.ariaRole),or(t,e)},t.prototype.addResizeObserver=function(){var e=this.drawVirtualRows.bind(this),t=this.resizeObserverService.observeResize(this.getGui(),e);this.addDestroyFunc(t)},t.prototype.focusInnerElement=function(e){this.focusRow(e?this.model.getRowCount()-1:0)},t.prototype.onFocusIn=function(e){var t=e.target;return hn(t,"ag-virtual-list-item")&&(this.lastFocusedRowIndex=rr(t)-1),!1},t.prototype.onFocusOut=function(e){return this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null),!1},t.prototype.handleKeyDown=function(e){switch(e.keyCode){case mo.UP:case mo.DOWN:this.navigate(e.keyCode===mo.UP)&&e.preventDefault()}},t.prototype.onTabKeyDown=function(e){this.navigate(e.shiftKey)?e.preventDefault():this.focusService.focusInto(this.getGui(),!e.shiftKey)},t.prototype.navigate=function(e){if(null==this.lastFocusedRowIndex)return!1;var t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount())&&(this.focusRow(t),!0)},t.prototype.getLastFocusedRow=function(){return this.lastFocusedRowIndex},t.prototype.focusRow=function(e){var t=this;this.ensureIndexVisible(e),window.setTimeout((function(){var n=t.renderedRows.get(e);n&&n.eDiv.focus()}),10)},t.prototype.getComponentAt=function(e){var t=this.renderedRows.get(e);return t&&t.rowComponent},t.getTemplate=function(e){return'\n <div class="ag-virtual-list-viewport ag-'+e+'-virtual-list-viewport" role="presentation">\n <div class="ag-virtual-list-container ag-'+e+'-virtual-list-container" ref="eContainer"></div>\n </div>'},t.prototype.getItemHeight=function(){return this.gridOptionsWrapper.getListItemHeight()},t.prototype.ensureIndexVisible=function(e){var t=this.model.getRowCount();if("number"!==typeof e||e<0||e>=t)console.warn("invalid row index for ensureIndexVisible: "+e);else{var n=e*this.rowHeight,r=n+this.rowHeight,o=this.getGui(),i=o.scrollTop,a=o.offsetHeight,s=i+a<r;if(i>n)o.scrollTop=n;else if(s){var l=r-a;o.scrollTop=l}}},t.prototype.setComponentCreator=function(e){this.componentCreator=e},t.prototype.getRowHeight=function(){return this.rowHeight},t.prototype.getScrollTop=function(){return this.getGui().scrollTop},t.prototype.setRowHeight=function(e){this.rowHeight=e,this.refresh()},t.prototype.refresh=function(){var e=this;if(null!=this.model&&!this.isDestroyed){var t=this.model.getRowCount();this.eContainer.style.height=t*this.rowHeight+"px",oe((function(){return e.eContainer.clientHeight>=t*e.rowHeight}),(function(){e.isDestroyed||(e.clearVirtualRows(),e.drawVirtualRows())}))}},t.prototype.clearVirtualRows=function(){var e=this;this.renderedRows.forEach((function(t,n){return e.removeRow(n)}))},t.prototype.drawVirtualRows=function(){var e=this.getGui(),t=e.scrollTop,n=t+e.offsetHeight,r=Math.floor(t/this.rowHeight),o=Math.floor(n/this.rowHeight);this.ensureRowsRendered(r,o)},t.prototype.ensureRowsRendered=function(e,t){var n=this;this.renderedRows.forEach((function(r,o){(o<e||o>t)&&o!==n.lastFocusedRowIndex&&n.removeRow(o)}));for(var r=e;r<=t;r++)this.renderedRows.has(r)||r<this.model.getRowCount()&&this.insertRow(r)},t.prototype.insertRow=function(e){var t=this,n=this.model.getRow(e),r=document.createElement("div");if(un(r,"ag-virtual-list-item"),un(r,"ag-"+this.cssIdentifier+"-virtual-list-item"),tr(r,"tree"===this.ariaRole?"treeitem":"option"),cr(r,this.model.getRowCount()),ur(r,e+1),r.setAttribute("tabindex","-1"),"function"===typeof this.model.isRowSelected){var o=this.model.isRowSelected(e);br(r,!!o),wr(r,o)}r.style.height=this.rowHeight+"px",r.style.top=this.rowHeight*e+"px";var i=this.componentCreator(n,r);i.addGuiEventListener("focusin",(function(){return t.lastFocusedRowIndex=e})),r.appendChild(i.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",r):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",r):this.eContainer.appendChild(r),this.renderedRows.set(e,{rowComponent:i,eDiv:r})},t.prototype.removeRow=function(e){var t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)},t.prototype.addScrollListener=function(){var e=this;this.addGuiEventListener("scroll",(function(){return e.drawVirtualRows()}))},t.prototype.setModel=function(e){this.model=e},t.prototype.destroy=function(){this.isDestroyed||(this.clearVirtualRows(),this.isDestroyed=!0,e.prototype.destroy.call(this))},Wf([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Wf([de("focusService")],t.prototype,"focusService",void 0),Wf([ao("eContainer")],t.prototype,"eContainer",void 0),Wf([ce],t.prototype,"postConstruct",null),t}(ip);var jf,Bf=function(){function e(){}return e.prototype.wrap=function(e,t,n,r,o){var i=this;void 0===n&&(n=[]);var a=this.createWrapper(e,r,o);return t.forEach((function(e){i.createMethod(a,e,!0)})),n.forEach((function(e){i.createMethod(a,e,!1)})),a},e.prototype.unwrap=function(e){return e},e.prototype.createMethod=function(e,t,n){e.addMethod(t,this.createMethodProxy(e,t,n))},e.prototype.createMethodProxy=function(e,t,n){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(n&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}},e}();(jf=t.ChartType||(t.ChartType={})).Column="column",jf.GroupedColumn="groupedColumn",jf.StackedColumn="stackedColumn",jf.NormalizedColumn="normalizedColumn",jf.Bar="bar",jf.GroupedBar="groupedBar",jf.StackedBar="stackedBar",jf.NormalizedBar="normalizedBar",jf.Line="line",jf.Scatter="scatter",jf.Bubble="bubble",jf.Pie="pie",jf.Doughnut="doughnut",jf.Area="area",jf.StackedArea="stackedArea",jf.NormalizedArea="normalizedArea",jf.Histogram="histogram";var zf="undefined"===typeof n.g?{}:n.g;zf.HTMLElement="undefined"===typeof HTMLElement?{}:HTMLElement,zf.HTMLButtonElement="undefined"===typeof HTMLButtonElement?{}:HTMLButtonElement,zf.HTMLSelectElement="undefined"===typeof HTMLSelectElement?{}:HTMLSelectElement,zf.HTMLInputElement="undefined"===typeof HTMLInputElement?{}:HTMLInputElement,zf.Node="undefined"===typeof Node?{}:Node,zf.MouseEvent="undefined"===typeof MouseEvent?{}:MouseEvent;var Uf,Yf=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},Xf=function(){function e(t,n,r,o,i,a,s,l){this.nextId=0,this.allNodesMap={},this.rootNode=t,this.gridOptionsWrapper=n,this.eventService=r,this.columnModel=o,this.gridApi=i,this.columnApi=a,this.beans=l,this.selectionService=s,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterFilter=[],this.postConstruct()}return e.prototype.postConstruct=function(){this.suppressParentsInRowNodes=this.gridOptionsWrapper.isSuppressParentsInRowNodes(),this.isRowMasterFunc=this.gridOptionsWrapper.getIsRowMasterFunc(),this.doingTreeData=this.gridOptionsWrapper.isTreeData(),this.doingMasterDetail=this.gridOptionsWrapper.isMasterDetail()},e.prototype.getCopyOfNodesMap=function(){return Xr.cloneObject(this.allNodesMap)},e.prototype.getRowNode=function(e){return this.allNodesMap[e]},e.prototype.setRowData=function(t){var n=this;if("string"!==typeof t){var r=this.rootNode,o=this.rootNode.sibling;r.childrenAfterFilter=null,r.childrenAfterGroup=null,r.childrenAfterSort=null,r.childrenMapped=null,r.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?r.allLeafChildren=t.map((function(t){return n.createNode(t,n.rootNode,e.TOP_LEVEL)})):(r.allLeafChildren=[],r.childrenAfterGroup=[]),o&&(o.childrenAfterFilter=r.childrenAfterFilter,o.childrenAfterGroup=r.childrenAfterGroup,o.childrenAfterSort=r.childrenAfterSort,o.childrenMapped=r.childrenMapped,o.allLeafChildren=r.allLeafChildren)}else console.warn("AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first")},e.prototype.updateRowData=function(e,t){var n={remove:[],update:[],add:[]},r=[];return this.executeRemove(e,n,r),this.executeUpdate(e,n,r),this.executeAdd(e,n),this.updateSelection(r),t&&Xr.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),n},e.prototype.updateSelection=function(e){var t=e.length>0;if(t&&e.forEach((function(e){e.setSelected(!1,!1,!0)})),this.selectionService.updateGroupsFromChildrenSelections(),t){var n={type:Ke.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(n)}},e.prototype.executeAdd=function(t,n){var r=this,o=t.add,i=t.addIndex;if(!Xr.missingOrEmpty(o)){var a=o.map((function(t){return r.createNode(t,r.rootNode,e.TOP_LEVEL)}));if("number"===typeof i&&i>=0){var s=this.rootNode.allLeafChildren,l=s.slice(0,i),c=s.slice(i,s.length);this.rootNode.allLeafChildren=Yf(l,a,c)}else this.rootNode.allLeafChildren=Yf(this.rootNode.allLeafChildren,a);this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),n.add=a}},e.prototype.executeRemove=function(e,t,n){var r=this,o=e.remove;if(!Xr.missingOrEmpty(o)){var i={};o.forEach((function(e){var o=r.lookupRowNode(e);o&&(o.isSelected()&&n.push(o),o.clearRowTopAndRowIndex(),i[o.id]=!0,delete r.allNodesMap[o.id],t.remove.push(o))})),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter((function(e){return!i[e.id]})),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}},e.prototype.executeUpdate=function(t,n,r){var o=this,i=t.update;Xr.missingOrEmpty(i)||i.forEach((function(t){var i=o.lookupRowNode(t);i&&(i.updateData(t),!i.selectable&&i.isSelected()&&r.push(i),o.setMasterForRow(i,t,e.TOP_LEVEL,!1),n.update.push(i))}))},e.prototype.lookupRowNode=function(e){var t,n=this.gridOptionsWrapper.getRowNodeIdFunc();if(Xr.exists(n)){var r=n(e);if(!(t=this.allNodesMap[r]))return console.error("AG Grid: could not find row id="+r+", data item was not found for this id"),null}else if(!(t=Xr.find(this.rootNode.allLeafChildren,(function(t){return t.data===e}))))return console.error("AG Grid: could not find data item as object was not found",e),console.error("Consider using getRowNodeId to help the Grid find matching row data"),null;return t},e.prototype.createNode=function(e,t,n){var r=new Qi(this.beans);return r.group=!1,this.setMasterForRow(r,e,n,!0),t&&!this.suppressParentsInRowNodes&&(r.parent=t),r.level=n,r.setDataAndId(e,this.nextId.toString()),this.allNodesMap[r.id]&&console.warn("ag-grid: duplicate node id '"+r.id+"' detected from getRowNodeId callback, this could cause issues in your grid."),this.allNodesMap[r.id]=r,this.nextId++,r},e.prototype.setMasterForRow=function(e,t,n,r){if(this.doingTreeData)e.setMaster(!1),r&&(e.expanded=!1);else if(this.doingMasterDetail?this.isRowMasterFunc?e.setMaster(this.isRowMasterFunc(t)):e.setMaster(!0):e.setMaster(!1),r){var o=this.columnModel.getRowGroupColumns(),i=n+(o?o.length:0);e.expanded=!!e.master&&this.isExpanded(i)}},e.prototype.isExpanded=function(e){var t=this.gridOptionsWrapper.getGroupDefaultExpanded();return-1===t||e<t},e.TOP_LEVEL=0,e.ROOT_NODE_ID="ROOT_NODE_ID",e}(),qf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kf=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e[e.Normal=0]="Normal",e[e.AfterFilter=1]="AfterFilter",e[e.AfterFilterAndSort=2]="AfterFilterAndSort",e[e.PivotNodes=3]="PivotNodes"}(Uf||(Uf={}));var $f=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return qf(n,e),n.prototype.init=function(){var e=this.refreshModel.bind(this,{step:t.ClientSideRowModelSteps.EVERYTHING}),n=this.refreshModel.bind(this,{step:t.ClientSideRowModelSteps.EVERYTHING,afterColumnsChanged:!0,keepRenderedRows:!0,animate:!0});this.addManagedListener(this.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,n),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:t.ClientSideRowModelSteps.PIVOT})),this.addManagedListener(this.eventService,Ke.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_COLUMN_PIVOT_MODE_CHANGED,e);var r=this.refreshModel.bind(this,{step:t.ClientSideRowModelSteps.MAP,keepRenderedRows:!0,animate:!0});this.addManagedListener(this.gridOptionsWrapper,es.PROP_GROUP_REMOVE_SINGLE_CHILDREN,r),this.addManagedListener(this.gridOptionsWrapper,es.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN,r),this.rootNode=new Qi(this.beans),this.nodeManager=new Xf(this.rootNode,this.gridOptionsWrapper,this.eventService,this.columnModel,this.gridApi,this.columnApi,this.selectionService,this.beans)},n.prototype.start=function(){var e=this.gridOptionsWrapper.getRowData();e&&this.setRowData(e)},n.prototype.ensureRowHeightsValid=function(e,t,n,r){var o,i=!1;do{o=!1;for(var a=this.getRowIndexAtPixel(e),s=this.getRowIndexAtPixel(t),l=Math.max(a,n),c=Math.min(s,r),u=l;u<=c;u++){var p=this.getRow(u);if(p.rowHeightEstimated){var d=this.gridOptionsWrapper.getRowHeightForNode(p);p.setRowHeight(d.height),o=!0,i=!0}}o&&this.setRowTopAndRowIndex()}while(o);return i},n.prototype.setRowTopAndRowIndex=function(){for(var e=this.gridOptionsWrapper.getDefaultRowHeight(),t=0,n=new Set,r=this.gridOptionsWrapper.getDomLayout()===Ce.DOM_LAYOUT_NORMAL,o=0;o<this.rowsToDisplay.length;o++){var i=this.rowsToDisplay[o];if(null!=i.id&&n.add(i.id),null==i.rowHeight){var a=this.gridOptionsWrapper.getRowHeightForNode(i,r,e);i.setRowHeight(a.height,a.estimated)}i.setRowTop(t),i.setRowIndex(o),t+=i.rowHeight}return n},n.prototype.clearRowTopAndRowIndex=function(e,t){var n=e.isActive(),r=function(e){e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()};!function e(t){if(r(t),r(t.detailNode),r(t.sibling),t.hasChildren()&&t.childrenAfterGroup){var o=-1==t.level;n&&!o&&!t.expanded||t.childrenAfterGroup.forEach(e)}}(this.rootNode)},n.prototype.ensureRowsAtPixel=function(e,n,r){var o=this;void 0===r&&(r=0);var i=this.getRowIndexAtPixel(n);return this.getRow(i)!==e[0]&&(e.forEach((function(e){Xr.removeFromArray(o.rootNode.allLeafChildren,e)})),e.forEach((function(e,t){Xr.insertIntoArray(o.rootNode.allLeafChildren,e,Math.max(i+r,0)+t)})),this.refreshModel({step:t.ClientSideRowModelSteps.EVERYTHING,keepRenderedRows:!0,animate:!0,keepEditingRows:!0}),!0)},n.prototype.highlightRowAtPixel=function(e,t){var n=null!=t?this.getRowIndexAtPixel(t):null,r=null!=n?this.getRow(n):null;if(r&&e&&r!==e&&null!=t){var o=this.getHighlightPosition(t,r);this.lastHighlightedRow&&this.lastHighlightedRow!==r&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),r.setHighlighted(o),this.lastHighlightedRow=r}else this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null)},n.prototype.getHighlightPosition=function(e,n){if(!n){var r=this.getRowIndexAtPixel(e);if(!(n=this.getRow(r||0)))return t.RowHighlightPosition.Below}return e-n.rowTop<n.rowHeight/2?t.RowHighlightPosition.Above:t.RowHighlightPosition.Below},n.prototype.getLastHighlightedRowNode=function(){return this.lastHighlightedRow},n.prototype.isLastRowIndexKnown=function(){return!0},n.prototype.getRowCount=function(){return this.rowsToDisplay?this.rowsToDisplay.length:0},n.prototype.getTopLevelRowCount=function(){return this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode?1:this.rootNode.childrenAfterFilter?this.rootNode.childrenAfterFilter.length:0},n.prototype.getTopLevelRowDisplayedIndex=function(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;var t=this.rootNode.childrenAfterSort[e];if(this.gridOptionsWrapper.isGroupHideOpenParents())for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex},n.prototype.getRowBounds=function(e){if(Xr.missing(this.rowsToDisplay))return null;var t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null},n.prototype.onRowGroupOpened=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:t.ClientSideRowModelSteps.MAP,keepRenderedRows:!0,animate:e})},n.prototype.onFilterChanged=function(e){if(!e.afterDataChange){var n=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:t.ClientSideRowModelSteps.FILTER,keepRenderedRows:!0,animate:n})}},n.prototype.onSortChanged=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:t.ClientSideRowModelSteps.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})},n.prototype.getType=function(){return Ce.ROW_MODEL_TYPE_CLIENT_SIDE},n.prototype.onValueChanged=function(){this.columnModel.isPivotActive()?this.refreshModel({step:t.ClientSideRowModelSteps.PIVOT}):this.refreshModel({step:t.ClientSideRowModelSteps.AGGREGATE})},n.prototype.createChangePath=function(e){var t=Xr.missingOrEmpty(e),n=new ts(!1,this.rootNode);return(t||this.gridOptionsWrapper.isTreeData())&&n.setInactive(),n},n.prototype.isSuppressModelUpdateAfterUpdateTransaction=function(e){if(!this.gridOptionsWrapper.isSuppressModelUpdateAfterUpdateTransaction())return!1;if(null==e.rowNodeTransactions)return!1;var t=Xr.filter(e.rowNodeTransactions,(function(e){return null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0}));return null==t||0==t.length},n.prototype.refreshModel=function(e){var n=this;if(!this.isSuppressModelUpdateAfterUpdateTransaction(e)){var r=this.createChangePath(e.rowNodeTransactions);switch(e.step){case t.ClientSideRowModelSteps.EVERYTHING:this.doRowGrouping(e.groupState,e.rowNodeTransactions,e.rowNodeOrder,r,!!e.afterColumnsChanged);case t.ClientSideRowModelSteps.FILTER:this.doFilter(r);case t.ClientSideRowModelSteps.PIVOT:this.doPivot(r);case t.ClientSideRowModelSteps.AGGREGATE:this.doAggregate(r);case t.ClientSideRowModelSteps.SORT:this.doSort(e.rowNodeTransactions,r);case t.ClientSideRowModelSteps.MAP:this.doRowsToDisplay()}var o=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(r,o);var i={type:Ke.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1};this.eventService.dispatchEvent(i),this.$scope&&window.setTimeout((function(){n.$scope.$apply()}),0)}},n.prototype.isEmpty=function(){var e=Xr.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return Xr.missing(this.rootNode)||e||!this.columnModel.isReady()},n.prototype.isRowsToRender=function(){return Xr.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0},n.prototype.getNodesInRangeForSelection=function(e,t){var n,r=!t,o=!1,i=[],a=this.gridOptionsWrapper.isGroupSelectsChildren();return this.forEachNodeAfterFilterAndSort((function(s){var l=r&&!o;if(r||s!==t&&s!==e||(r=!0),!(s.group&&a)){var c=r&&!o,u=s.isParentOfNode(n);(c||u)&&i.push(s)}l&&(s!==t&&s!==e||(o=!0,n=s===t?t:e))})),i},n.prototype.setDatasource=function(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")},n.prototype.getTopLevelNodes=function(){return this.rootNode?this.rootNode.childrenAfterGroup:null},n.prototype.getRootNode=function(){return this.rootNode},n.prototype.getRow=function(e){return this.rowsToDisplay[e]},n.prototype.isRowPresent=function(e){return this.rowsToDisplay.indexOf(e)>=0},n.prototype.getRowIndexAtPixel=function(e){if(this.isEmpty())return-1;var t=0,n=this.rowsToDisplay.length-1;if(e<=0)return 0;if(Xr.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;for(;;){var r=Math.floor((t+n)/2),o=this.rowsToDisplay[r];if(this.isRowInPixel(o,e))return r;o.rowTop<e?t=r+1:o.rowTop>e&&(n=r-1)}},n.prototype.isRowInPixel=function(e,t){var n=e.rowTop,r=e.rowTop+e.rowHeight;return n<=t&&r>t},n.prototype.forEachLeafNode=function(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((function(t,n){return e(t,n)}))},n.prototype.forEachNode=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterGroup,e,Uf.Normal,0)},n.prototype.forEachNodeAfterFilter=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterFilter,e,Uf.AfterFilter,0)},n.prototype.forEachNodeAfterFilterAndSort=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterSort,e,Uf.AfterFilterAndSort,0)},n.prototype.forEachPivotNode=function(e){this.recursivelyWalkNodesAndCallback([this.rootNode],e,Uf.PivotNodes,0)},n.prototype.recursivelyWalkNodesAndCallback=function(e,t,n,r){if(!e)return r;for(var o=0;o<e.length;o++){var i=e[o];if(t(i,r++),i.hasChildren()){var a=null;switch(n){case Uf.Normal:a=i.childrenAfterGroup;break;case Uf.AfterFilter:a=i.childrenAfterFilter;break;case Uf.AfterFilterAndSort:a=i.childrenAfterSort;break;case Uf.PivotNodes:a=i.leafGroup?null:i.childrenAfterSort}a&&(r=this.recursivelyWalkNodesAndCallback(a,t,n,r))}}return r},n.prototype.doAggregate=function(e){this.aggregationStage&&this.aggregationStage.execute({rowNode:this.rootNode,changedPath:e})},n.prototype.expandOrCollapseAll=function(e){var n=this.gridOptionsWrapper.isTreeData();this.rootNode&&function t(r){if(!r)return;r.forEach((function(r){(n?Xr.exists(r.childrenAfterGroup):r.group)&&(r.expanded=e,t(r.childrenAfterGroup))}))}(this.rootNode.childrenAfterGroup),this.refreshModel({step:t.ClientSideRowModelSteps.MAP});var r=e?"expandAll":"collapseAll",o={api:this.gridApi,columnApi:this.columnApi,type:Ke.EVENT_EXPAND_COLLAPSE_ALL,source:r};this.eventService.dispatchEvent(o)},n.prototype.doSort=function(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})},n.prototype.doRowGrouping=function(e,t,n,r,o){this.groupStage?(t?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:t,rowNodeOrder:n,changedPath:r}):(this.groupStage.execute({rowNode:this.rootNode,changedPath:r,afterColumnsChanged:o}),this.restoreGroupState(e)),this.gridOptionsWrapper.isGroupSelectsChildren()&&this.selectionService.updateGroupsFromChildrenSelections(r)):(this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren())},n.prototype.restoreGroupState=function(e){e&&Xr.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(t,n){"boolean"===typeof e[n]&&(t.expanded=e[n])}))},n.prototype.doFilter=function(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})},n.prototype.doPivot=function(e){this.pivotStage&&this.pivotStage.execute({rowNode:this.rootNode,changedPath:e})},n.prototype.getGroupState=function(){if(!this.rootNode.childrenAfterGroup||!this.gridOptionsWrapper.isRememberGroupStateWhenNewData())return null;var e={};return Xr.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(t,n){return e[n]=t.expanded})),e},n.prototype.getCopyOfNodesMap=function(){return this.nodeManager.getCopyOfNodesMap()},n.prototype.getRowNode=function(e){if("string"==typeof e&&0==e.indexOf(Qi.ID_PREFIX_ROW_GROUP)){var t=void 0;return this.forEachNode((function(n){n.id===e&&(t=n)})),t}return this.nodeManager.getRowNode(e)},n.prototype.setRowData=function(e){var n=this.getGroupState();this.nodeManager.setRowData(e);var r={type:Ke.EVENT_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r),this.refreshModel({step:t.ClientSideRowModelSteps.EVERYTHING,groupState:n,newData:!0})},n.prototype.batchUpdateRowData=function(e,t){var n=this;if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];var r=this.gridOptionsWrapper.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout((function(){n.executeBatchUpdateRowData()}),r)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})},n.prototype.flushAsyncTransactions=function(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())},n.prototype.executeBatchUpdateRowData=function(){var e=this;this.valueCache.onDataChanged();var t=[],n=[],r=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach((function(o){var i=e.nodeManager.updateRowData(o.rowDataTransaction,void 0);n.push(i),o.callback&&t.push(o.callback.bind(null,i)),"number"===typeof o.rowDataTransaction.addIndex&&(r=!0)})),this.commonUpdateRowData(n,void 0,r),t.length>0&&window.setTimeout((function(){t.forEach((function(e){return e()}))}),0),n.length>0){var o={api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),type:Ke.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:n};this.eventService.dispatchEvent(o)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0},n.prototype.updateRowData=function(e,t){this.valueCache.onDataChanged();var n=this.nodeManager.updateRowData(e,t),r="number"===typeof e.addIndex;return this.commonUpdateRowData([n],t,r),n},n.prototype.createRowNodeOrder=function(){if(!this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder()){var e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(var t=0;t<this.rootNode.allLeafChildren.length;t++){e[this.rootNode.allLeafChildren[t].id]=t}return e}},n.prototype.commonUpdateRowData=function(e,n,r){r&&(n=this.createRowNodeOrder()),this.refreshModel({step:t.ClientSideRowModelSteps.EVERYTHING,rowNodeTransactions:e,rowNodeOrder:n,keepRenderedRows:!0,animate:!0,keepEditingRows:!0});var o={type:Ke.EVENT_ROW_DATA_UPDATED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)},n.prototype.doRowsToDisplay=function(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})},n.prototype.onRowHeightChanged=function(){this.refreshModel({step:t.ClientSideRowModelSteps.MAP,keepRenderedRows:!0,keepEditingRows:!0})},n.prototype.resetRowHeights=function(){var e=!1;this.forEachNode((function(t){t.setRowHeight(t.rowHeight,!0);var n=t.detailNode;n&&n.setRowHeight(n.rowHeight,!0),e=!0})),e&&this.onRowHeightChanged()},Kf([de("columnModel")],n.prototype,"columnModel",void 0),Kf([de("$scope")],n.prototype,"$scope",void 0),Kf([de("selectionService")],n.prototype,"selectionService",void 0),Kf([de("valueCache")],n.prototype,"valueCache",void 0),Kf([de("columnApi")],n.prototype,"columnApi",void 0),Kf([de("gridApi")],n.prototype,"gridApi",void 0),Kf([de("animationFrameService")],n.prototype,"animationFrameService",void 0),Kf([de("beans")],n.prototype,"beans",void 0),Kf([de("filterStage")],n.prototype,"filterStage",void 0),Kf([de("sortStage")],n.prototype,"sortStage",void 0),Kf([de("flattenStage")],n.prototype,"flattenStage",void 0),Kf([he("groupStage")],n.prototype,"groupStage",void 0),Kf([he("aggregationStage")],n.prototype,"aggregationStage",void 0),Kf([he("pivotStage")],n.prototype,"pivotStage",void 0),Kf([ce],n.prototype,"init",null),n=Kf([pe("rowModel")],n)}(ze),Qf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zf=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Jf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qf(t,e),t.prototype.execute=function(e){var t=e.rowNode,n=e.changedPath;this.filterService.filter(n),this.selectableService.updateSelectableAfterFiltering(t)},Zf([de("selectableService")],t.prototype,"selectableService",void 0),Zf([de("filterService")],t.prototype,"filterService",void 0),t=Zf([pe("filterStage")],t)}(ze),eg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tg=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ng=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eg(t,e),t.prototype.execute=function(e){var t=this.sortController.getSortOptions(),n=Xr.exists(t)&&t.length>0,r=n&&Xr.exists(e.rowNodeTransactions)&&this.gridOptionsWrapper.isDeltaSort(),o=r?this.calculateDirtyNodes(e.rowNodeTransactions):null,i=Xr.missingOrEmpty(this.columnModel.getValueColumns()),a=Xr.some(t,(function(e){return!!e.column.getColDef().showRowGroup}));this.sortService.sort(t,n,r,o,e.changedPath,i,a)},t.prototype.calculateDirtyNodes=function(e){var t={},n=function(e){e&&e.forEach((function(e){return t[e.id]=!0}))};return e&&e.forEach((function(e){n(e.add),n(e.update),n(e.remove)})),t},tg([de("sortService")],t.prototype,"sortService",void 0),tg([de("sortController")],t.prototype,"sortController",void 0),tg([de("columnModel")],t.prototype,"columnModel",void 0),t=tg([pe("sortStage")],t)}(ze),rg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),og=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ig=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rg(t,e),t.prototype.execute=function(e){var t=e.rowNode,n=[],r={value:0},o=this.columnModel.isPivotMode(),i=o&&t.leafGroup,a=i?[t]:t.childrenAfterSort;return this.recursivelyAddToRowsToDisplay(a,n,r,o,0),!i&&n.length>0&&this.gridOptionsWrapper.isGroupIncludeTotalFooter()&&(this.ensureFooterNodeExists(t),this.addRowNodeToRowsToDisplay(t.sibling,n,r,0)),n},t.prototype.recursivelyAddToRowsToDisplay=function(e,t,n,r,o){if(!Xr.missingOrEmpty(e))for(var i=this.gridOptionsWrapper.isGroupHideOpenParents(),a=this.gridOptionsWrapper.isGroupRemoveSingleChildren(),s=!a&&this.gridOptionsWrapper.isGroupRemoveLowestSingleChildren(),l=0;l<e.length;l++){var c=e[l],u=c.hasChildren(),p=r&&!u,d=a&&u&&1===c.childrenAfterGroup.length,h=s&&u&&c.leafGroup&&1===c.childrenAfterGroup.length,f=r&&c.leafGroup,g=i&&c.expanded&&!f;if(!p&&!g&&!d&&!h&&this.addRowNodeToRowsToDisplay(c,t,n,o),!r||!c.leafGroup)if(u){var v=d||h;if(c.expanded||v){var m=v?o:o+1;this.recursivelyAddToRowsToDisplay(c.childrenAfterSort,t,n,r,m),this.gridOptionsWrapper.isGroupIncludeFooter()&&(this.ensureFooterNodeExists(c),this.addRowNodeToRowsToDisplay(c.sibling,t,n,o))}}else if(c.master&&c.expanded){var y=this.createDetailNode(c);this.addRowNodeToRowsToDisplay(y,t,n,o)}}},t.prototype.addRowNodeToRowsToDisplay=function(e,t,n,r){var o=this.gridOptionsWrapper.isGroupMultiAutoColumn();t.push(e),e.setUiLevel(o?0:r)},t.prototype.ensureFooterNodeExists=function(e){if(!Xr.exists(e.sibling)){var t=new Qi(this.beans);Object.keys(e).forEach((function(n){t[n]=e[n]})),t.footer=!0,t.setRowTop(null),t.setRowIndex(null),t.oldRowTop=null,Xr.exists(t.id)&&(t.id="rowGroupFooter_"+t.id),t.sibling=e,e.sibling=t}},t.prototype.createDetailNode=function(e){if(Xr.exists(e.detailNode))return e.detailNode;var t=new Qi(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,Xr.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t},og([de("columnModel")],t.prototype,"columnModel",void 0),og([de("beans")],t.prototype,"beans",void 0),t=og([pe("flattenStage")],t)}(ze),ag=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sg=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},lg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ag(t,e),t.prototype.init=function(){this.postSortFunc=this.gridOptionsWrapper.getPostSortFunc()},t.prototype.sort=function(e,t,n,r,o,i,a){var s=this,l=this.gridOptionsWrapper.isGroupMaintainOrder(),c=Xr.some(this.columnModel.getAllGridColumns(),(function(e){return e.isRowGroupActive()}));o&&o.forEachChangedNodeDepthFirst((function(u){if(s.pullDownGroupDataForHideOpenParents(u.childrenAfterFilter,!0),t){var p=l&&c&&!u.leafGroup&&!a;u.childrenAfterSort=p?u.childrenAfterFilter.slice(0):n?s.doDeltaSort(u,e,r,o,i):s.rowNodeSorter.doFullSort(u.childrenAfterFilter,e)}else u.childrenAfterSort=u.childrenAfterFilter.slice(0);u.sibling&&(u.sibling.childrenAfterSort=u.childrenAfterSort),s.updateChildIndexes(u),s.postSortFunc&&s.postSortFunc(u.childrenAfterSort)})),this.updateGroupDataForHideOpenParents(o)},t.prototype.mapNodeToSortedNode=function(e,t){return{currentPos:t,rowNode:e}},t.prototype.doDeltaSort=function(e,t,n,r,o){var i=e.childrenAfterSort.filter((function(e){var t=!n[e.id],i=o||r&&r.canSkip(e);return t&&i})).map(this.mapNodeToSortedNode.bind(this)),a={};i.forEach((function(e){return a[e.rowNode.id]=e.rowNode}));var s=e.childrenAfterFilter.filter((function(e){return!a[e.id]})).map(this.mapNodeToSortedNode.bind(this));return s.sort(this.rowNodeSorter.compareRowNodes.bind(this,t)),(0===s.length?i:0===i.length?s:this.mergeSortedArrays(t,i,s)).map((function(e){return e.rowNode}))},t.prototype.mergeSortedArrays=function(e,t,n){for(var r=[],o=0,i=0;o<t.length&&i<n.length;){this.rowNodeSorter.compareRowNodes(e,t[o],n[i])<0?r.push(t[o++]):r.push(n[i++])}for(;o<t.length;)r.push(t[o++]);for(;i<n.length;)r.push(n[i++]);return r},t.prototype.updateChildIndexes=function(e){if(!Xr.missing(e.childrenAfterSort))for(var t=e.childrenAfterSort,n=0;n<t.length;n++){var r=t[n],o=0===n,i=n===e.childrenAfterSort.length-1;r.setFirstChild(o),r.setLastChild(i),r.setChildIndex(n)}},t.prototype.updateGroupDataForHideOpenParents=function(e){var t=this;if(this.gridOptionsWrapper.isGroupHideOpenParents()){if(this.gridOptionsWrapper.isTreeData()){return Xr.doOnce((function(){return console.warn("AG Grid: The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them (as opposed to Row Grouping, which only has Aggregated Values at the group level).")}),"sortService.hideOpenParentsWithTreeData"),!1}var n=function e(n){t.pullDownGroupDataForHideOpenParents(n.childrenAfterSort,!1),n.childrenAfterSort.forEach((function(t){t.hasChildren()&&e(t)}))};e&&e.executeFromRootNode((function(e){return n(e)}))}},t.prototype.pullDownGroupDataForHideOpenParents=function(e,t){var n=this;this.gridOptionsWrapper.isGroupHideOpenParents()&&!Xr.missing(e)&&e.forEach((function(e){n.columnModel.getGroupDisplayColumns().forEach((function(r){var o=r.getColDef().showRowGroup;if("string"===typeof o){var i=o,a=n.columnModel.getPrimaryColumn(i);if(!(a===e.rowGroupColumn))if(t)e.setGroupValue(r.getId(),void 0);else{var s=e.getFirstChildOfFirstChild(a);s&&e.setGroupValue(r.getId(),s.key)}}else console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup")}))}))},sg([de("columnModel")],t.prototype,"columnModel",void 0),sg([de("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),sg([ce],t.prototype,"init",null),t=sg([pe("sortService")],t)}(ze),cg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ug=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},pg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cg(t,e),t.prototype.postConstruct=function(){this.doingTreeData=this.gridOptionsWrapper.isTreeData()},t.prototype.filter=function(e){var t=this.filterManager.isAnyFilterPresent();this.filterNodes(t,e)},t.prototype.filterNodes=function(e,t){var n=this,r=function(t,r){t.hasChildren()?(t.childrenAfterFilter=e&&!r?t.childrenAfterGroup.filter((function(e){var t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,r=e.data&&n.filterManager.doesRowPassFilter({rowNode:e});return t||r})):t.childrenAfterGroup,n.setAllChildrenCount(t)):(t.childrenAfterFilter=t.childrenAfterGroup,t.setAllChildrenCount(null)),t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){var o=function e(t,o){if(t.childrenAfterGroup)for(var i=0;i<t.childrenAfterGroup.length;i++){var a=t.childrenAfterGroup[i],s=o||n.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?e(t.childrenAfterGroup[i],s):r(a,s)}r(t,o)};t.executeFromRootNode((function(e){return o(e,!1)}))}else{t.forEachChangedNodeDepthFirst((function(e){return r(e,!1)}),!0)}},t.prototype.setAllChildrenCountTreeData=function(e){var t=0;e.childrenAfterFilter.forEach((function(e){t++,t+=e.allChildrenCount})),e.setAllChildrenCount(t)},t.prototype.setAllChildrenCountGridGrouping=function(e){var t=0;e.childrenAfterFilter.forEach((function(e){e.group?t+=e.allChildrenCount:t++})),e.setAllChildrenCount(t)},t.prototype.setAllChildrenCount=function(e){this.doingTreeData?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)},t.prototype.doingTreeDataFiltering=function(){return this.gridOptionsWrapper.isTreeData()&&!this.gridOptionsWrapper.isExcludeChildrenWhenTreeDataFiltering()},ug([de("filterManager")],t.prototype,"filterManager",void 0),ug([ce],t.prototype,"postConstruct",null),t=ug([pe("filterService")],t)}(ze),dg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hg=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},fg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dg(t,e),t.prototype.postConstruct=function(){this.rowModel.getType()===Ce.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel)},t.prototype.createTransactionForRowData=function(e){if(Xr.missing(this.clientSideRowModel))console.error("AG Grid: ImmutableService only works with ClientSideRowModel");else{var t=this.gridOptionsWrapper.getRowNodeIdFunc();if(t&&!Xr.missing(t)){var n={remove:[],update:[],add:[]},r=this.clientSideRowModel.getCopyOfNodesMap(),o=this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder()?null:{};return Xr.exists(e)&&e.forEach((function(e,i){var a=t(e),s=r[a];(o&&(o[a]=i),s)?(s.data!==e&&n.update.push(e),r[a]=void 0):n.add.push(e)})),Xr.iterateObject(r,(function(e,t){t&&n.remove.push(t.data)})),[n,o]}console.error("AG Grid: ImmutableService requires getRowNodeId() callback to be implemented, your row data need IDs!")}},hg([de("rowModel")],t.prototype,"rowModel",void 0),hg([ce],t.prototype,"postConstruct",null),t=hg([pe("immutableService")],t)}(ze),gg={moduleName:t.ModuleNames.ClientSideRowModelModule,beans:[Jf,ng,ig,lg,pg,fg],rowModels:{clientSide:$f}},vg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mg=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},yg=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.parentCache=n,o.params=r,o.startRow=t*r.blockSize,o.endRow=o.startRow+r.blockSize,o}return vg(t,e),t.prototype.postConstruct=function(){this.createRowNodes()},t.prototype.getBlockStateJson=function(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}},t.prototype.setDataAndId=function(e,t,n){!e.id&&e.alreadyRendered&&(e.alreadyRendered=!1),Xr.exists(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)},t.prototype.loadFromDatasource=function(){var e=this,t=this.createLoadParams();Xr.missing(this.params.datasource.getRows)?console.warn("AG Grid: datasource is missing getRows method"):window.setTimeout((function(){e.params.datasource.getRows(t)}),0)},t.prototype.processServerFail=function(){},t.prototype.createLoadParams=function(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gridOptionsWrapper.getContext()}},t.prototype.forEachNode=function(e,t,n){var r=this;this.rowNodes.forEach((function(o,i){r.startRow+i<n&&e(o,t.next())}))},t.prototype.getLastAccessed=function(){return this.lastAccessed},t.prototype.getRow=function(e,t){void 0===t&&(t=!1),t||(this.lastAccessed=this.params.lastAccessedSequence.next());var n=e-this.startRow;return this.rowNodes[n]},t.prototype.getStartRow=function(){return this.startRow},t.prototype.getEndRow=function(){return this.endRow},t.prototype.createRowNodes=function(){this.rowNodes=[];for(var e=0;e<this.params.blockSize;e++){var t=this.startRow+e,n=new Qi(this.beans);n.setRowHeight(this.params.rowHeight),n.uiLevel=0,n.setRowIndex(t),n.setRowTop(this.params.rowHeight*t),this.rowNodes.push(n)}},t.prototype.processServerResult=function(e){var t=this;this.rowNodes.forEach((function(n,r){var o=e.rowData?e.rowData[r]:void 0;t.setDataAndId(n,o,t.startRow+r)}));var n=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,n)},t.prototype.destroyRowNodes=function(){this.rowNodes.forEach((function(e){e.clearRowTopAndRowIndex()}))},mg([de("beans")],t.prototype,"beans",void 0),mg([ce],t.prototype,"postConstruct",null),mg([ue],t.prototype,"destroyRowNodes",null),t}(zh),bg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wg=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Cg=function(e,t){return function(n,r){t(n,r,e)}},xg=function(e){function t(t){var n=e.call(this)||this;return n.lastRowIndexKnown=!1,n.blocks={},n.blockCount=0,n.rowCount=t.initialRowCount,n.params=t,n}return bg(t,e),t.prototype.setBeans=function(e){this.logger=e.create("InfiniteCache")},t.prototype.getRow=function(e,t){void 0===t&&(t=!1);var n=Math.floor(e/this.params.blockSize),r=this.blocks[n];if(!r){if(t)return;r=this.createBlock(n)}return r.getRow(e)},t.prototype.createBlock=function(e){var t=this.createBean(new yg(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t},t.prototype.refreshCache=function(){0==this.blockCount?this.purgeCache():(this.getBlocksInOrder().forEach((function(e){return e.setStateWaitingToLoad()})),this.params.rowNodeBlockLoader.checkBlockToLoad())},t.prototype.destroyAllBlocks=function(){var e=this;this.getBlocksInOrder().forEach((function(t){return e.destroyBlock(t)}))},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.isLastRowIndexKnown=function(){return this.lastRowIndexKnown},t.prototype.pageLoaded=function(e,t){this.isAlive()&&(this.logger.log("onPageLoaded: page = "+e.getId()+", lastRow = "+t),this.checkRowCount(e,t),this.onCacheUpdated())},t.prototype.purgeBlocksIfNeeded=function(e){var n=this,r=this.getBlocksInOrder().filter((function(t){return t!=e}));r.sort((function(e,t){return t.getLastAccessed()-e.getLastAccessed()}));var o=this.params.maxBlocksInCache>0,i=o?this.params.maxBlocksInCache-1:null,a=t.MAX_EMPTY_BLOCKS_TO_KEEP-1;r.forEach((function(e,t){if(e.getState()===yg.STATE_WAITING_TO_LOAD&&t>=a||!!o&&t>=i){if(n.isBlockCurrentlyDisplayed(e))return;if(n.isBlockFocused(e))return;n.removeBlockFromCache(e)}}))},t.prototype.isBlockFocused=function(e){var t=this.focusService.getFocusCellToUseAfterRefresh();if(!t)return!1;if(null!=t.rowPinned)return!1;var n=e.getStartRow(),r=e.getEndRow();return t.rowIndex>=n&&t.rowIndex<r},t.prototype.isBlockCurrentlyDisplayed=function(e){var t=e.getStartRow(),n=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,n)},t.prototype.removeBlockFromCache=function(e){e&&this.destroyBlock(e)},t.prototype.checkRowCount=function(e,t){if("number"===typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){var n=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<n&&(this.rowCount=n)}},t.prototype.setRowCount=function(e,t){this.rowCount=e,Xr.exists(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()},t.prototype.forEachNodeDeep=function(e){var t=this,n=new qr;this.getBlocksInOrder().forEach((function(r){return r.forEachNode(e,n,t.rowCount)}))},t.prototype.getBlocksInOrder=function(){return Xr.getAllValuesInObject(this.blocks).sort((function(e,t){return e.getId()-t.getId()}))},t.prototype.destroyBlock=function(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)},t.prototype.onCacheUpdated=function(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();var e={type:Ke.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}},t.prototype.destroyAllBlocksPastVirtualRowCount=function(){var e=this,t=[];this.getBlocksInOrder().forEach((function(n){n.getId()*e.params.blockSize>=e.rowCount&&t.push(n)})),t.length>0&&t.forEach((function(t){return e.destroyBlock(t)}))},t.prototype.purgeCache=function(){var e=this;this.getBlocksInOrder().forEach((function(t){return e.removeBlockFromCache(t)})),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()},t.prototype.getRowNodesInRange=function(e,t){var n=this,r=[],o=-1,i=!1,a=new qr;Xr.missing(e)&&(i=!0);var s=!1;return this.getBlocksInOrder().forEach((function(l){s||(i&&o+1!==l.getId()?s=!0:(o=l.getId(),l.forEachNode((function(n){var o=n===e||n===t;(i||o)&&r.push(n),o&&(i=!i)}),a,n.rowCount)))})),s||i?[]:r},t.MAX_EMPTY_BLOCKS_TO_KEEP=2,wg([de("rowRenderer")],t.prototype,"rowRenderer",void 0),wg([de("focusService")],t.prototype,"focusService",void 0),wg([Cg(0,ge("loggerFactory"))],t.prototype,"setBeans",null),wg([ue],t.prototype,"destroyAllBlocks",null),t}(ze),Sg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Eg=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Sg(t,e),t.prototype.getRowBounds=function(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}},t.prototype.ensureRowHeightsValid=function(e,t,n,r){return!1},t.prototype.init=function(){var e=this;this.gridOptionsWrapper.isRowModelInfinite()&&(this.rowHeight=this.gridOptionsWrapper.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc((function(){return e.destroyCache()})),this.verifyProps())},t.prototype.verifyProps=function(){if(null!=this.gridOptionsWrapper.getDefaultGroupOrderComparator()){Xr.doOnce((function(){return console.warn("AG Grid: defaultGroupOrderComparator cannot be used with Infinite Row Model. If using Infinite Row Model, then sorting is done on the server side, nothing to do with the client.")}),"IRM.DefaultGroupOrderComparator")}},t.prototype.start=function(){this.setDatasource(this.gridOptionsWrapper.getDatasource())},t.prototype.destroyDatasource=function(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,Ke.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,Ke.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this))},t.prototype.onFilterChanged=function(){this.reset()},t.prototype.onSortChanged=function(){this.reset()},t.prototype.onColumnEverything=function(){(!this.cacheParams||this.isSortModelDifferent())&&this.reset()},t.prototype.isSortModelDifferent=function(){return!Xr.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())},t.prototype.getType=function(){return Ce.ROW_MODEL_TYPE_INFINITE},t.prototype.setDatasource=function(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()},t.prototype.isEmpty=function(){return!this.infiniteCache},t.prototype.isRowsToRender=function(){return!!this.infiniteCache},t.prototype.getNodesInRangeForSelection=function(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]},t.prototype.reset=function(){if(this.datasource){Xr.exists(this.gridOptionsWrapper.getRowNodeIdFunc())||this.selectionService.reset(),this.resetCache();var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}},t.prototype.createModelUpdatedEvent=function(){return{type:Ke.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,newPage:!1,newData:!1,keepRenderedRows:!0,animate:!1}},t.prototype.resetCache=function(){this.destroyCache();var e=this.gridOptionsWrapper.getMaxConcurrentDatasourceRequests();this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,maxConcurrentRequests:this.defaultIfInvalid(e,2),initialRowCount:this.defaultIfInvalid(this.gridOptionsWrapper.getInfiniteInitialRowCount(),1),maxBlocksInCache:this.gridOptionsWrapper.getMaxBlocksInCache(),rowHeight:this.gridOptionsWrapper.getRowHeightAsNumber(),overflowSize:this.defaultIfInvalid(this.gridOptionsWrapper.getCacheOverflowSize(),1),blockSize:this.defaultIfInvalid(this.gridOptionsWrapper.getCacheBlockSize(),100),lastAccessedSequence:new qr},this.infiniteCache=this.createBean(new xg(this.cacheParams))},t.prototype.defaultIfInvalid=function(e,t){return e>0?e:t},t.prototype.destroyCache=function(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))},t.prototype.onCacheUpdated=function(){var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},t.prototype.getRow=function(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)},t.prototype.getRowNode=function(e){var t=void 0;return this.forEachNode((function(n){n.id===e&&(t=n)})),t},t.prototype.forEachNode=function(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)},t.prototype.getTopLevelRowCount=function(){return this.getRowCount()},t.prototype.getTopLevelRowDisplayedIndex=function(e){return e},t.prototype.getRowIndexAtPixel=function(e){if(0!==this.rowHeight){var t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0},t.prototype.getRowCount=function(){return this.infiniteCache?this.infiniteCache.getRowCount():0},t.prototype.isRowPresent=function(e){return!!this.getRowNode(e.id)},t.prototype.refreshCache=function(){this.infiniteCache&&this.infiniteCache.refreshCache()},t.prototype.purgeCache=function(){this.infiniteCache&&this.infiniteCache.purgeCache()},t.prototype.isLastRowIndexKnown=function(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()},t.prototype.setRowCount=function(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)},Eg([de("filterManager")],t.prototype,"filterManager",void 0),Eg([de("sortController")],t.prototype,"sortController",void 0),Eg([de("selectionService")],t.prototype,"selectionService",void 0),Eg([de("gridApi")],t.prototype,"gridApi",void 0),Eg([de("columnApi")],t.prototype,"columnApi",void 0),Eg([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Eg([de("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),Eg([ce],t.prototype,"init",null),Eg([ue],t.prototype,"destroyDatasource",null),t=Eg([pe("rowModel")],t)}(ze),Rg={moduleName:t.ModuleNames.InfiniteRowModelModule,rowModels:{infinite:_g}},Og=function(){function e(){}return e.prototype.setBeans=function(e){this.beans=e},e.prototype.getFileName=function(e){var t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?e+"."+t:e},e.prototype.getMergedParamsAndData=function(e){var t=this.mergeDefaultParams(e);return{mergedParams:t,data:this.beans.gridSerializer.serialize(this.createSerializingSession(t),t)}},e.prototype.mergeDefaultParams=function(e){var t=this.getDefaultExportParams(),n={};return Xr.assign(n,t),Xr.assign(n,e),n},e}(),Ag=function(){function e(e){this.groupColumns=[];var t=e.columnModel,n=e.valueService,r=e.gridOptionsWrapper,o=e.processCellCallback,i=e.processHeaderCallback,a=e.processGroupHeaderCallback,s=e.processRowGroupCallback;this.columnModel=t,this.valueService=n,this.gridOptionsWrapper=r,this.processCellCallback=o,this.processHeaderCallback=i,this.processGroupHeaderCallback=a,this.processRowGroupCallback=s}return e.prototype.prepare=function(e){this.groupColumns=Xr.filter(e,(function(e){return!!e.getColDef().showRowGroup}))},e.prototype.extractHeaderValue=function(e){var t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""},e.prototype.extractRowCellValue=function(e,t,n,r,o){var i,a=this.gridOptionsWrapper.isGroupMultiAutoColumn()?o.rowGroupIndex:0;i=o&&o.group&&(t===a&&-1!==this.groupColumns.indexOf(e)||0===t&&this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode()))?this.createValueForGroupNode(o):this.valueService.getValue(e,o);var s=this.processCell(n,o,e,i,this.processCellCallback,r);return null!=s?s:""},e.prototype.getHeaderName=function(e,t){return e?e({column:t,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}):this.columnModel.getDisplayNameForColumn(t,"csv",!0)},e.prototype.createValueForGroupNode=function(e){if(this.processRowGroupCallback)return this.processRowGroupCallback({node:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()});var t=[e.key];if(!this.gridOptionsWrapper.isGroupMultiAutoColumn())for(;e.parent;)e=e.parent,t.push(e.key);return t.reverse().join(" -> ")},e.prototype.processCell=function(e,t,n,r,o,i){return o?o({accumulatedRowIndex:e,column:n,node:t,value:r,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),type:i}):null!=r?r:""},e}(),Pg=function(){function e(){}return e.download=function(e,t){var n=document.defaultView||window;if(n)if(n.navigator.msSaveOrOpenBlob)n.navigator.msSaveOrOpenBlob(t,e);else{var r=document.createElement("a"),o=n.URL.createObjectURL(t);r.setAttribute("href",o),r.setAttribute("download",e),r.style.display="none",document.body.appendChild(r),r.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:n})),document.body.removeChild(r),n.setTimeout((function(){n.URL.revokeObjectURL(o)}),0)}else console.warn("AG Grid: There is no `window` associated with the current `document`")},e}(),Tg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dg=function(e){function t(t){var n=e.call(this,t)||this;n.isFirstLine=!0,n.result="";var r=t.suppressQuotes,o=t.columnSeparator;return n.suppressQuotes=r,n.columnSeparator=o,n}return Tg(t,e),t.prototype.addCustomContent=function(e){var t=this;e&&("string"===typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach((function(e){t.beginNewLine(),e.forEach((function(e,n){0!==n&&(t.result+=t.columnSeparator),t.result+=t.putInQuotes(e.data.value||""),e.mergeAcross&&t.appendEmptyCells(e.mergeAcross)}))})))},t.prototype.onNewHeaderGroupingRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}},t.prototype.onNewHeaderGroupingRowColumn=function(e,t,n){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e),this.appendEmptyCells(n)},t.prototype.appendEmptyCells=function(e){for(var t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")},t.prototype.onNewHeaderRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}},t.prototype.onNewHeaderRowColumn=function(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))},t.prototype.onNewBodyRow=function(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}},t.prototype.onNewBodyRowColumn=function(e,t,n){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractRowCellValue(e,t,t,Ce.EXPORT_TYPE_CSV,n))},t.prototype.putInQuotes=function(e){return this.suppressQuotes?e:null===e||void 0===e?'""':("string"===typeof e?t=e:"function"===typeof e.toString?t=e.toString():(console.warn("unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"');var t},t.prototype.parse=function(){return this.result},t.prototype.beginNewLine=function(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1},t}(Ag),kg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ng=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Mg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kg(t,e),t.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsWrapper:this.gridOptionsWrapper})},t.prototype.getDefaultExportParams=function(){return this.gridOptionsWrapper.getDefaultExportParams("csv")},t.prototype.export=function(e){if(this.isExportSuppressed())return console.warn("ag-grid: Export cancelled. Export is not allowed as per your configuration."),"";var t=this.getMergedParamsAndData(e),n=t.mergedParams,r=t.data,o=new Blob(["\ufeff",r],{type:window.navigator.msSaveOrOpenBlob?this.getMimeType():"octet/stream"});return Pg.download(this.getFileName(n.fileName),o),r},t.prototype.exportDataAsCsv=function(e){return this.export(e)},t.prototype.getDataAsCsv=function(e){return this.getMergedParamsAndData(e).data},t.prototype.getMimeType=function(){return"text/csv;charset=utf-8;"},t.prototype.getDefaultFileName=function(){return"export.csv"},t.prototype.getDefaultFileExtension=function(){return"csv"},t.prototype.createSerializingSession=function(e){var t=this,n=t.columnModel,r=t.valueService,o=t.gridOptionsWrapper,i=e,a=i.processCellCallback,s=i.processHeaderCallback,l=i.processGroupHeaderCallback,c=i.processRowGroupCallback,u=i.suppressQuotes,p=i.columnSeparator;return new Dg({columnModel:n,valueService:r,gridOptionsWrapper:o,processCellCallback:a||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:u||!1,columnSeparator:p||","})},t.prototype.isExportSuppressed=function(){return this.gridOptionsWrapper.isSuppressCsvExport()},Ng([de("columnModel")],t.prototype,"columnModel",void 0),Ng([de("valueService")],t.prototype,"valueService",void 0),Ng([de("gridSerializer")],t.prototype,"gridSerializer",void 0),Ng([de("gridOptionsWrapper")],t.prototype,"gridOptionsWrapper",void 0),Ng([ce],t.prototype,"postConstruct",null),t=Ng([pe("csvCreator")],t)}(Og),Ig=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lg=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e[e.HEADER_GROUPING=0]="HEADER_GROUPING",e[e.HEADER=1]="HEADER",e[e.BODY=2]="BODY"}(t.RowType||(t.RowType={}));var Fg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ig(t,e),t.prototype.serialize=function(e,t){void 0===t&&(t={});var n=this.getColumnsToExport(t.allColumns,t.columnKeys);return Xr.compose(this.prepareSession(n),this.prependContent(t),this.exportColumnGroups(t,n),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t))(e).parse()},t.prototype.processRow=function(e,t,n,r){var o=t.shouldRowBeSkipped||function(){return!1},i=this.gridOptionsWrapper,a=i.getContext(),s=i.getApi(),l=i.getColumnApi(),c=i.isGroupRemoveSingleChildren(),u=i.isGroupHideOpenParents(),p=i.isGroupRemoveLowestSingleChildren(),d=this.columnModel.isPivotMode()?r.leafGroup:!r.group,h=t.skipGroups||t.skipRowGroups,f=p&&r.leafGroup,g=1===r.allChildrenCount&&(c||f);if((h&&t.skipGroups&&Xr.doOnce((function(){return console.warn("AG Grid: Since v25.2 `skipGroups` has been renamed to `skipRowGroups`.")}),"gridSerializer-skipGroups"),!(!d&&(t.skipRowGroups||g||u)||t.onlySelected&&!r.isSelected()||t.skipPinnedTop&&"top"===r.rowPinned||t.skipPinnedBottom&&"bottom"===r.rowPinned))&&((!(-1===r.level)||r.leafGroup)&&!o({node:r,api:s,context:a}))){var v=e.onNewBodyRow();if(n.forEach((function(e,t){v.onColumn(e,t,r)})),t.getCustomContentBelowRow){var m=t.getCustomContentBelowRow({node:r,api:s,columnApi:l,context:a});m&&e.addCustomContent(m)}}},t.prototype.appendContent=function(e){return function(t){var n=e.customFooter||e.appendContent;return n&&(e.customFooter&&Xr.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customFooter` param has been deprecated. Use `appendContent` instead.")}),"gridSerializer-customFooter"),t.addCustomContent(n)),t}},t.prototype.prependContent=function(e){return function(t){var n=e.customHeader||e.prependContent;return n&&(e.customHeader&&Xr.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customHeader` param has been deprecated. Use `prependContent` instead.")}),"gridSerializer-customHeader"),t.addCustomContent(n)),t}},t.prototype.prepareSession=function(e){return function(t){return t.prepare(e),t}},t.prototype.exportColumnGroups=function(e,t){var n=this;return function(r){if(e.skipColumnGroupHeaders)e.columnGroups&&Xr.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `columnGroups` param has deprecated, and groups are exported by default.")}),"gridSerializer-columnGroups");else{var o=new $e,i=n.displayedGroupCreator.createDisplayedGroups(t,n.columnModel.getGridBalancedTree(),o,null);n.recursivelyAddHeaderGroups(i,r,e.processGroupHeaderCallback)}return r}},t.prototype.exportHeaders=function(e,t){return function(n){if(e.skipHeader||e.skipColumnHeaders)e.skipHeader&&Xr.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `skipHeader` param has been renamed to `skipColumnHeaders`.")}),"gridSerializer-skipHeader");else{var r=n.onNewHeaderRow();t.forEach((function(e,t){r.onColumn(e,t,void 0)}))}return n}},t.prototype.processPinnedTopRows=function(e,t){var n=this;return function(r){var o=n.processRow.bind(n,r,e,t);return n.pinnedRowModel.forEachPinnedTopRow(o),r}},t.prototype.processRows=function(e,t){var n=this;return function(r){var o=n.rowModel,i=o.getType(),a=i===Ce.ROW_MODEL_TYPE_CLIENT_SIDE,s=i===Ce.ROW_MODEL_TYPE_SERVER_SIDE,l=!a&&e.onlySelected,c=n.processRow.bind(n,r,e,t);n.columnModel.isPivotMode()?a?o.forEachPivotNode(c):o.forEachNode(c):e.onlySelectedAllPages||l?n.selectionService.getSelectedNodes().forEach(c):a||s?o.forEachNodeAfterFilterAndSort(c):o.forEachNode(c);return r}},t.prototype.processPinnedBottomRows=function(e,t){var n=this;return function(r){var o=n.processRow.bind(n,r,e,t);return n.pinnedRowModel.forEachPinnedBottomRow(o),r}},t.prototype.getColumnsToExport=function(e,t){void 0===e&&(e=!1);var n=this.columnModel.isPivotMode();return t&&t.length?this.columnModel.getGridColumns(t):e&&!n?(this.gridOptionsWrapper.isTreeData()?this.columnModel.getGridColumns([Ce.GROUP_AUTO_COLUMN_ID]):[]).concat(this.columnModel.getAllPrimaryColumns()||[]):this.columnModel.getAllDisplayedColumns()},t.prototype.recursivelyAddHeaderGroups=function(e,t,n){var r=[];e.forEach((function(e){var t=e;t.getChildren&&t.getChildren().forEach((function(e){return r.push(e)}))})),e.length>0&&e[0]instanceof Oe&&this.doAddHeaderHeader(t,e,n),r&&r.length>0&&this.recursivelyAddHeaderGroups(r,t,n)},t.prototype.doAddHeaderHeader=function(e,t,n){var r=this,o=e.onNewHeaderGroupingRow(),i=0;t.forEach((function(e){var t,a=e;t=n?n({columnGroup:a,api:r.gridOptionsWrapper.getApi(),columnApi:r.gridOptionsWrapper.getColumnApi(),context:r.gridOptionsWrapper.getContext()}):r.columnModel.getDisplayNameForColumnGroup(a,"header"),o.onColumn(t||"",i++,a.getLeafColumns().length-1)}))},Lg([de("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),Lg([de("columnModel")],t.prototype,"columnModel",void 0),Lg([de("rowModel")],t.prototype,"rowModel",void 0),Lg([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Lg([de("selectionService")],t.prototype,"selectionService",void 0),t=Lg([pe("gridSerializer")],t)}(ze),Gg={moduleName:t.ModuleNames.CsvExportModule,beans:[Mg,Fg]},Hg="\r\n",Wg=function(){function e(){}return e.createHeader=function(e){void 0===e&&(e={});var t=["version"];return e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone"),"<?xml "+t.map((function(t){return t+'="'+e[t]+'"'})).join(" ")+" ?>"},e.createXml=function(e,t){var n=this,r="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach((function(e){Object.keys(e.map).forEach((function(o){r+=n.returnAttributeIfPopulated(e.prefix+o,e.map[o],t)}))})),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach((function(o){r+=n.returnAttributeIfPopulated(o,e.properties.rawMap[o],t)})));var o="<"+e.name+r;return e.children||null!=e.textNode?null!=e.textNode?o+">"+e.textNode+"</"+e.name+">"+Hg:(o+=">\r\n",e.children&&e.children.forEach((function(e){o+=n.createXml(e,t)})),o+"</"+e.name+">"+Hg):o+"/>"+Hg},e.returnAttributeIfPopulated=function(e,t,n){if(!t&&""!==t&&0!==t)return"";var r=t;return"boolean"===typeof t&&n&&(r=n(t))," "+e+'="'+r+'"'},e}(),Vg=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),jg=function(){function e(){}return e.addFolders=function(e){e.forEach(this.addFolder.bind(this))},e.addFolder=function(e){this.folders.push({path:e,created:new Date,isBase64:!1})},e.addFile=function(e,t,n){void 0===n&&(n=!1),this.files.push({path:e,created:new Date,content:t,isBase64:n})},e.getContent=function(e){void 0===e&&(e="application/zip");var t=this.buildFileStream(),n=this.buildUint8Array(t);return this.clearStream(),new Blob([n],{type:e})},e.clearStream=function(){this.folders=[],this.files=[]},e.buildFileStream=function(e){void 0===e&&(e="");for(var t=this.folders.concat(this.files),n=t.length,r="",o=0,i=0,a=0,s=t;a<s.length;a++){var l=s[a],c=this.getHeader(l,o),u=c.fileHeader,p=c.folderHeader,d=c.content;o+=u.length+d.length,i+=p.length,e+=u+d,r+=p}return e+r+this.buildFolderEnd(n,i,o)},e.getHeader=function(e,t){var n=e.content,r=e.path,o=e.created,i=e.isBase64,a=Xr.utf8_encode,s=Xr.decToHex,l=a(r),c=l!==r,u=this.convertTime(o),p=this.convertDate(o),d="";if(c){var h=s(1,1)+s(this.getFromCrc32Table(l),4)+l;d="up"+s(h.length,2)+h}var f=n?this.getConvertedContent(n,i):{size:0,content:""},g=f.size,v=f.content,m="\n\0"+(c?"\0\b":"\0\0")+"\0\0"+s(u,2)+s(p,2)+s(g?this.getFromCrc32Table(v):0,4)+s(g,4)+s(g,4)+s(l.length,2)+s(d.length,2);return{fileHeader:"PK\x03\x04"+m+l+d,folderHeader:"PK\x01\x02\x14\0"+m+"\0\0\0\0\0\0"+(n?"\0\0\0\0":"\x10\0\0\0")+s(t,4)+l+d,content:v||""}},e.getConvertedContent=function(e,t){return void 0===t&&(t=!1),t&&(e=e.split(";base64,")[1]),{size:(e=t?atob(e):e).length,content:e}},e.buildFolderEnd=function(e,t,n){var r=Xr.decToHex;return"PK\x05\x06\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(n,4)+"\0\0"},e.buildUint8Array=function(e){for(var t=new Uint8Array(e.length),n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t},e.getFromCrc32Table=function(e){if(!e.length)return 0;for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);var o=-1,i=0;for(r=0;r<t;r++)i=n[r],o=o>>>8^Vg[255&(o^i)];return-1^o},e.convertTime=function(e){var t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2},e.convertDate=function(e){var t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate()},e.folders=[],e.files=[],e}();xe.register(gg,!1),xe.register(Rg,!1),xe.register(Gg,!1),t.AbstractHeaderCellCtrl=Rl,t.AgAbstractField=Po,t.AgAngleSelect=mh,t.AgCheckbox=jl,t.AgColorPicker=uh,t.AgDialog=Zd,t.AgGroupComponent=jd,t.AgInputNumberField=dh,t.AgInputRange=fh,t.AgInputTextArea=nh,t.AgInputTextField=eh,t.AgPanel=qd,t.AgPromise=$r,t.AgRadioButton=_p,t.AgSelect=Go,t.AgSlider=ih,t.AgStackComponentsRegistry=Mt,t.AgToggleButton=bh,t.AlignedGridsService=od,t.AnimateShowChangeCellRenderer=zi,t.AnimateSlideCellRenderer=Xi,t.AnimationFrameService=bd,t.AutoScrollService=kc,t.AutoWidthCalculator=qu,t.Autowired=de,t.BaseComponentWrapper=Bf,t.BaseCreator=Og,t.BaseGridSerializingSession=Ag,t.Bean=pe,t.BeanStub=ze,t.Beans=ys,t.BodyDropPivotTarget=bl,t.BodyDropTarget=xl,t.CellComp=yf,t.CellCtrl=Ts,t.CellNavigationService=wp,t.CellPositionUtils=_h,t.ChangedPath=ts,t.CheckboxSelectionComponent=ea,t.ColDefUtil=Lt,t.Color=Ft,t.Column=_e,t.ColumnApi=ss,t.ColumnFactory=qe,t.ColumnGroup=Oe,t.ColumnKeyCreator=f,t.ColumnModel=ft,t.ColumnUtils=St,t.Component=io,t.ComponentUtil=Dt,t.Constants=Ce,t.Context=se,t.CssClassApplier=Fl,t.CsvCreator=Mg,t.CsvExportModule=Gg,t.CtrlsService=Jh,t.CustomTooltipFeature=to,t.DateFilter=Zo,t.DisplayedGroupCreator=Rt,t.Downloader=Pg,t.DragAndDropService=ra,t.DragService=pp,t.Environment=vd,t.EventService=we,t.Events=Ke,t.ExpressionService=Au,t.FilterManager=Cc,t.FloatingFilterMapper=Ol,t.FocusService=Iu,t.Grid=Df,t.GridApi=Eu,t.GridBodyComp=Cu,t.GridBodyCtrl=zc,t.GridComp=lp,t.GridCoreCreator=kf,t.GridCtrl=ep,t.GridHeaderComp=mc,t.GridHeaderCtrl=dl,t.GridOptionsWrapper=es,t.GridSerializer=Fg,t.GroupCellRenderer=va,t.GroupCellRendererCtrl=ha,t.GroupInstanceIdCreator=$e,t.HeaderCellCtrl=ql,t.HeaderFilterCellComp=tl,t.HeaderFilterCellCtrl=Ll,t.HeaderGroupCellCtrl=rc,t.HeaderNavigationService=cl,t.HeaderPositionUtils=Gh,t.HeaderRowComp=il,t.HeaderRowContainerComp=fc,t.HeaderRowContainerCtrl=pc,t.HeaderRowCtrl=sc,t.HorizontalResizeService=Qu,t.KeyCode=mo,t.LargeTextCellEditor=Di,t.Logger=Uu,t.LoggerFactory=zu,t.ManagedFocusFeature=Co,t.ModuleRegistry=xe,t.MouseEventService=mp,t.MoveColumnFeature=ml,t.NavigationService=Sd,t.NumberFilter=ci,t.NumberSequence=qr,t.Optional=he,t.PaginationProxy=Up,t.PinnedRowModel=Ah,t.PopupComponent=Ai,t.PopupEditorWrapper=gf,t.PopupSelectCellEditor=Li,t.PopupService=Wu,t.PopupTextCellEditor=Vi,t.PositionableFeature=Ud,t.PostConstruct=ce,t.PreConstruct=le,t.PreDestroy=ue,t.PropertyKeys=At,t.ProvidedColumnGroup=Ae,t.ProvidedFilter=Eo,t.Qualifier=ge,t.QuerySelector=function(e){return so.bind(this,e,void 0)},t.RefSelector=ao,t.ResizeObserverService=Ld,t.RowContainerComp=Ef,t.RowContainerCtrl=mu,t.RowCtrl=Hs,t.RowNode=Qi,t.RowNodeBlock=zh,t.RowNodeBlockLoader=qh,t.RowNodeSorter=$h,t.RowPositionUtils=xh,t.RowRenderer=Bs,t.ScalarFilter=Xo,t.ScrollVisibleService=Tp,t.SelectCellEditor=Mi,t.SelectableService=Td,t.SelectionService=is,t.SetLeftFeature=Tl,t.SimpleFilter=Uo,t.SortController=fp,t.StandardMenuFactory=Tf,t.StylingService=Np,t.TabGuardComp=ip,t.TabGuardCtrl=rp,t.TabbedLayout=Gf,t.TemplateService=Du,t.TextCellEditor=Hi,t.TextFilter=di,t.TextFloatingFilter=bi,t.Timer=Qr,t.TouchListener=wi,t.UserComponentFactory=za,t.UserComponentRegistry=Aa,t.ValueCache=Qp,t.ValueFormatterService=Sp,t.ValueService=Ec,t.VanillaFrameworkOverrides=Op,t.VirtualList=Vf,t.XmlFactory=Wg,t.ZipContainer=jg,t._=Xr,t.defaultGroupComparator=function(e,t,n,r,i){void 0===i&&(i=!1),console.warn("AG Grid: Since ag-grid 11.0.0 defaultGroupComparator is not necessary. You can remove this from your colDef");var a=o(n)&&n.group,s=o(r)&&r.group,l=!a&&!s;return a&&s?u(n.key,r.key,i):l?u(e,t,i):a?1:-1},t.initialiseAgGridWithAngular1=function(e){e.module("agGrid",[]).directive("agGrid",(function(){return{restrict:"A",controller:["$element","$scope","$compile","$attrs",Nf],scope:!0}}))},t.initialiseAgGridWithWebComponents=function(){if(console.warn("ag-grid: initialiseAgGridWithWebComponents is deprecated. Please use the ag-grid-webcomponent dependency instead. "),!Mf){Mf=!0,"undefined"!==typeof document&&document.registerElement||console.error("AG Grid: unable to find document.registerElement() function, unable to initialise AG Grid as a Web Component");var e=Object.create(HTMLElement.prototype);Dt.ALL_PROPERTIES.forEach((function(t){Object.defineProperty(e,t,{set:function(e){this.__agGridSetProperty(t,e)},get:function(){return this.__agGridGetProperty(t)},enumerable:!0,configurable:!0})}));var t=e;t.__agGridSetProperty=function(e,t){this.__attributes||(this.__attributes={}),this.__attributes[e]=t;var n={};n[e]={currentValue:t},this.onChange(n)},t.onChange=function(e){this._initialised&&Dt.processOnChange(e,this._gridOptions,this.api,this.columnApi)},t.__agGridGetProperty=function(e){return this.__attributes||(this.__attributes={}),this.__attributes[e]},t.setGridOptions=function(e){var t=this.globalEventListener.bind(this);this._gridOptions=Dt.copyAttributesToGridOptions(e,this);var n={globalEventListener:t};this._agGrid=new Df(this,this._gridOptions,n),this.api=e.api,this.columnApi=e.columnApi,this._initialised=!0},t.createdCallback=function(){for(var e=0;e<this.attributes.length;e++){var t=this.attributes[e];this.setPropertyFromAttribute(t)}},t.setPropertyFromAttribute=function(e){var t,n="string"===typeof(t=e.nodeName)?t.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()})):t,r=e.nodeValue;Dt.ALL_PROPERTIES.indexOf(n)>=0&&(this[n]=r)},t.attachedCallback=function(e){},t.detachedCallback=function(e){},t.attributeChangedCallback=function(e){var t=this.attributes[e];this.setPropertyFromAttribute(t)},t.globalEventListener=function(e,t){var n=e.toLowerCase(),r=new Event(n);r.agGridDetails=t,this.dispatchEvent(r);var o="on"+n;"function"===typeof this[o]&&this[o](r)},document.registerElement("ag-grid",{prototype:e})}},t.simpleHttpRequest=function(e){return new $r((function(t){var n=new XMLHttpRequest;n.open("GET",e.url),n.send(),n.onreadystatechange=function(){4===n.readyState&&200===n.status&&t(JSON.parse(n.responseText))}}))},t.stringToArray=Gt},7945:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(2791)),s=n(4282),l=n(2553),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.setGridApi=function(e,n){t.api=e,t.columnApi=n},t}return r(t,e),t.prototype.render=function(){return this.props.reactUi?a.default.createElement(l.AgGridReactUi,o({},this.props,{setGridApi:this.setGridApi})):a.default.createElement(s.AgGridReactLegacy,o({},this.props,{setGridApi:this.setGridApi}))},t}(a.Component);t.AgGridReact=c},4282:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1167),l=i(n(2007)),c=a(n(2791)),u=n(4619),p=n(6745),d=n(4584),h=n(8665),f=n(3365),g=function(e){function t(t){var n=e.call(this,t)||this;return n.props=t,n.changeDetectionService=new d.ChangeDetectionService,n.api=null,n.destroyed=!1,n.SYNCHRONOUS_CHANGE_PROPERTIES=["context"],n.portalManager=new f.PortalManager(n,t.componentWrappingElement,t.maxComponentCreationTimeMs),n}return r(t,e),t.prototype.render=function(){var e=this;return c.default.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:function(t){e.eGridDiv=t}},this.portalManager.getPortals())},t.prototype.createStyleForDiv=function(){return o({height:"100%"},this.props.containerStyle||{})},t.prototype.componentDidMount=function(){var e=this.props.modules||[],t={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new m(this,this.portalManager)},modules:e},n=this.props.gridOptions||{},r=this.props.children;p.AgGridColumn.hasChildColumns(r)&&(n.columnDefs=p.AgGridColumn.mapChildColumnDefs(r)),this.gridOptions=s.ComponentUtil.copyAttributesToGridOptions(n,this.props),new s.Grid(this.eGridDiv,this.gridOptions,t),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi,this.props.setGridApi(this.api,this.columnApi)},t.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return d.ChangeDetectionStrategyType.IdentityCheck}return d.ChangeDetectionStrategyType.DeepValueCheck},t.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},t.prototype.shouldComponentUpdate=function(e){return this.processPropsChanges(this.props,e),!1},t.prototype.componentDidUpdate=function(e){this.processPropsChanges(e,this.props)},t.prototype.processPropsChanges=function(e,t){var n={};this.extractGridPropertyChanges(e,t,n),this.extractDeclarativeColDefChanges(t,n),this.processSynchronousChanges(n),this.processAsynchronousChanges(n)},t.prototype.extractDeclarativeColDefChanges=function(e,t){if(!(this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs)){var n=!!e.debug,r="columnDefs",o=this.gridOptions.columnDefs;if(p.AgGridColumn.hasChildColumns(e.children)){var i=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),a=p.AgGridColumn.mapChildColumnDefs(e.children);i.areEqual(o,a)||(n&&console.log("agGridReact: colDefs definitions changed"),t[r]={previousValue:o,currentValue:a})}else o&&o.length>0&&(t[r]={previousValue:o,currentValue:[]})}},t.prototype.extractGridPropertyChanges=function(e,t,n){var r=this,o=!!t.debug;Object.keys(t).forEach((function(i){s._.includes(s.ComponentUtil.ALL_PROPERTIES,i)&&(r.changeDetectionService.getStrategy(r.getStrategyTypeForProp(i)).areEqual(e[i],t[i])||(o&&console.log("agGridReact: ["+i+"] property changed"),n[i]={previousValue:e[i],currentValue:t[i]}))})),s.ComponentUtil.getEventCallbacks().forEach((function(r){e[r]!==t[r]&&(o&&console.log("agGridReact: ["+r+"] event callback changed"),n[r]={previousValue:e[r],currentValue:t[r]})}))},t.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0,this.portalManager.destroy()},t.prototype.isDisableStaticMarkup=function(){return!0===this.props.disableStaticMarkup},t.prototype.isLegacyComponentRendering=function(){return!0===this.props.legacyComponentRendering},t.prototype.processSynchronousChanges=function(e){var t=o({},e);if(Object.keys(t).length>0){var n={};this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach((function(e){t[e]&&(n[e]=t[e],delete t[e])})),Object.keys(n).length>0&&this.api&&s.ComponentUtil.processOnChange(n,this.gridOptions,this.api,this.columnApi)}return t},t.prototype.processAsynchronousChanges=function(e){var t=this;Object.keys(e).length>0&&window.setTimeout((function(){t.api&&s.ComponentUtil.processOnChange(e,t.gridOptions,t.api,t.columnApi)}))},t.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3,t.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:t.MAX_COMPONENT_CREATION_TIME_IN_MS},t}(c.Component);function v(e,t){e.forEach((function(e){g[e]=t}))}t.AgGridReactLegacy=g,g.propTypes={gridOptions:l.default.object},v(s.ComponentUtil.getEventCallbacks(),l.default.func),v(s.ComponentUtil.BOOLEAN_PROPERTIES,l.default.bool),v(s.ComponentUtil.STRING_PROPERTIES,l.default.string),v(s.ComponentUtil.OBJECT_PROPERTIES,l.default.object),v(s.ComponentUtil.ARRAY_PROPERTIES,l.default.array),v(s.ComponentUtil.NUMBER_PROPERTIES,l.default.number),v(s.ComponentUtil.FUNCTION_PROPERTIES,l.default.func);var m=function(e){function t(t,n){var r=e.call(this)||this;return r.agGridReact=t,r.portalManager=n,r}return r(t,e),t.prototype.createWrapper=function(e,t){return this.agGridReact.isLegacyComponentRendering()?new u.LegacyReactComponent(e,this.agGridReact,this.portalManager,t):new h.NewReactComponent(e,this.portalManager,t)},t}(s.BaseComponentWrapper)},4619:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2791),a=n(4164),s=n(1167),l=n(294),c=n(8340),u=o(n(3507)),p=function(e){function t(t,n,r,o){var i=e.call(this,t,r,o)||this;return i.staticMarkup=null,i.staticRenderTime=0,i.parentComponent=n,i}return r(t,e),t.prototype.init=function(e){var t=this;return this.eParentElement=this.createParentElement(e),this.renderStaticMarkup(e),new s.AgPromise((function(n){return t.createReactComponent(e,n)}))},t.prototype.createReactComponent=function(e,t){var n=this;this.isStatelessComponent()||(e.ref=function(e){n.componentInstance=e,n.addParentContainerStyleAndClasses(),n.removeStaticMarkup()});var r=i.createElement(this.reactComponent,e),o=a.createPortal(r,this.eParentElement,u.default());this.portal=o,this.portalManager.mountReactPortal(o,this,(function(e){t(e),n.isStatelessComponent()&&(n.isSlowRenderer()&&n.removeStaticMarkup(),setTimeout((function(){n.removeStaticMarkup()})))}))},t.prototype.fallbackMethodAvailable=function(e){return!1},t.prototype.fallbackMethod=function(e,t){},t.prototype.isSlowRenderer=function(){return this.staticRenderTime>=t.SLOW_RENDERING_THRESHOLD},t.prototype.isNullValue=function(){return""===this.staticMarkup},t.prototype.renderStaticMarkup=function(e){if(!(this.parentComponent.isDisableStaticMarkup()||this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())){var t=console.error,n=i.createElement(this.reactComponent,e);try{console.error=function(){};var r=Date.now(),o=c.renderToStaticMarkup(n);this.staticRenderTime=Date.now()-r,console.error=t,""===o?this.staticMarkup=o:o&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=o,this.eParentElement.appendChild(this.staticMarkup))}catch(a){}finally{console.error=t}}},t.prototype.removeStaticMarkup=function(){!this.parentComponent.isDisableStaticMarkup()&&this.componentType.isCellRenderer()&&this.staticMarkup&&(this.staticMarkup.remove?(this.staticMarkup.remove(),this.staticMarkup=null):this.eParentElement.removeChild&&(this.eParentElement.removeChild(this.staticMarkup),this.staticMarkup=null))},t.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},t.SLOW_RENDERING_THRESHOLD=3,t}(l.ReactComponent);t.LegacyReactComponent=p},2553:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1167),l=i(n(2791)),c=n(6745),u=n(4584),p=n(8665),d=n(3365),h=a(n(3970)),f=n(7998),g=function(e){function t(t){var n=e.call(this,t)||this;return n.props=t,n.destroyFuncs=[],n.changeDetectionService=new u.ChangeDetectionService,n.eGui=l.default.createRef(),n.state={context:void 0},n.portalManager=new d.PortalManager(n,t.componentWrappingElement,t.maxComponentCreationTimeMs),n}return r(t,e),t.prototype.render=function(){return l.default.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:this.eGui},this.state.context&&l.default.createElement(h.default,{context:this.state.context}),this.portalManager.getPortals())},t.prototype.createStyleForDiv=function(){return o({height:"100%"},this.props.containerStyle||{})},t.prototype.componentDidMount=function(){var e=this,t=this.props.modules||[],n={providedBeanInstances:{frameworkComponentWrapper:new v(this.portalManager)},modules:t,frameworkOverrides:new f.ReactFrameworkOverrides};this.gridOptions=o({},this.props.gridOptions);var r=this.props.children;c.AgGridColumn.hasChildColumns(r)&&(this.gridOptions.columnDefs=c.AgGridColumn.mapChildColumnDefs(r)),this.gridOptions=s.ComponentUtil.copyAttributesToGridOptions(this.gridOptions,this.props),(new s.GridCoreCreator).create(this.eGui.current,this.gridOptions,(function(t){e.setState({context:t})}),n),this.destroyFuncs.push((function(){return e.gridOptions.api.destroy()})),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi,this.props.setGridApi(this.api,this.columnApi)},t.prototype.componentWillUnmount=function(){this.destroyFuncs.forEach((function(e){return e()}))},t.prototype.componentDidUpdate=function(e){this.processPropsChanges(e,this.props)},t.prototype.processPropsChanges=function(e,t){var n={};this.extractGridPropertyChanges(e,t,n),this.extractDeclarativeColDefChanges(t,n),this.processChanges(n)},t.prototype.extractDeclarativeColDefChanges=function(e,t){if(!(this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs)){var n=!!e.debug,r="columnDefs",o=this.gridOptions.columnDefs;if(c.AgGridColumn.hasChildColumns(e.children)){var i=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),a=c.AgGridColumn.mapChildColumnDefs(e.children);i.areEqual(o,a)||(n&&console.log("agGridReact: colDefs definitions changed"),t[r]={previousValue:o,currentValue:a})}else o&&o.length>0&&(t[r]={previousValue:o,currentValue:[]})}},t.prototype.extractGridPropertyChanges=function(e,t,n){var r=this,o=!!t.debug;Object.keys(t).forEach((function(i){s._.includes(s.ComponentUtil.ALL_PROPERTIES,i)&&(r.changeDetectionService.getStrategy(r.getStrategyTypeForProp(i)).areEqual(e[i],t[i])||(o&&console.log("agGridReact: ["+i+"] property changed"),n[i]={previousValue:e[i],currentValue:t[i]}))})),s.ComponentUtil.getEventCallbacks().forEach((function(r){e[r]!==t[r]&&(o&&console.log("agGridReact: ["+r+"] event callback changed"),n[r]={previousValue:e[r],currentValue:t[r]})}))},t.prototype.processChanges=function(e){this.api&&s.ComponentUtil.processOnChange(e,this.gridOptions,this.api,this.columnApi)},t.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return u.ChangeDetectionStrategyType.IdentityCheck}return u.ChangeDetectionStrategyType.DeepValueCheck},t.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},t}(l.Component);t.AgGridReactUi=g;var v=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return r(t,e),t.prototype.createWrapper=function(e,t){return new p.NewReactComponent(e,this.parent,t)},t.prototype.unwrap=function(e){return e&&e.getFrameworkComponentInstance?e.getFrameworkComponentInstance():e},t}(s.BaseComponentWrapper)},2724:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(2791));t.BeansContext=o.default.createContext({})},7627:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(2791)),a=n(6817),s=n(2724),l=n(2553);t.default=i.forwardRef((function(e,t){var n=i.useContext(s.BeansContext),o=n.ctrlsFactory,c=n.context,u=n.gridOptionsWrapper,p=n.resizeObserverService,d=n.clientSideRowModel,h=n.serverSideRowModel,f=i.useState(new a.CssClasses),g=f[0],v=f[1],m=i.useState(new a.CssClasses),y=m[0],b=m[1],w=i.useState(),C=w[0],x=w[1],S=i.useState(),E=S[0],_=S[1],R=i.useRef(),O=i.useRef(null),A=i.useMemo((function(){return g.toString()+" ag-details-row"}),[g]),P=i.useMemo((function(){return y.toString()+" ag-details-grid"}),[y]);t&&i.useImperativeHandle(t,(function(){return{refresh:function(){return R.current.refresh()}}})),i.useEffect((function(){e.template&&console.warn("AG Grid: detailCellRendererParams.template is not supported by React UI - this only works with frameworks that work against String templates. To change the template, please provide your own React Detail Cell Renderer.")}),[]),i.useEffect((function(){var t={addOrRemoveCssClass:function(e,t){return v((function(n){return n.setClass(e,t)}))},addOrRemoveDetailGridCssClass:function(e,t){return b((function(n){return n.setClass(e,t)}))},setDetailGrid:function(e){return x(e)},setRowData:function(e){return _(e)}},n=o.getInstance("detailCellRenderer");if(n){if(c.createBean(n),n.init(t,e),R.current=n,u.isDetailRowAutoHeight()){var r=function(){var t=O.current.clientHeight;if(null!=t&&t>0){setTimeout((function(){e.node.setRowHeight(t),d?d.onRowHeightChanged():h&&h.onRowHeightChanged()}),0)}};p.observeResize(O.current,r),r()}return function(){c.destroyBean(n)}}}),[]);var T=i.useCallback((function(e,t){R.current.registerDetailWithMaster(e,t)}),[]);return i.default.createElement("div",{className:A,ref:O},C&&i.default.createElement(l.AgGridReactUi,r({className:P},C,{rowData:E,setGridApi:T})))}))},5728:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1167),a=o(n(2791)),s=n(2724),l=n(8285),c=n(6817);t.default=a.memo((function e(t){var n=a.useContext(s.BeansContext).context,o=a.useRef(null),u=a.useRef(null),p=a.useRef(null),d=a.useRef(null),h=a.useRef(null),f=a.useState(),g=f[0],v=f[1],m=a.useState(),y=m[0],b=m[1],w=a.useState(),C=w[0],x=w[1],S=a.useState(new c.CssClasses),E=S[0],_=S[1],R=a.useState(new c.CssClasses),O=R[0],A=R[1],P=a.useState(new c.CssClasses),T=P[0],D=P[1],k=a.useState(new c.CssClasses),N=k[0],M=k[1];a.useEffect((function(){return l.showJsComp(g,n,u.current)}),[g]),a.useEffect((function(){var r={setInnerRenderer:function(e,t){v(e),x(t)},setChildCount:function(e){return b(e)},addOrRemoveCssClass:function(e,t){return _((function(n){return n.setClass(e,t)}))},setContractedDisplayed:function(e){return D((function(t){return t.setClass("ag-hidden",!e)}))},setExpandedDisplayed:function(e){return A((function(t){return t.setClass("ag-hidden",!e)}))},setCheckboxVisible:function(e){M((function(t){return t.setClass("ag-invisible",!e)}))}},a=n.createBean(new i.GroupCellRendererCtrl);return a.init(r,o.current,p.current,d.current,h.current,e,t),function(){n.destroyBean(a)}}),[]);var I=a.useMemo((function(){return"ag-cell-wrapper "+E.toString()}),[E]),L=a.useMemo((function(){return"ag-group-expanded "+O.toString()}),[O]),F=a.useMemo((function(){return"ag-group-contracted "+T.toString()}),[T]),G=a.useMemo((function(){return"ag-group-checkbox "+N.toString()}),[N]),H=g&&g.componentFromFramework,W=H?g.componentClass:void 0,V=null==g&&null!=C;return a.default.createElement("span",r({className:I,ref:o},t.colDef?{}:{role:"gridcell"}),a.default.createElement("span",{className:L,ref:d}),a.default.createElement("span",{className:F,ref:h}),a.default.createElement("span",{className:G,ref:p}),a.default.createElement("span",{className:"ag-group-value",ref:u},V&&a.default.createElement(a.default.Fragment,null,C),H&&a.default.createElement(W,r({},g.params))),a.default.createElement("span",{className:"ag-group-child-count"},y))}))},4148:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1167),s=o(n(2791)),l=n(6817),c=i(n(7664)),u=i(n(3930)),p=n(2724),d=n(8285);!function(e){e[e.ShowValue=0]="ShowValue",e[e.EditValue=1]="EditValue"}(t.CellCompState||(t.CellCompState={}));t.default=s.memo((function(e){var t=s.useContext(p.BeansContext).context,n=e.cellCtrl,o=e.printLayout,i=e.editingRow,h=s.useState(),f=h[0],g=h[1],v=s.useState(),m=v[0],y=v[1],b=s.useState(new l.CssClasses),w=b[0],C=b[1],x=s.useState(),S=x[0],E=x[1],_=s.useState("on"),R=_[0],O=_[1],A=s.useState(),P=A[0],T=A[1],D=s.useState(),k=D[0],N=D[1],M=s.useState(),I=M[0],L=M[1],F=s.useState(),G=F[0],H=F[1],W=s.useState(),V=W[0],j=W[1],B=s.useState(),z=B[0],U=B[1],Y=s.useState(),X=Y[0],q=Y[1],K=s.useState(),$=K[0],Q=K[1],Z=s.useState(),J=Z[0],ee=Z[1],te=s.useState(),ne=te[0],re=te[1],oe=s.useState(),ie=oe[0],ae=oe[1],se=s.useState(),le=se[0],ce=se[1],ue=s.useState(),pe=ue[0],de=ue[1],he=s.useState(!1),fe=he[0],ge=he[1],ve=s.useState(!1),me=ve[0],ye=ve[1],be=s.useState(!1),we=be[0],Ce=be[1],xe=s.useState(!1),Se=xe[0],Ee=xe[1],_e=s.useState(),Re=_e[0],Oe=_e[1],Ae=s.useRef(null),Pe=s.useRef(null),Te=s.useRef(),De=s.useRef(),ke=s.useState(),Ne=ke[0],Me=ke[1],Ie=s.useState(),Le=Ie[0],Fe=Ie[1],Ge=null!=f&&(fe||we||me||Se),He=s.useCallback((function(e,t){(De.current=t,t)&&(!function(e,t,n){var r=n.getColumn();if(!e&&t.isPopup&&t.isPopup()){var o="AG Grid: Found an issue in column "+r.getColId()+". If using ReactUI, specify an editor is a popup using colDef.cellEditorPopup=true";a._.doOnce((function(){return console.warn(o)}),"jsEditorComp-isPopup-"+n.getColumn().getColId())}if(e&&t.getPopupPosition&&null!=t.getPopupPosition()){var i="AG Grid: AG Grid: Found an issue in column "+r.getColId()+". If using ReactUI, specify an editor popup position using colDef.cellEditorPopupPosition=[value]";a._.doOnce((function(){return console.warn(i)}),"jsEditorComp-getPopupPosition-"+n.getColumn().getColId())}}(e,t,n),t.isCancelBeforeStart&&t.isCancelBeforeStart()&&setTimeout((function(){return n.stopEditing()}),0))}),[]),We=s.useCallback((function(e){return He(!0,e)}),[]),Ve=s.useCallback((function(e){return He(!1,e)}),[]);u.default(f,Ge,Le,Te,Ae),s.useEffect((function(){if(m&&!m.compDetails.componentFromFramework){var e=m.compDetails,n=!0===m.popup,r=d.createJsComp(e);if(r){var o=r.getGui();return He(n,r),n||(Ae.current.appendChild(o),r.afterGuiAttached&&r.afterGuiAttached()),Oe(r),function(){t.destroyBean(r),He(n,void 0),Oe(void 0),o&&o.parentElement&&o.parentElement.removeChild(o)}}}}),[m]),s.useEffect((function(){if(n&&t&&(ee(Ne?"cell-"+n.getInstanceId():void 0),Ne)){var e=[],r=function(t){return t&&(Ne.insertAdjacentElement("afterbegin",t.getGui()),e.push(t)),t};return fe&&r(n.createSelectionCheckbox()),we&&r(n.createDndSource()),me&&r(n.createRowDragComp()),function(){t.destroyBeans(e)}}}),[we,me,fe,Ne]);var je=s.useCallback((function(e){return Me(e)}),[]),Be=s.useCallback((function(e){return Fe(e)}),[]);s.useEffect((function(){if(n){var e={addOrRemoveCssClass:function(e,t){return C((function(n){return n.setClass(e,t)}))},setUserStyles:function(e){return E(e)},setAriaSelected:function(e){return U(e)},setAriaExpanded:function(e){return q(e)},getFocusableElement:function(){return Ae.current},setLeft:function(e){return T(e)},setWidth:function(e){return N(e)},setAriaColIndex:function(e){return Q(e)},setHeight:function(e){return L(e)},setZIndex:function(e){return re(e)},setTabIndex:function(e){return j(e)},setRole:function(e){return ae(e)},setColId:function(e){return ce(e)},setTitle:function(e){return de(e)},setUnselectable:function(e){return O(e||void 0)},setTransition:function(e){return H(e)},setIncludeSelection:function(e){return ge(e)},setIncludeRowDrag:function(e){return ye(e)},setIncludeDndSource:function(e){return Ce(e)},setForceWrapper:function(e){return Ee(e)},getCellEditor:function(){return De.current||null},getCellRenderer:function(){return Pe.current?Pe.current:Te.current},getParentOfValue:function(){return Le||Ae.current},setRenderDetails:function(e,t,n){g({value:t,compDetails:e,force:n})},setEditDetails:function(e,t,n){e?(y({compDetails:e,popup:t,popupPosition:n}),t||g(void 0)):y(void 0)}};n.setComp(e,null,Ae.current,o,i)}}),[]);var ze=s.useMemo((function(){return!!(f&&f.compDetails&&f.compDetails.componentFromFramework&&l.isComponentStateless(f.compDetails.componentClass))}),[f]),Ue=s.useMemo((function(){var e=w.toString();return Ge||(e+=" ag-cell-value"),e}),[w,Ge]),Ye=s.useMemo((function(){var e={left:P,width:k,height:I,transition:G,zIndex:ne};return a._.assign(e,S),e}),[P,k,I,G,ne,S]),Xe=s.useMemo((function(){return n.getInstanceId()}),[]);return s.default.createElement("div",{ref:Ae,className:Ue,style:Ye,tabIndex:V,"aria-selected":z,"aria-colindex":$,role:ie,"aria-expanded":X,"col-id":le,title:pe,unselectable:R,"aria-describedby":J},null!=f&&function(e,t,n,o,i,a,l,c){var u=e.compDetails,p=e.value,d=!u,h=u&&u.componentFromFramework,f=u&&u.componentClass,g=function(){return s.default.createElement(s.default.Fragment,null,d&&s.default.createElement(s.default.Fragment,null,p),h&&!a&&s.default.createElement(f,r({},u.params,{ref:n})),h&&a&&s.default.createElement(f,r({},u.params)))};return s.default.createElement(s.default.Fragment,null,o?s.default.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:l},s.default.createElement("span",{role:"presentation",id:"cell-"+t,className:"ag-cell-value",unselectable:i,ref:c},g())):g())}(f,Xe,Pe,Ge,R,ze,je,Be),null!=m&&function(e,t,n,o,i,a){var l=e.compDetails,u=l.componentClass,p=l.componentFromFramework&&!e.popup,d=l.componentFromFramework&&e.popup,h=!l.componentFromFramework&&e.popup;return s.default.createElement(s.default.Fragment,null,p&&s.default.createElement(u,r({},e.compDetails.params,{ref:t})),d&&s.default.createElement(c.default,{editDetails:e,cellCtrl:i,eParentCell:o,wrappedContent:s.default.createElement(u,r({},e.compDetails.params,{ref:n}))}),h&&a&&s.default.createElement(c.default,{editDetails:e,cellCtrl:i,eParentCell:o,jsChildComp:a}))}(m,Ve,We,Ae.current,n,Re))}))},7664:function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1167),i=r(n(2791)),a=n(4164),s=n(2724);t.default=i.memo((function(e){var t=i.useState(),n=t[0],r=t[1],l=i.useContext(s.BeansContext),c=l.context,u=l.popupService,p=l.gridOptionsWrapper;return i.useEffect((function(){var t=e.editDetails,n=e.cellCtrl,i=e.eParentCell,a=t.compDetails,s=p.isStopEditingWhenCellsLoseFocus(),l=new o.PopupEditorWrapper(a.params),d=l.getGui();if(e.jsChildComp){var h=e.jsChildComp.getGui();h&&d.appendChild(h)}var f={column:n.getColumn(),rowNode:n.getRowNode(),type:"popupCellEditor",eventSource:i,ePopup:d,keepWithinBounds:!0},g="under"===t.popupPosition?u.positionPopupUnderComponent.bind(u,f):u.positionPopupOverComponent.bind(u,f),v=p.getLocaleTextFunc(),m=u.addPopup({modal:s,eChild:d,closeOnEsc:!0,closedCallback:function(){n.onPopupEditorClosed()},anchorToElement:i,positionCallback:g,ariaLabel:v("ariaLabelCellEditor","Cell Editor")}),y=m?m.hideFunc:void 0;return r(l),e.jsChildComp&&e.jsChildComp.afterGuiAttached&&e.jsChildComp.afterGuiAttached(),function(){null!=y&&y(),c.destroyBean(l)}}),[]),i.default.createElement(i.default.Fragment,null,n&&e.wrappedContent&&a.createPortal(e.wrappedContent,n.getGui()))}))},3930:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2791),o=n(2724);t.default=function(e,t,n,i,a){var s=r.useContext(o.BeansContext),l=s.context,c=(s.userComponentFactory,r.useCallback((function(){var e=i.current;if(e){var t=e.getGui();t&&t.parentElement&&t.parentElement.removeChild(t),l.destroyBean(e),i.current=void 0}}),[]));r.useEffect((function(){var r=null!=e,o=e&&e.compDetails&&!e.compDetails.componentFromFramework;if(r&&o&&!(t&&null==n)){var s=e.compDetails;if(i.current){var l=i.current,u=!!(null!=l.refresh&&0==e.force)&&l.refresh(s.params);if(!0===u||void 0===u)return;c()}var p=s.newAgStackInstance();if(p){var d=p.resolveNow(null,(function(e){return e}));if(d){var h=d.getGui();(t?n:a.current).appendChild(h),i.current=d}}}else c()}),[e,t,n]),r.useEffect((function(){return c}),[])}},6556:function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1167),a=r(n(2791)),s=n(2724),l=o(n(332)),c=o(n(1008)),u=o(n(961)),p=n(6817);t.default=a.memo((function(){var e=a.useContext(s.BeansContext),t=e.context,n=e.agStackComponentsRegistry,r=e.resizeObserverService,o=a.useState(""),d=o[0],h=o[1],f=a.useState(0),g=f[0],v=f[1],m=a.useState(0),y=m[0],b=m[1],w=a.useState(0),C=w[0],x=w[1],S=a.useState(0),E=S[0],_=S[1],R=a.useState(""),O=R[0],A=R[1],P=a.useState(""),T=P[0],D=P[1],k=a.useState(null),N=k[0],M=k[1],I=a.useState(""),L=I[0],F=I[1],G=a.useState(null),H=G[0],W=G[1],V=a.useState(""),j=V[0],B=V[1],z=a.useState(null),U=z[0],Y=z[1],X=a.useRef(null),q=a.useRef(null),K=a.useRef(null),$=a.useRef(null);c.default(" AG Grid Body ",X),c.default(" AG Pinned Top ",q),c.default(" AG Middle ",K),c.default(" AG Pinned Bottom ",$),a.useEffect((function(){var e=[],o=[];if(t){var a=function(r){var o=n.getComponentClass(r),i=t.createBean(new o);return e.push(i),i};X.current.appendChild(document.createComment(" AG Fake Horizontal Scroll ")),X.current.appendChild(a("AG-FAKE-HORIZONTAL-SCROLL").getGui()),X.current.appendChild(document.createComment(" AG Overlay Wrapper ")),X.current.appendChild(a("AG-OVERLAY-WRAPPER").getGui());var s={setRowAnimationCssOnBodyViewport:h,setColumnCount:v,setRowCount:b,setTopHeight:x,setBottomHeight:_,setTopDisplay:A,setBottomDisplay:D,setColumnMovingCss:M,updateLayoutClasses:F,setAlwaysVerticalScrollClass:W,setPinnedTopBottomOverflowY:B,setCellSelectableCss:Y,registerBodyViewportResizeListener:function(e){var t=r.observeResize(K.current,e);o.push((function(){return t()}))}},l=t.createBean(new i.GridBodyCtrl);return e.push(l),l.setComp(s,X.current,K.current,q.current,$.current),function(){t.destroyBeans(e),o.forEach((function(e){return e()}))}}}),[]);var Q=a.useMemo((function(){return p.classesList("ag-root","ag-unselectable",N,L)}),[N,L]),Z=a.useMemo((function(){return p.classesList("ag-body-viewport",d,L,H,U)}),[d,L,H,U]),J=a.useMemo((function(){return p.classesList("ag-floating-top",U)}),[U]),ee=a.useMemo((function(){return p.classesList("ag-floating-bottom",U)}),[U]),te=a.useMemo((function(){return{height:C,minHeight:C,display:O,overflowY:j}}),[C,O,j]),ne=a.useMemo((function(){return{height:E,minHeight:E,display:T,overflowY:j}}),[E,T,j]),re=function(e){return a.default.createElement(u.default,{name:e,key:e+"-container"})},oe=function(e){var t=e.section,n=e.children,r=e.className,o=e.style,i=e.unselectable;return a.default.createElement("div",{ref:t,className:r,role:"presentation",style:o,unselectable:i},n.map(re))};return a.default.createElement("div",{ref:X,className:Q,role:"grid",unselectable:"on","aria-colcount":g,"aria-rowcount":y},a.default.createElement(l.default,null),oe({section:q,className:J,style:te,unselectable:"on",children:[i.RowContainerName.TOP_LEFT,i.RowContainerName.TOP_CENTER,i.RowContainerName.TOP_RIGHT,i.RowContainerName.TOP_FULL_WITH]}),oe({section:K,className:Z,children:[i.RowContainerName.LEFT,i.RowContainerName.CENTER,i.RowContainerName.RIGHT,i.RowContainerName.FULL_WIDTH]}),oe({section:$,className:ee,style:ne,unselectable:"on",children:[i.RowContainerName.BOTTOM_LEFT,i.RowContainerName.BOTTOM_CENTER,i.RowContainerName.BOTTOM_RIGHT,i.RowContainerName.BOTTOM_FULL_WITH]}))}))},3970:function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1167),a=r(n(2791)),s=n(2724),l=o(n(6556)),c=o(n(1008)),u=o(n(2051)),p=n(6817);t.default=a.memo((function(e){var t=e.context,n=a.useState(""),r=n[0],o=n[1],d=a.useState(""),h=d[0],f=d[1],g=a.useState(""),v=g[0],m=g[1],y=a.useState(null),b=y[0],w=y[1],C=a.useState(null),x=C[0],S=C[1],E=a.useState(!1),_=E[0],R=E[1],O=a.useState(),A=O[0],P=O[1],T=a.useRef(null),D=a.useRef(null),k=a.useRef(),N=a.useRef(null),M=a.useRef((function(){})),I=a.useCallback((function(){}),[]),L=a.useMemo((function(){return t.getBean("beans")}),[]);c.default(" AG Grid ",D),a.useEffect((function(){var e=T.current=t.createBean(new i.GridCtrl);return function(){t.destroyBean(e),T.current=null}}),[]),a.useEffect((function(){var e=T.current;M.current=e.focusInnerElement.bind(e);var t={destroyGridUi:function(){},setRtlClass:o,addOrRemoveKeyboardFocusClass:function(e){return f(e?i.FocusService.AG_KEYBOARD_FOCUS:"")},forceFocusOutOfContainer:function(){k.current.forceFocusOutOfContainer()},updateLayoutClasses:m,getFocusableContainers:function(){var e=[],t=D.current.querySelector(".ag-root"),n=D.current.querySelector(".ag-side-bar");return t&&e.push(t),n&&e.push(n),e},setCursor:w,setUserSelect:S};e.setComp(t,D.current,D.current),R(!0)}),[]),a.useEffect((function(){if(A){var e=T.current,n=[],r=L.agStackComponentsRegistry,o=r.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),i=r.getComponentClass("AG-SIDE-BAR"),a=r.getComponentClass("AG-STATUS-BAR"),s=r.getComponentClass("AG-WATERMARK"),l=r.getComponentClass("AG-PAGINATION"),c=[],u=D.current,p=N.current;if(e.showDropZones()&&o){var d=t.createBean(new o),h=d.getGui();u.insertAdjacentElement("afterbegin",h),c.push(h),n.push(d)}if(e.showSideBar()&&i){var f=t.createBean(new i),g=(h=f.getGui(),p.querySelector(".ag-tab-guard-bottom"));g&&(g.insertAdjacentElement("beforebegin",h),c.push(h)),n.push(f)}if(e.showStatusBar()&&a){var v=t.createBean(new a);h=v.getGui();u.insertAdjacentElement("beforeend",h),c.push(h),n.push(v)}if(l){var m=t.createBean(new l);h=m.getGui();u.insertAdjacentElement("beforeend",h),c.push(h),n.push(m)}if(e.showWatermark()&&s){var y=t.createBean(new s);h=y.getGui();u.insertAdjacentElement("beforeend",h),c.push(h),n.push(y)}return function(){t.destroyBeans(n),c.forEach((function(e){e.parentElement&&e.parentElement.removeChild(e)}))}}}),[A]);var F=a.useMemo((function(){return p.classesList("ag-root-wrapper",r,h,v)}),[r,h,v]),G=a.useMemo((function(){return p.classesList("ag-root-wrapper-body","ag-focus-managed",v)}),[v]),H=a.useMemo((function(){return{userSelect:null!=x?x:"",WebkitUserSelect:null!=x?x:"",cursor:null!=b?b:""}}),[x,b]),W=N.current,V=a.useCallback((function(e){k.current=e,P(!0)}),[]);return a.default.createElement("div",{ref:D,className:F,style:H},a.default.createElement("div",{className:G,ref:N},_&&W&&a.default.createElement(s.BeansContext.Provider,{value:L},a.default.createElement(u.default,{ref:V,eFocusableElement:W,onTabKeyDown:I,gridCtrl:T.current},a.default.createElement(l.default,null)))))}))},332:function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(2791)),a=n(2724),s=n(1167),l=n(6817),c=o(n(1212));t.default=i.memo((function(){var e=i.useState(new l.CssClasses),t=e[0],n=e[1],r=i.useState(),o=r[0],u=r[1],p=i.useContext(a.BeansContext).context,d=i.useRef(null);i.useEffect((function(){var e={addOrRemoveCssClass:function(e,t){return n((function(n){return n.setClass(e,t)}))},setHeightAndMinHeight:function(e){return u(e)}},t=p.createBean(new s.GridHeaderCtrl);return t.setComp(e,d.current,d.current),function(){p.destroyBean(t)}}),[]);var h=i.useMemo((function(){return"ag-header "+t.toString()}),[t]),f=i.useMemo((function(){return{height:o,minHeight:o}}),[o]);return i.default.createElement("div",{ref:d,className:h,style:f,role:"presentation",unselectable:"on"},i.default.createElement(c.default,{pinned:s.Constants.PINNED_LEFT}),i.default.createElement(c.default,{pinned:null}),i.default.createElement(c.default,{pinned:s.Constants.PINNED_RIGHT}))}))},273:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(2791)),a=n(2724),s=n(6817),l=n(8285);t.default=i.memo((function(e){var t=i.useContext(a.BeansContext).context,n=i.useState(new s.CssClasses),o=n[0],c=n[1],u=i.useState(),p=u[0],d=u[1],h=i.useState(),f=h[0],g=h[1],v=i.useState(),m=v[0],y=v[1],b=i.useState(),w=b[0],C=b[1],x=i.useState(),S=x[0],E=x[1],_=i.useState(),R=_[0],O=_[1],A=i.useRef(null),P=i.useRef(null),T=i.useRef(),D=e.ctrl;i.useEffect((function(){var e={setWidth:function(e){return d(e)},addOrRemoveCssClass:function(e,t){return c((function(n){return n.setClass(e,t)}))},setAriaSort:function(e){return C(e)},setColId:function(e){return y(e)},setTitle:function(e){return g(e)},setAriaDescribedBy:function(e){return E(e)},setUserCompDetails:function(e){return O(e)},getUserCompInstance:function(){return T.current||void 0}};D.setComp(e,A.current,P.current);var t=D.getSelectAllGui();P.current.insertAdjacentElement("afterend",t)}),[]),i.useEffect((function(){return l.showJsComp(R,t,A.current,T)}),[R]),i.useEffect((function(){var e=void 0;A.current.childNodes.forEach((function(t){null!=t&&t!==P.current&&(e=t)})),D.setDragSource(e)}),[R]);var k=i.useMemo((function(){return{width:p}}),[p]),N=i.useMemo((function(){return"ag-header-cell "+o.toString()}),[o]),M=i.useMemo((function(){return!!(R&&R.componentFromFramework&&s.isComponentStateless(R.componentClass))}),[R]),I=R&&R.componentFromFramework,L=R&&R.componentClass;return i.default.createElement("div",{ref:A,className:N,style:k,title:f,"col-id":m,"aria-sort":w,role:"columnheader",unselectable:"on",tabIndex:-1,"aria-describedby":S},i.default.createElement("div",{ref:P,className:"ag-header-cell-resize",role:"presentation"}),I&&M&&i.default.createElement(L,r({},R.params)),I&&!M&&i.default.createElement(L,r({},R.params,{ref:T})))}))},1478:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(2791)),a=n(2724),s=n(1167),l=n(6817),c=n(8285);t.default=i.memo((function(e){var t=i.useContext(a.BeansContext).context,n=i.useState(new l.CssClasses),o=n[0],u=n[1],p=i.useState(new l.CssClasses),d=p[0],h=p[1],f=i.useState(new l.CssClasses),g=f[0],v=f[1],m=i.useState(),y=m[0],b=m[1],w=i.useState(),C=w[0],x=w[1],S=i.useRef(null),E=i.useRef(null),_=i.useRef(null),R=i.useRef(null),O=i.useRef(),A=e.ctrl;i.useEffect((function(){var e={addOrRemoveCssClass:function(e,t){return u((function(n){return n.setClass(e,t)}))},addOrRemoveBodyCssClass:function(e,t){return h((function(n){return n.setClass(e,t)}))},addOrRemoveButtonWrapperCssClass:function(e,t){return v((function(n){return n.setClass(e,t)}))},setWidth:function(e){return b(e)},setCompDetails:function(e){return x(e)},getFloatingFilterComp:function(){return O.current?s.AgPromise.resolve(O.current):null},setMenuIcon:function(e){return R.current.appendChild(e)}};A.setComp(e,S.current,R.current,E.current)}),[]),i.useEffect((function(){return c.showJsComp(C,t,E.current,O)}),[C]);var P=i.useMemo((function(){return{width:y}}),[y]),T=i.useMemo((function(){return"ag-header-cell ag-floating-filter "+o.toString()}),[o]),D=i.useMemo((function(){return d.toString()}),[d]),k=i.useMemo((function(){return"ag-floating-filter-button "+g.toString()}),[d]),N=i.useMemo((function(){return!!(C&&C.componentFromFramework&&l.isComponentStateless(C.componentClass))}),[C]),M=C&&C.componentFromFramework,I=C&&C.componentClass;return i.default.createElement("div",{ref:S,className:T,style:P,role:"gridcell",tabIndex:-1},i.default.createElement("div",{ref:E,className:D,role:"presentation"},M&&N&&i.default.createElement(I,r({},C.params)),M&&!N&&i.default.createElement(I,r({},C.params,{ref:O}))),i.default.createElement("div",{ref:_,className:k,role:"presentation"},i.default.createElement("button",{ref:R,type:"button","aria-label":"Open Filter Menu",className:"ag-floating-filter-button-button",tabIndex:-1})))}))},5267:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(2791)),a=n(2724),s=n(8285),l=n(6817);t.default=i.memo((function(e){var t=i.useContext(a.BeansContext).context,n=i.useState(new l.CssClasses),o=n[0],c=n[1],u=i.useState(new l.CssClasses),p=u[0],d=u[1],h=i.useState(),f=h[0],g=h[1],v=i.useState(),m=v[0],y=v[1],b=i.useState(),w=b[0],C=b[1],x=i.useState(),S=x[0],E=x[1],_=i.useState(),R=_[0],O=_[1],A=i.useRef(null),P=i.useRef(null),T=e.ctrl;i.useEffect((function(){var e={setWidth:function(e){return g(e)},addOrRemoveCssClass:function(e,t){return c((function(n){return n.setClass(e,t)}))},setColId:function(e){return C(e)},setTitle:function(e){return y(e)},setUserCompDetails:function(e){return O(e)},addOrRemoveResizableCssClass:function(e,t){return d((function(n){return n.setClass(e,t)}))},setAriaExpanded:function(e){return E(e)}};T.setComp(e,A.current,P.current)}),[]),i.useEffect((function(){return s.showJsComp(R,t,A.current)}),[R]),i.useEffect((function(){var e=void 0;A.current.childNodes.forEach((function(t){null!=t&&t!==P.current&&(e=t)})),e&&T.setDragSource(e)}),[R]);var D=i.useMemo((function(){return{width:f}}),[f]),k=i.useMemo((function(){return"ag-header-group-cell "+o.toString()}),[o]),N=i.useMemo((function(){return"ag-header-cell-resize "+p.toString()}),[p]),M=R&&R.componentFromFramework,I=R&&R.componentClass;return i.default.createElement("div",{ref:A,className:k,style:D,title:m,"col-id":w,role:"columnheader",tabIndex:-1,"aria-expanded":S},M&&i.default.createElement(I,r({},R.params)),i.default.createElement("div",{ref:P,className:N}))}))},9979:function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1167),s=o(n(2791)),l=n(2724),c=i(n(273)),u=i(n(5267)),p=i(n(1478));t.default=s.memo((function(e){var t=s.useContext(l.BeansContext).gridOptionsWrapper,n=s.useState(),o=n[0],i=n[1],d=s.useState(),h=d[0],f=d[1],g=s.useState(),v=g[0],m=g[1],y=s.useState(),b=y[0],w=y[1],C=s.useState(),x=C[0],S=C[1],E=s.useState([]),_=E[0],R=E[1],O=s.useRef(null),A=e.ctrl,P=A.getType()===a.HeaderRowType.COLUMN,T=A.getType()===a.HeaderRowType.COLUMN_GROUP,D=A.getType()===a.HeaderRowType.FLOATING_FILTER,k=s.useCallback((function(e,n){if(t.isEnsureDomOrder())return n;var o=a._.mapById(e,(function(e){return e.getInstanceId()})),i=a._.mapById(n,(function(e){return e.getInstanceId()})),s=e.filter((function(e){return i.has(e.getInstanceId())})),l=n.filter((function(e){return!o.has(e.getInstanceId())}));return r(s,l)}),[]);s.useEffect((function(){var e={setTransform:function(e){return i(e)},setHeight:function(e){return f(e)},setTop:function(e){return m(e)},setHeaderCtrls:function(e){return R((function(t){return k(t,e)}))},setWidth:function(e){return w(e)},setAriaRowIndex:function(e){return S(e)}};A.setComp(e)}),[]);var N=s.useMemo((function(){return{transform:o,height:h,top:v,width:b}}),[o,h,v,b]),M=s.useMemo((function(){var e=["ag-header-row"];return P&&e.push("ag-header-row-column"),T&&e.push("ag-header-row-column-group"),D&&e.push("ag-header-row-column-filter"),e.join(" ")}),[]),I=s.useCallback((function(e){switch(A.getType()){case a.HeaderRowType.COLUMN_GROUP:return s.default.createElement(u.default,{ctrl:e,key:e.getInstanceId()});case a.HeaderRowType.FLOATING_FILTER:return s.default.createElement(p.default,{ctrl:e,key:e.getInstanceId()});default:return s.default.createElement(c.default,{ctrl:e,key:e.getInstanceId()})}}),[]);return s.default.createElement("div",{ref:O,className:M,role:"row",style:N,"aria-rowindex":x},_.map(I))}))},1212:function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(2791)),a=n(2724),s=n(1167),l=n(6817),c=o(n(9979));t.default=i.memo((function(e){var t=i.useState(new l.CssClasses),n=t[0],r=t[1],o=i.useState(),u=o[0],p=o[1],d=i.useState(),h=d[0],f=d[1],g=i.useState(),v=g[0],m=g[1],y=i.useState([]),b=y[0],w=y[1],C=i.useContext(a.BeansContext).context,x=i.useRef(null),S=e.pinned===s.Constants.PINNED_LEFT,E=e.pinned===s.Constants.PINNED_RIGHT,_=!S&&!E;i.useEffect((function(){var t={addOrRemoveCssClass:function(e,t){return r((function(n){return n.setClass(e,t)}))},setCtrls:function(e){return w(e)},setCenterWidth:function(e){return p(e)},setContainerTransform:function(e){return f(e)},setPinnedContainerWidth:function(e){return m(e)}},n=C.createBean(new s.HeaderRowContainerCtrl(e.pinned));return n.setComp(t,x.current),function(){C.destroyBean(n)}}),[]);var R=i.useMemo((function(){return n.toString()}),[n]),O=function(){return b.map((function(e){return i.default.createElement(c.default,{ctrl:e,key:e.getInstanceId()})}))},A=i.useMemo((function(){return{width:u,transform:h}}),[u,h]),P=i.useMemo((function(){return{width:v,minWidth:v,maxWidth:v}}),[v]);return i.default.createElement(i.default.Fragment,null,S&&i.default.createElement("div",{ref:x,className:"ag-pinned-left-header "+R,role:"presentation",style:P},O()),E&&i.default.createElement("div",{ref:x,className:"ag-pinned-right-header "+R,role:"presentation",style:P},O()),_&&i.default.createElement("div",{ref:x,className:"ag-header-viewport "+R,role:"presentation"},i.default.createElement("div",{className:"ag-header-container",role:"rowgroup",style:A},O())))}))},8285:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showJsComp=function(e,r,o,i){if(!(!e||e.componentFromFramework)){var a=t.createJsComp(e);if(a){var s=a.getGui();return o.appendChild(s),n(i,a),function(){var e=a.getGui();e&&e.parentElement&&e.parentElement.removeChild(e),r.destroyBean(a),i&&n(i,void 0)}}}};var n=function(e,t){e&&(e instanceof Function?e(t):e.current=t)};t.createJsComp=function(e){var t=e.newAgStackInstance();if(t)return t.resolveNow(null,(function(e){return e}))}},1008:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2791);t.default=function(e,t){r.useEffect((function(){var n=t.current,r=n.parentElement;if(r){var o=document.createComment(e);return r.insertBefore(o,n),function(){r.removeChild(o)}}}),[])}},7998:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1167),a=o(n(5728)),s=o(n(7627)),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameworkComponents={agGroupCellRenderer:a.default,agGroupRowRenderer:a.default,agDetailCellRenderer:s.default},t}return r(t,e),t.prototype.frameworkComponent=function(e){return this.frameworkComponents[e]},t}(i.VanillaFrameworkOverrides);t.ReactFrameworkOverrides=l},2939:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(2791)),l=n(1167),c=n(8285),u=n(6817),p=n(2724),d=a(n(4148));t.default=s.memo((function(e){var t=s.useContext(p.BeansContext).context,n=e.rowCtrl,i=e.pinned,a=s.useState(),h=a[0],f=a[1],g=s.useState(n.getInitialRowTop()),v=g[0],m=g[1],y=s.useState(n.getInitialTransform()),b=y[0],w=y[1],C=s.useState(new u.CssClasses),x=C[0],S=C[1],E=s.useState(),_=E[0],R=E[1],O=s.useState(),A=O[0],P=O[1],T=s.useState(),D=T[0],k=T[1],N=s.useState(),M=N[0],I=N[1],L=s.useState(),F=L[0],G=L[1],H=s.useState(),W=H[0],V=H[1],j=s.useState(),B=j[0],z=j[1],U=s.useState(),Y=U[0],X=U[1],q=s.useState(),K=q[0],$=q[1],Q=s.useState(),Z=Q[0],J=Q[1],ee=s.useState({list:[],instanceIdMap:new Map}),te=ee[0],ne=ee[1],re=s.useState(),oe=re[0],ie=re[1],ae=s.useState(!1),se=ae[0],le=ae[1],ce=s.useState(),ue=ce[0],pe=ce[1],de=s.useRef(null),he=s.useRef();s.useEffect((function(){var e={setDisplay:function(e){return pe(e)},setDomOrder:function(e){return le(e)},setHeight:function(e){return f(e)},setTop:function(e){return m(e)},setTransform:function(e){return w(e)},addOrRemoveCssClass:function(e,t){return S((function(n){return n.setClass(e,t)}))},setRowIndex:function(e){return R(e)},setAriaRowIndex:function(e){return V(e)},setAriaExpanded:function(e){return z(e)},setAriaLabel:function(e){return X(e)},setRowId:function(e){return P(e)},setRowBusinessKey:function(e){return I(e)},setTabIndex:function(e){return G(e)},setUserStyles:function(e){return J(e)},setAriaSelected:function(e){return $(e)},setRole:function(e){return k(e)},setCellCtrls:function(e){return ne((function(t){return function(e,t,n){if(n){var r={list:t,instanceIdMap:new Map};return t.forEach((function(e){return r.instanceIdMap.set(e.getInstanceId(),e)})),r}var i=[],a=[],s=new Map,l=new Map;return t.forEach((function(e){return l.set(e.getInstanceId(),e)})),e.list.forEach((function(e){var t=e.getInstanceId();l.has(t)&&(i.push(e),s.set(t,e))})),t.forEach((function(t){var n=t.getInstanceId();e.instanceIdMap.has(n)||(a.push(t),s.set(n,t))})),{list:o(i,a),instanceIdMap:s}}(t,e,se)}))},showFullWidth:function(e){return ie(e)},getFullWidthCellRenderer:function(){return he.current}};n.setComp(e,de.current,i)}),[]),s.useEffect((function(){return c.showJsComp(oe,t,de.current,he)}),[oe]);var fe=s.useMemo((function(){var e={height:h,top:v,transform:b,display:ue};return l._.assign(e,Z),e}),[h,v,b,Z,ue]),ge=s.useMemo((function(){return x.toString()}),[x]),ve=oe&&oe.componentFromFramework,me=null!=te,ye=s.useMemo((function(){return!!(oe&&oe.componentFromFramework&&u.isComponentStateless(oe.componentClass))}),[oe]);return s.default.createElement("div",{ref:de,role:D,className:ge,style:fe,"row-index":_,"aria-rowindex":W,"aria-expanded":B,"aria-label":Y,"aria-selected":K,"row-id":A,"row-business-key":M,tabIndex:F},me&&te.list.map((function(e){return s.default.createElement(d.default,{cellCtrl:e,editingRow:n.isEditing(),printLayout:n.isPrintLayout(),key:e.getInstanceId()})})),ve&&function(){var e=oe.componentClass;return s.default.createElement(s.default.Fragment,null,ye&&s.default.createElement(e,r({},oe.params)),!ye&&s.default.createElement(e,r({},oe.params,{ref:he})))}())}))},961:function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1167),s=o(n(2791)),l=n(6817),c=i(n(1008)),u=i(n(2939)),p=n(2724);t.default=s.memo((function(e){var t=s.useContext(p.BeansContext).context,n=s.useState(""),o=n[0],i=n[1],d=s.useState([]),h=d[0],f=d[1],g=s.useState(!1),v=g[0],m=g[1],y=s.useState(""),b=y[0],w=y[1],C=e.name,x=s.useMemo((function(){return a.RowContainerCtrl.getPinned(C)}),[C]),S=s.useRef(null),E=s.useRef(null),_=s.useRef(null),R=s.useMemo((function(){return a.RowContainerCtrl.getRowContainerCssClasses(C)}),[C]),O=s.useMemo((function(){return l.classesList(R.wrapper)}),[]),A=s.useMemo((function(){return l.classesList(R.viewport)}),[]),P=s.useMemo((function(){return l.classesList(R.container)}),[]),T=C===a.RowContainerName.CENTER,D=C===a.RowContainerName.TOP_CENTER||C===a.RowContainerName.BOTTOM_CENTER,k=!T&&!D,N=T?S:D?E:_;c.default(" AG Row Container "+C+" ",N),s.useEffect((function(){var e=[],n={setViewportHeight:i,setRowCtrls:function(e){f((function(t){if(v)return e;var n=t.filter((function(t){return e.indexOf(t)>=0})),o=e.filter((function(e){return n.indexOf(e)<0}));return r(n,o)}))},setDomOrder:function(e){return m(e)},setContainerWidth:function(e){return w(e)}},o=t.createBean(new a.RowContainerCtrl(C));return e.push(o),o.setComp(n,_.current,E.current,S.current),function(){t.destroyBeans(e)}}),[]);var M=s.useMemo((function(){return{height:o}}),[o]),I=s.useMemo((function(){return{width:b}}),[b]),L=function(){return s.default.createElement("div",{className:P,ref:_,role:"rowgroup",style:I,unselectable:"on"},h.map((function(e){return s.default.createElement(u.default,{rowCtrl:e,pinned:x,key:e.getInstanceId()})})))};return s.default.createElement(s.default.Fragment,null,T&&s.default.createElement("div",{className:O,ref:S,role:"presentation",unselectable:"on"},s.default.createElement("div",{className:A,ref:E,role:"presentation",style:M},L())),D&&s.default.createElement("div",{className:A,ref:E,role:"presentation",style:M},L()),k&&L())}))},2051:function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(2791)),i=n(1167),a=n(2724),s=o.forwardRef((function(e,t){var n=e.children,r=e.eFocusableElement,s=e.onTabKeyDown,l=e.gridCtrl,c=o.useContext(a.BeansContext).context,u=o.useRef(null),p=o.useRef(null),d=o.useRef(),h=o.useState(),f=h[0],g=h[1];o.useImperativeHandle(t,(function(){return{forceFocusOutOfContainer:function(){d.current.forceFocusOutOfContainer()}}})),o.useEffect((function(){var e=u.current,t=p.current,n={setTabIndex:function(e){return g(null==e?void 0:parseInt(e,10))}},o=d.current=c.createBean(new i.TabGuardCtrl({comp:n,eTopGuard:e,eBottomGuard:t,eFocusableElement:r,onTabKeyDown:s,focusInnerElement:function(e){return l.focusInnerElement(e)}}));return function(){c.destroyBean(o)}}),[]);var v=function(e){return o.default.createElement("div",{className:"ag-tab-guard ag-tab-guard-"+e,role:"presentation",tabIndex:f,ref:"top"===e?u:p})};return o.default.createElement(o.default.Fragment,null,v("top"),n,v("bottom"))}));t.default=o.memo(s)},6817:function(e,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.classesList=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter((function(e){return null!=e&&""!==e}));return n.join(" ")};var r=function(){function e(){this.classesMap={}}return e.prototype.setClass=function(t,r){if(!!this.classesMap[t]==r)return this;var o=new e;return o.classesMap=n({},this.classesMap),o.classesMap[t]=r,o},e.prototype.toString=function(){var e=this;return Object.keys(this.classesMap).filter((function(t){return e.classesMap[t]})).join(" ")},e}();t.CssClasses=r,t.isComponentStateless=function(e){return"function"===typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"===typeof e&&e.$$typeof===("function"===typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115)}},6745:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(2791)),l=a(n(2007)),c=i(n(1167)),u=function(e){function t(t){var n=e.call(this,t)||this;return n.props=t,n}return r(t,e),t.prototype.render=function(){return null},t.mapChildColumnDefs=function(e){return s.default.Children.map(e,(function(e){return e?t.toColDef(e.props):null}))},t.toColDef=function(e){var n=e.children,r=o(e,["children"]);return t.hasChildColumns(n)&&(r.children=t.mapChildColumnDefs(n)),r},t.hasChildColumns=function(e){return s.default.Children.count(e)>0},t}(s.Component);function p(e,t){e.forEach((function(e){u[e]=t}))}t.AgGridColumn=u,p(c.ColDefUtil.BOOLEAN_PROPERTIES,l.default.bool),p(c.ColDefUtil.STRING_PROPERTIES,l.default.string),p(c.ColDefUtil.OBJECT_PROPERTIES,l.default.object),p(c.ColDefUtil.ARRAY_PROPERTIES,l.default.array),p(c.ColDefUtil.NUMBER_PROPERTIES,l.default.number),p(c.ColDefUtil.FUNCTION_PROPERTIES,l.default.func)},4584:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.IdentityCheck="IdentityCheck",e.DeepValueCheck="DeepValueCheck",e.NoCheck="NoCheck"}(n=t.ChangeDetectionStrategyType||(t.ChangeDetectionStrategyType={}));var r=function(){function e(e){this.strategy=e}return e.prototype.areEqual=function(e,t){return this.strategy(e,t)},e}(),o=function(){function e(){}return e.prototype.areEqual=function(t,n){return e.areEquivalent(e.copy(t),e.copy(n))},e.unwrapStringOrNumber=function(e){return e instanceof Number||e instanceof String?e.valueOf():e},e.copy=function(e){if(!e)return e;if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)t.push(this.copy(e[n]));return t}return"object"!==typeof e?e:[{},e].reduce((function(e,t){return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}),{})},e.isNaN=function(e){return Number.isNaN?Number.isNaN(e):"number"===typeof e&&isNaN(e)},e.areEquivalent=function(t,n){if(t=e.unwrapStringOrNumber(t),n=e.unwrapStringOrNumber(n),t===n)return!0;if(null===t||null===n||typeof t!==typeof n)return!1;if(e.isNaN(t)&&e.isNaN(n))return!0;if(t instanceof Date)return n instanceof Date&&t.valueOf()===n.valueOf();if("function"===typeof t)return!1;if("object"!==typeof t||t.$$typeof&&"Symbol(react.element)"===t.$$typeof.toString())return t==n;if(Object.isFrozen(t)||Object.isFrozen(n))return t===n;var r=void 0===t.areEquivPropertyTracking,o=void 0===n.areEquivPropertyTracking;try{var i=void 0;if(r)t.areEquivPropertyTracking=[];else if(t.areEquivPropertyTracking.some((function(e){return e===n})))return!0;if(o)n.areEquivPropertyTracking=[];else if(n.areEquivPropertyTracking.some((function(e){return e===t})))return!0;t.areEquivPropertyTracking.push(n),n.areEquivPropertyTracking.push(t);var a={};for(i in t)"areEquivPropertyTracking"!=i&&(a[i]=null);for(i in n)"areEquivPropertyTracking"!=i&&(a[i]=null);for(i in a)if(!this.areEquivalent(t[i],n[i]))return!1;return!0}finally{r&&delete t.areEquivPropertyTracking,o&&delete n.areEquivPropertyTracking}},e}(),i=function(){function e(){var e;this.strategyMap=((e={})[n.DeepValueCheck]=new o,e[n.IdentityCheck]=new r((function(e,t){return e===t})),e[n.NoCheck]=new r((function(e,t){return!1})),e)}return e.prototype.getStrategy=function(e){return this.strategyMap[e]},e}();t.ChangeDetectionService=i},3507:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=0;t.default=function(){return"agPortalKey_"+ ++n}},8665:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(2791),s=n(4164),l=n(1167),c=n(294),u=n(8340),p=i(n(3507)),d=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.oldPortal=null,o.key=p.default(),o.portalKey=p.default(),o}return r(t,e),t.prototype.init=function(e){var t=this;return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new l.AgPromise((function(e){return t.createReactComponent(e)}))},t.prototype.createOrUpdatePortal=function(e){var t=this;this.isStatelessComponent()||(e.ref=function(e){t.componentInstance=e,t.addParentContainerStyleAndClasses()}),this.reactElement=a.createElement(this.reactComponent,o(o({},e),{key:this.key})),this.portal=s.createPortal(this.reactElement,this.eParentElement,this.portalKey)},t.prototype.createReactComponent=function(e){this.portalManager.mountReactPortal(this.portal,this,(function(t){e(t)}))},t.prototype.isNullValue=function(){return this.valueRenderedIsNull(this.params)},t.prototype.rendered=function(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},t.prototype.valueRenderedIsNull=function(e){if(this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())return!1;var t=console.error;try{return console.error=function(){},""===u.renderToStaticMarkup(a.createElement(this.reactComponent,e))}catch(n){}finally{console.error=t}return!1},t.prototype.refreshComponent=function(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)},t.prototype.fallbackMethod=function(e,t){var n=this[e+"Component"];if(n)return n.bind(this)(t)},t.prototype.fallbackMethodAvailable=function(e){return!!this[e+"Component"]},t}(c.ReactComponent);t.NewReactComponent=d},3365:function(e,t){"use strict";var n=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t,n,r){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=n||"div",this.parent=t,this.maxComponentCreationTimeMs=r||e.MAX_COMPONENT_CREATION_TIME_IN_MS}return e.prototype.getPortals=function(){return this.portals},e.prototype.destroy=function(){this.destroyed=!0},e.prototype.destroyPortal=function(e){this.portals=this.portals.filter((function(t){return t!==e})),this.batchUpdate()},e.prototype.getComponentWrappingElement=function(){return this.wrappingElement},e.prototype.mountReactPortal=function(e,t,r){this.portals=n(this.portals,[e]),this.waitForInstance(t,r),this.batchUpdate()},e.prototype.updateReactPortal=function(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()},e.prototype.batchUpdate=function(){var e=this;this.hasPendingPortalUpdate||(setTimeout((function(){e.destroyed||e.parent.forceUpdate((function(){e.hasPendingPortalUpdate=!1}))})),this.hasPendingPortalUpdate=!0)},e.prototype.waitForInstance=function(e,t,n){var r=this;if(void 0===n&&(n=Date.now()),this.destroyed)t(null);else if(e.rendered())t(e);else{if(Date.now()-n>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return e.isNullValue()?void t(e):void console.error("AG Grid: React Component '"+e.getReactComponentName()+"' not created within "+this.maxComponentCreationTimeMs+"ms");window.setTimeout((function(){r.waitForInstance(e,t,n)}))}},e.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3,e}();t.PortalManager=r},294:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(1167),i=n(9546),a=function(e){function t(t,n,r){var o=e.call(this)||this;return o.portal=null,o.reactComponent=t,o.portalManager=n,o.componentType=r,o.statelessComponent=o.isStateless(o.reactComponent),o}return r(t,e),t.prototype.getGui=function(){return this.eParentElement},t.prototype.destroy=function(){return this.componentInstance&&"function"==typeof this.componentInstance.destroy&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)},t.prototype.createParentElement=function(e){var t=this.portalManager.getComponentWrappingElement(),n=document.createElement(t||"div");return o._.addCssClass(n,"ag-react-container"),e.reactContainer=n,n},t.prototype.addParentContainerStyleAndClasses=function(){var e=this;this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&i.assignProperties(this.eParentElement.style,this.componentInstance.getReactContainerStyle()),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&this.componentInstance.getReactContainerClasses().forEach((function(t){return o._.addCssClass(e.eParentElement,t)})))},t.prototype.statelessComponentRendered=function(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0},t.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},t.prototype.isStatelessComponent=function(){return this.statelessComponent},t.prototype.getReactComponentName=function(){return this.reactComponent.name},t.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},t.prototype.hasSymbol=function(){return"function"===typeof Symbol&&Symbol.for},t.prototype.isStateless=function(e){return"function"===typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"===typeof e&&e.$$typeof===this.getMemoType()},t.prototype.hasMethod=function(e){var t=this.getFrameworkComponentInstance();return!!t&&null!==t[e]||this.fallbackMethodAvailable(e)},t.prototype.callMethod=function(e,t){var n=this,r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(r){var o=r[e];return o?o.apply(r,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}setTimeout((function(){return n.callMethod(e,t)}))},t.prototype.addMethod=function(e,t){this[e]=t},t}((function(){}));t.ReactComponent=a},9546:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignProperties=function(e,t){Object.keys(t).forEach((function(n){e[n]=t[n]}))},t.assign=function(e,n,r){if("string"===typeof n&&(n=n.split(".")),n.length>1){var o=n.shift();t.assign(e[o]="[object Object]"===Object.prototype.toString.call(e[o])?e[o]:{},n,r)}else e[n[0]]=r}},2953:function(e,t,n){t.AgGridReact=n(7945).AgGridReact,n(6745).AgGridColumn,n(4584).ChangeDetectionStrategyType,n(2553).AgGridReactUi},8700:function(e,t,n){"use strict";var r;function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return(a="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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function v(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b=function(){function e(){s(this,e)}return c(e,[{key:"shadeRGBColor",value:function(e,t){var n=t.split(","),r=e<0?0:255,o=e<0?-1*e:e,i=parseInt(n[0].slice(4),10),a=parseInt(n[1],10),s=parseInt(n[2],10);return"rgb("+(Math.round((r-i)*o)+i)+","+(Math.round((r-a)*o)+a)+","+(Math.round((r-s)*o)+s)+")"}},{key:"shadeHexColor",value:function(e,t){var n=parseInt(t.slice(1),16),r=e<0?0:255,o=e<0?-1*e:e,i=n>>16,a=n>>8&255,s=255&n;return"#"+(16777216+65536*(Math.round((r-i)*o)+i)+256*(Math.round((r-a)*o)+a)+(Math.round((r-s)*o)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(t,n){return e.isColorHex(n)?this.shadeHexColor(t,n):this.shadeRGBColor(t,n)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===a(e)&&!Array.isArray(e)&&null!=e}},{key:"is",value:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var t,n=[];for(t=0;t<e.length;t++)n[t]=e[t];return n}},{key:"extend",value:function(e,t){var n=this;"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t});var r=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach((function(o){n.isObject(t[o])&&o in e?r[o]=n.extend(e[o],t[o]):Object.assign(r,u({},o,t[o]))})),r}},{key:"extendArray",value:function(t,n){var r=[];return t.map((function(t){r.push(e.extend(n,t))})),r}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(t){if(e.is("Array",t)){for(var n=[],r=0;r<t.length;r++)n[r]=this.clone(t[r]);return n}if(e.is("Null",t))return null;if(e.is("Date",t))return t;if("object"===a(t)){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=this.clone(t[i]));return o}return t}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,t){return Math.pow(t,Math.floor(Math.log(e)/Math.log(t)))}},{key:"parseNumber",value:function(e){return null===e?e:parseFloat(e)}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){var t=String(e).split(/[eE]/);if(1===t.length)return t[0];var n="",r=e<0?"-":"",o=t[0].replace(".",""),i=Number(t[1])+1;if(i<0){for(n=r+"0.";i++;)n+="0";return n+o.replace(/^-/,"")}for(i-=o.length;i--;)n+="0";return o+n}},{key:"getDimensions",value:function(e){var t=getComputedStyle(e,null),n=e.clientHeight,r=e.clientWidth;return n-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),[r-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),n]}},{key:"getBoundingClientRect",value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce((function(e,t){return Array.isArray(t)&&(t=t.reduce((function(e,t){return e.length>t.length?e:t}))),e.length>t.length?e:t}),0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==e.substring(0,1)&&(e="#999999");var n=e.replace("#","");n=n.match(new RegExp("(.{"+n.length/3+"})","g"));for(var r=0;r<n.length;r++)n[r]=parseInt(1===n[r].length?n[r]+n[r]:n[r],16);return void 0!==t&&n.push(t),"rgba("+n.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,t){for(var n=[],r=2*Math.PI/t,o=0;o<t;o++){var i={};i.x=e*Math.sin(o*r),i.y=-e*Math.cos(o*r),n.push(i)}return n}},{key:"polarToCartesian",value:function(e,t,n,r){var o=(r-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}}},{key:"escapeString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",n=e.toString().slice();return n.replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,n){if(n>=e.length)for(var r=n-e.length+1;r--;)e.push(void 0);return e.splice(n,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e.style.key=t[n])}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var r=e.indexOf("Edge/");return r>0&&parseInt(e.substring(r+5,e.indexOf(".",r)),10)}}]),e}(),w=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.setEasingFunctions()}return c(e,[{key:"setEasingFunctions",value:function(){var e;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":e="-";break;case"easein":e="<";break;case"easeout":e=">";break;case"easeinout":default:e="<>";break;case"swing":e=function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1};break;case"bounce":e=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375};break;case"elastic":e=function(e){return e===!!e?e:Math.pow(2,-10*e)*Math.sin((e-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=e}}},{key:"animateLine",value:function(e,t,n,r){e.attr(t).animate(r).attr(n)}},{key:"animateMarker",value:function(e,t,n,r,o,i){t||(t=0),e.attr({r:t,width:t,height:t}).animate(r,o).attr({r:n,width:n.width,height:n.height}).afterAll((function(){i()}))}},{key:"animateCircle",value:function(e,t,n,r,o){e.attr({r:t.r,cx:t.cx,cy:t.cy}).animate(r,o).attr({r:n.r,cx:n.cx,cy:n.cy})}},{key:"animateRect",value:function(e,t,n,r,o){e.attr(t).animate(r).attr(n).afterAll((function(){return o()}))}},{key:"animatePathsGradually",value:function(e){var t=e.el,n=e.realIndex,r=e.j,o=e.fill,i=e.pathFrom,a=e.pathTo,s=e.speed,l=e.delay,c=this.w,u=0;c.config.chart.animations.animateGradually.enabled&&(u=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(u=0),this.morphSVG(t,n,r,"line"!==c.config.chart.type||c.globals.comboCharts?o:"stroke",i,a,s,l*u)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(e){e.el.classList.remove("apexcharts-element-hidden")}))}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof t.config.chart.events.animationEnd&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,n,r,o,i,a,s){var l=this,c=this.w;o||(o=e.attr("pathFrom")),i||(i=e.attr("pathTo"));var u=function(e){return"radar"===c.config.chart.type&&(a=1),"M 0 ".concat(c.globals.gridHeight)};(!o||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=u()),(!i||i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i=u()),c.globals.shouldAnimate||(a=1),e.plot(o).animate(1,c.globals.easing,s).plot(o).animate(a,c.globals.easing,s).plot(i).afterAll((function(){b.isNumber(n)?n===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(e):"none"!==r&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(e),l.showDelayedElements()}))}}]),e}(),C=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"getDefaultFilter",value:function(e,t){var n=this.w;e.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==n.config.states.normal.filter?this.applyFilter(e,t,n.config.states.normal.filter.type,n.config.states.normal.filter.value):n.config.chart.dropShadow.enabled&&this.dropShadow(e,n.config.chart.dropShadow,t)}},{key:"addNormalFilter",value:function(e,t){var n=this.w;n.config.chart.dropShadow.enabled&&!e.node.classList.contains("apexcharts-marker")&&this.dropShadow(e,n.config.chart.dropShadow,t)}},{key:"addLightenFilter",value:function(e,t,n){var r=this,o=this.w,i=n.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter((function(e){var n=o.config.chart.dropShadow;(n.enabled?r.addShadow(e,t,n):e).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:i}})})),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,n){var r=this,o=this.w,i=n.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter((function(e){var n=o.config.chart.dropShadow;(n.enabled?r.addShadow(e,t,n):e).componentTransfer({rgb:{type:"linear",slope:i}})})),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(n){case"none":this.addNormalFilter(e,t);break;case"lighten":this.addLightenFilter(e,t,{intensity:r});break;case"darken":this.addDarkenFilter(e,t,{intensity:r})}}},{key:"addShadow",value:function(e,t,n){var r=n.blur,o=n.top,i=n.left,a=n.color,s=n.opacity,l=e.flood(Array.isArray(a)?a[t]:a,s).composite(e.sourceAlpha,"in").offset(i,o).gaussianBlur(r).merge(e.source);return e.blend(e.source,l)}},{key:"dropShadow",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.top,o=t.left,i=t.blur,a=t.color,s=t.opacity,l=t.noUserSpaceOnUse,c=this.w;return e.unfilter(!0),b.isIE()&&"radialBar"===c.config.chart.type||(a=Array.isArray(a)?a[n]:a,e.filter((function(e){var t;t=b.isSafari()||b.isFirefox()||b.isIE()?e.flood(a,s).composite(e.sourceAlpha,"in").offset(o,r).gaussianBlur(i):e.flood(a,s).composite(e.sourceAlpha,"in").offset(o,r).gaussianBlur(i).merge(e.source),e.blend(e.source,t)})),l||e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)),e}},{key:"setSelectionFilter",value:function(e,t,n){var r=this.w;if(void 0!==r.globals.selectedDataPoints[t]&&r.globals.selectedDataPoints[t].indexOf(n)>-1){e.node.setAttribute("selected",!0);var o=r.config.states.active.filter;"none"!==o&&this.applyFilter(e,t,o.type,o.value)}}},{key:"_scaleFilterSize",value:function(e){!function(t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),e}(),x=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"drawLine",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt",l=this.w,c=l.globals.dom.Paper.line().attr({x1:e,y1:t,x2:n,y2:r,stroke:o,"stroke-dasharray":i,"stroke-width":a,"stroke-linecap":s});return c}},{key:"drawRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,u=this.w,p=u.globals.dom.Paper.rect();return p.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,rx:o,ry:o,opacity:a,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),p.node.setAttribute("fill",i),p}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",o=this.w,i=o.globals.dom.Paper.polygon(e).attr({fill:r,stroke:t,"stroke-width":n});return i}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.w;e<0&&(e=0);var r=n.globals.dom.Paper.circle(2*e);return null!==t&&r.attr(t),r}},{key:"drawPath",value:function(e){var t=e.d,n=void 0===t?"":t,r=e.stroke,o=void 0===r?"#a8a8a8":r,i=e.strokeWidth,a=void 0===i?1:i,s=e.fill,l=e.fillOpacity,c=void 0===l?1:l,u=e.strokeOpacity,p=void 0===u?1:u,d=e.classes,h=e.strokeLinecap,f=void 0===h?null:h,g=e.strokeDashArray,v=void 0===g?0:g,m=this.w;return null===f&&(f=m.config.stroke.lineCap),(n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n="M 0 ".concat(m.globals.gridHeight)),m.globals.dom.Paper.path(n).attr({fill:s,"fill-opacity":c,stroke:o,"stroke-opacity":p,"stroke-linecap":f,"stroke-width":a,"stroke-dasharray":v,class:d})}},{key:"group",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,n=t.globals.dom.Paper.group();return null!==e&&n.attr(e),n}},{key:"move",value:function(e,t){return["M",e,t].join(" ")}},{key:"line",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null;return null===n?r=["L",e,t].join(" "):"H"===n?r=["H",e].join(" "):"V"===n&&(r=["V",t].join(" ")),r}},{key:"curve",value:function(e,t,n,r,o,i){return["C",e,t,n,r,o,i].join(" ")}},{key:"quadraticCurve",value:function(e,t,n,r){return["Q",e,t,n,r].join(" ")}},{key:"arc",value:function(e,t,n,r,o,i,a){var s=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l="A";s&&(l="a");var c=[l,e,t,n,r,o,i,a].join(" ");return c}},{key:"renderPaths",value:function(e){var t,n=e.j,r=e.realIndex,o=e.pathFrom,a=e.pathTo,s=e.stroke,l=e.strokeWidth,c=e.strokeLinecap,u=e.fill,p=e.animationDelay,d=e.initialSpeed,h=e.dataChangeSpeed,f=e.className,g=e.shouldClipToGrid,v=void 0===g||g,m=e.bindEventsOnPaths,y=void 0===m||m,b=e.drawShadow,x=void 0===b||b,S=this.w,E=new C(this.ctx),_=new w(this.ctx),R=this.w.config.chart.animations.enabled,O=R&&this.w.config.chart.animations.dynamicAnimation.enabled,A=!!(R&&!S.globals.resized||O&&S.globals.dataChanged&&S.globals.shouldAnimate);A?t=o:(t=a,S.globals.animationEnded=!0);var P,T=S.config.stroke.dashArray;P=Array.isArray(T)?T[r]:S.config.stroke.dashArray;var D=this.drawPath({d:t,stroke:s,strokeWidth:l,fill:u,fillOpacity:1,classes:f,strokeLinecap:c,strokeDashArray:P});if(D.attr("index",r),v&&D.attr({"clip-path":"url(#gridRectMask".concat(S.globals.cuid,")")}),"none"!==S.config.states.normal.filter.type)E.getDefaultFilter(D,r);else if(S.config.chart.dropShadow.enabled&&x&&(!S.config.chart.dropShadow.enabledOnSeries||S.config.chart.dropShadow.enabledOnSeries&&-1!==S.config.chart.dropShadow.enabledOnSeries.indexOf(r))){var k=S.config.chart.dropShadow;E.dropShadow(D,k,r)}y&&(D.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,D)),D.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,D)),D.node.addEventListener("mousedown",this.pathMouseDown.bind(this,D))),D.attr({pathTo:a,pathFrom:o});var N={el:D,j:n,realIndex:r,pathFrom:o,pathTo:a,fill:u,strokeWidth:l,delay:p};return!R||S.globals.resized||S.globals.dataChanged?!S.globals.resized&&S.globals.dataChanged||_.showDelayedElements():_.animatePathsGradually(i(i({},N),{},{speed:d})),S.globals.dataChanged&&O&&A&&_.animatePathsGradually(i(i({},N),{},{speed:h})),D}},{key:"drawPattern",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=this.w,a=i.globals.dom.Paper.pattern(t,n,(function(i){"horizontalLines"===e?i.line(0,0,n,0).stroke({color:r,width:o+1}):"verticalLines"===e?i.line(0,0,0,t).stroke({color:r,width:o+1}):"slantedLines"===e?i.line(0,0,t,n).stroke({color:r,width:o}):"squares"===e?i.rect(t,n).fill("none").stroke({color:r,width:o}):"circles"===e&&i.circle(t).fill("none").stroke({color:r,width:o})}));return a}},{key:"drawGradient",value:function(e,t,n,r,o){var i,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,u=this.w;t.length<9&&0===t.indexOf("#")&&(t=b.hexToRgba(t,r)),n.length<9&&0===n.indexOf("#")&&(n=b.hexToRgba(n,o));var p=0,d=1,h=1,f=null;null!==s&&(p=void 0!==s[0]?s[0]/100:0,d=void 0!==s[1]?s[1]/100:1,h=void 0!==s[2]?s[2]/100:1,f=void 0!==s[3]?s[3]/100:null);var g=!("donut"!==u.config.chart.type&&"pie"!==u.config.chart.type&&"polarArea"!==u.config.chart.type&&"bubble"!==u.config.chart.type);if(i=null===l||0===l.length?u.globals.dom.Paper.gradient(g?"radial":"linear",(function(e){e.at(p,t,r),e.at(d,n,o),e.at(h,n,o),null!==f&&e.at(f,t,r)})):u.globals.dom.Paper.gradient(g?"radial":"linear",(function(e){(Array.isArray(l[c])?l[c]:l).forEach((function(t){e.at(t.offset/100,t.color,t.opacity)}))})),g){var v=u.globals.gridWidth/2,m=u.globals.gridHeight/2;"bubble"!==u.config.chart.type?i.attr({gradientUnits:"userSpaceOnUse",cx:v,cy:m,r:a}):i.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===e?i.from(0,0).to(0,1):"diagonal"===e?i.from(0,0).to(1,1):"horizontal"===e?i.from(0,1).to(1,1):"diagonal2"===e&&i.from(1,0).to(0,1);return i}},{key:"drawText",value:function(e){var t,n=e.x,r=e.y,o=e.text,i=e.textAnchor,a=e.fontSize,s=e.fontFamily,l=e.fontWeight,c=e.foreColor,u=e.opacity,p=e.cssClass,d=void 0===p?"":p,h=e.isPlainText,f=void 0===h||h,g=this.w;return void 0===o&&(o=""),i||(i="start"),c&&c.length||(c=g.config.chart.foreColor),s=s||g.config.chart.fontFamily,l=l||"regular",(t=Array.isArray(o)?g.globals.dom.Paper.text((function(e){for(var t=0;t<o.length;t++)0===t?e.tspan(o[t]):e.tspan(o[t]).newLine()})):f?g.globals.dom.Paper.plain(o):g.globals.dom.Paper.text((function(e){return e.tspan(o)}))).attr({x:n,y:r,"text-anchor":i,"dominant-baseline":"auto","font-size":a,"font-family":s,"font-weight":l,fill:c,class:"apexcharts-text "+d}),t.node.style.fontFamily=s,t.node.style.opacity=u,t}},{key:"drawMarker",value:function(e,t,n){e=e||0;var r=n.pSize||0,o=null;if("square"===n.shape||"rect"===n.shape){var i=void 0===n.pRadius?r/2:n.pRadius;null!==t&&r||(r=0,i=0);var a=1.2*r+i,s=this.drawRect(a,a,a,a,i);s.attr({x:e-a/2,y:t-a/2,cx:e,cy:t,class:n.class?n.class:"",fill:n.pointFillColor,"fill-opacity":n.pointFillOpacity?n.pointFillOpacity:1,stroke:n.pointStrokeColor,"stroke-width":n.pointStrokeWidth?n.pointStrokeWidth:0,"stroke-opacity":n.pointStrokeOpacity?n.pointStrokeOpacity:1}),o=s}else"circle"!==n.shape&&n.shape||(b.isNumber(t)||(r=0,t=0),o=this.drawCircle(r,{cx:e,cy:t,class:n.class?n.class:"",stroke:n.pointStrokeColor,fill:n.pointFillColor,"fill-opacity":n.pointFillOpacity?n.pointFillOpacity:1,"stroke-width":n.pointStrokeWidth?n.pointStrokeWidth:0,"stroke-opacity":n.pointStrokeOpacity?n.pointStrokeOpacity:1}));return o}},{key:"pathMouseEnter",value:function(e,t){var n=this.w,r=new C(this.ctx),o=parseInt(e.node.getAttribute("index"),10),i=parseInt(e.node.getAttribute("j"),10);if("function"==typeof n.config.chart.events.dataPointMouseEnter&&n.config.chart.events.dataPointMouseEnter(t,this.ctx,{seriesIndex:o,dataPointIndex:i,w:n}),this.ctx.events.fireEvent("dataPointMouseEnter",[t,this.ctx,{seriesIndex:o,dataPointIndex:i,w:n}]),("none"===n.config.states.active.filter.type||"true"!==e.node.getAttribute("selected"))&&"none"!==n.config.states.hover.filter.type&&!n.globals.isTouchDevice){var a=n.config.states.hover.filter;r.applyFilter(e,o,a.type,a.value)}}},{key:"pathMouseLeave",value:function(e,t){var n=this.w,r=new C(this.ctx),o=parseInt(e.node.getAttribute("index"),10),i=parseInt(e.node.getAttribute("j"),10);"function"==typeof n.config.chart.events.dataPointMouseLeave&&n.config.chart.events.dataPointMouseLeave(t,this.ctx,{seriesIndex:o,dataPointIndex:i,w:n}),this.ctx.events.fireEvent("dataPointMouseLeave",[t,this.ctx,{seriesIndex:o,dataPointIndex:i,w:n}]),"none"!==n.config.states.active.filter.type&&"true"===e.node.getAttribute("selected")||"none"!==n.config.states.hover.filter.type&&r.getDefaultFilter(e,o)}},{key:"pathMouseDown",value:function(e,t){var n=this.w,r=new C(this.ctx),o=parseInt(e.node.getAttribute("index"),10),i=parseInt(e.node.getAttribute("j"),10),a="false";if("true"===e.node.getAttribute("selected")){if(e.node.setAttribute("selected","false"),n.globals.selectedDataPoints[o].indexOf(i)>-1){var s=n.globals.selectedDataPoints[o].indexOf(i);n.globals.selectedDataPoints[o].splice(s,1)}}else{if(!n.config.states.active.allowMultipleDataPointsSelection&&n.globals.selectedDataPoints.length>0){n.globals.selectedDataPoints=[];var l=n.globals.dom.Paper.select(".apexcharts-series path").members,c=n.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,u=function(e){Array.prototype.forEach.call(e,(function(e){e.node.setAttribute("selected","false"),r.getDefaultFilter(e,o)}))};u(l),u(c)}e.node.setAttribute("selected","true"),a="true",void 0===n.globals.selectedDataPoints[o]&&(n.globals.selectedDataPoints[o]=[]),n.globals.selectedDataPoints[o].push(i)}if("true"===a){var p=n.config.states.active.filter;"none"!==p&&r.applyFilter(e,o,p.type,p.value)}else"none"!==n.config.states.active.filter.type&&r.getDefaultFilter(e,o);"function"==typeof n.config.chart.events.dataPointSelection&&n.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:n.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:i,w:n}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:n.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:i,w:n}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&"function"==typeof e.getBBox&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=this.w,a=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:n,foreColor:"#fff",opacity:0});r&&a.attr("transform",r),i.globals.dom.Paper.add(a);var s=a.bbox();return o||(s=a.node.getBoundingClientRect()),a.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(e,t,n){if("function"==typeof e.getComputedTextLength&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=n/1.1)){for(var r=t.length-3;r>0;r-=3)if(e.getSubStringLength(0,r)<=n/1.1)return void(e.textContent=t.substring(0,r)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n])}}]),e}(),S=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"getStackedSeriesTotals",value:function(){var e=this.w,t=[];if(0===e.globals.series.length)return t;for(var n=0;n<e.globals.series[e.globals.maxValsInArrayIndex].length;n++){for(var r=0,o=0;o<e.globals.series.length;o++)void 0!==e.globals.series[o][n]&&(r+=e.globals.series[o][n]);t.push(r)}return e.globals.stackedSeriesTotals=t,t}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===e?this.w.config.series.reduce((function(e,t){return e+t}),0):this.w.globals.series[e].reduce((function(e,t){return e+t}),0)}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===e?this.w.config.series.filter((function(e){return null!==e})):this.w.config.series[e].data.filter((function(e){return null!==e}))).length}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every((function(e,t,n){return e===n[0]}))}},{key:"getCategoryLabels",value:function(e){var t=this.w,n=e.slice();return t.config.xaxis.convertedCatToNumeric&&(n=e.map((function(e,n){return t.config.xaxis.labels.formatter(e-t.globals.minX+1)}))),n}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map((function(e){return e.length})).indexOf(Math.max.apply(Math,e.globals.series.map((function(e){return e.length}))))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach((function(e){t=Math.max(t,e)})),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach((function(e){t=Math.max(t,e.size)})),t>0&&(t+=e.config.markers.hover.sizeOffset+1),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map((function(e,t){var n=0;if(Array.isArray(e))for(var r=0;r<e.length;r++)n+=e[r];else n+=e;return n}))}},{key:"getSeriesTotalsXRange",value:function(e,t){var n=this.w;return n.globals.series.map((function(r,o){for(var i=0,a=0;a<r.length;a++)n.globals.seriesX[o][a]>e&&n.globals.seriesX[o][a]<t&&(i+=r[a]);return i}))}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map((function(t,n){var r=[];if(Array.isArray(t))for(var o=0;o<t.length;o++){var i=e.globals.stackedSeriesTotals[o],a=0;i&&(a=100*t[o]/i),r.push(a)}else{var s=100*t/e.globals.seriesTotals.reduce((function(e,t){return e+t}),0);r.push(s)}return r}))}},{key:"getCalculatedRatios",value:function(){var e,t,n,r,o=this.w.globals,i=[],a=0,s=[],l=.1,c=0;if(o.yRange=[],o.isMultipleYAxis)for(var u=0;u<o.minYArr.length;u++)o.yRange.push(Math.abs(o.minYArr[u]-o.maxYArr[u])),s.push(0);else o.yRange.push(Math.abs(o.minY-o.maxY));o.xRange=Math.abs(o.maxX-o.minX),o.zRange=Math.abs(o.maxZ-o.minZ);for(var p=0;p<o.yRange.length;p++)i.push(o.yRange[p]/o.gridHeight);if(t=o.xRange/o.gridWidth,n=Math.abs(o.initialMaxX-o.initialMinX)/o.gridWidth,e=o.yRange/o.gridWidth,r=o.xRange/o.gridHeight,(a=o.zRange/o.gridHeight*16)||(a=1),o.minY!==Number.MIN_VALUE&&0!==Math.abs(o.minY)&&(o.hasNegs=!0),o.isMultipleYAxis){s=[];for(var d=0;d<i.length;d++)s.push(-o.minYArr[d]/i[d])}else s.push(-o.minY/i[0]),o.minY!==Number.MIN_VALUE&&0!==Math.abs(o.minY)&&(l=-o.minY/e,c=o.minX/t);return{yRatio:i,invertedYRatio:e,zRatio:a,xRatio:t,initialXRatio:n,invertedXRatio:r,baseLineInvertedY:l,baseLineY:s,baseLineX:c}}},{key:"getLogSeries",value:function(e){var t=this,n=this.w;return n.globals.seriesLog=e.map((function(e,r){return n.config.yaxis[r]&&n.config.yaxis[r].logarithmic?e.map((function(e){return null===e?null:t.getLogVal(n.config.yaxis[r].logBase,e,r)})):e})),n.globals.invalidLogScale?e:n.globals.seriesLog}},{key:"getBaseLog",value:function(e,t){return Math.log(t)/Math.log(e)}},{key:"getLogVal",value:function(e,t,n){if(0===t)return 0;var r=this.w,o=0===r.globals.minYArr[n]?-1:this.getBaseLog(e,r.globals.minYArr[n]),i=(0===r.globals.maxYArr[n]?0:this.getBaseLog(e,r.globals.maxYArr[n]))-o;return t<1?t/i:(this.getBaseLog(e,t)-o)/i}},{key:"getLogYRatios",value:function(e){var t=this,n=this.w,r=this.w.globals;return r.yLogRatio=e.slice(),r.logYRange=r.yRange.map((function(e,o){if(n.config.yaxis[o]&&t.w.config.yaxis[o].logarithmic){var i,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;return r.seriesLog.forEach((function(e,t){e.forEach((function(e){n.config.yaxis[t]&&n.config.yaxis[t].logarithmic&&(a=Math.max(e,a),s=Math.min(e,s))}))})),i=Math.pow(r.yRange[o],Math.abs(s-a)/r.yRange[o]),r.yLogRatio[o]=i/r.gridHeight,i}})),r.invalidLogScale?e.slice():r.yLogRatio}}],[{key:"checkComboSeries",value:function(e){var t=!1,n=0,r=0;return e.length&&void 0!==e[0].type&&e.forEach((function(e){"bar"!==e.type&&"column"!==e.type&&"candlestick"!==e.type&&"boxPlot"!==e.type||n++,void 0!==e.type&&r++})),r>0&&(t=!0),{comboBarCount:n,comboCharts:t}}},{key:"extendArrayProps",value:function(e,t,n){return t.yaxis&&(t=e.extendYAxis(t,n)),t.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t.annotations.xaxis&&(t=e.extendXAxisAnnotations(t)),t.annotations.points&&(t=e.extendPointAnnotations(t))),t}}]),e}(),E=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t}return c(e,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.w;if("vertical"===e.label.orientation){var r=null!==t?t:0,o=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(r,"']"));if(null!==o){var i=o.getBoundingClientRect();o.setAttribute("x",parseFloat(o.getAttribute("x"))-i.height+4),"top"===e.label.position?o.setAttribute("y",parseFloat(o.getAttribute("y"))+i.width):o.setAttribute("y",parseFloat(o.getAttribute("y"))-i.width);var a=this.annoCtx.graphics.rotateAroundCenter(o),s=a.x,l=a.y;o.setAttribute("transform","rotate(-90 ".concat(s," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var n=this.w;if(!e||void 0===t.label.text||void 0!==t.label.text&&!String(t.label.text).trim())return null;var r=n.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),o=e.getBoundingClientRect(),i=t.label.style.padding.left,a=t.label.style.padding.right,s=t.label.style.padding.top,l=t.label.style.padding.bottom;"vertical"===t.label.orientation&&(s=t.label.style.padding.left,l=t.label.style.padding.right,i=t.label.style.padding.top,a=t.label.style.padding.bottom);var c=o.left-r.left-i,u=o.top-r.top-s,p=this.annoCtx.graphics.drawRect(c-n.globals.barPadForNumericAxis,u,o.width+i+a,o.height+s+l,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&p.node.classList.add(t.id),p}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,n=function(n,r,o){var i=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(r,"']"));if(i){var a=i.parentNode,s=e.addBackgroundToAnno(i,n);s&&(a.insertBefore(s.node,i),n.label.mouseEnter&&s.node.addEventListener("mouseenter",n.label.mouseEnter.bind(e,n)),n.label.mouseLeave&&s.node.addEventListener("mouseleave",n.label.mouseLeave.bind(e,n)))}};t.config.annotations.xaxis.map((function(e,t){n(e,t,"xaxis")})),t.config.annotations.yaxis.map((function(e,t){n(e,t,"yaxis")})),t.config.annotations.points.map((function(e,t){n(e,t,"point")}))}},{key:"getY1Y2",value:function(e,t){var n,r="y1"===e?t.y:t.y2,o=this.w;if(this.annoCtx.invertAxis){var i=o.globals.labels.indexOf(r);o.config.xaxis.convertedCatToNumeric&&(i=o.globals.categoryLabels.indexOf(r));var a=o.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(i+1)+")");a&&(n=parseFloat(a.getAttribute("y")))}else{var s;s=o.config.yaxis[t.yAxisIndex].logarithmic?(r=new S(this.annoCtx.ctx).getLogVal(r,t.yAxisIndex))/o.globals.yLogRatio[t.yAxisIndex]:(r-o.globals.minYArr[t.yAxisIndex])/(o.globals.yRange[t.yAxisIndex]/o.globals.gridHeight),n=o.globals.gridHeight-s,o.config.yaxis[t.yAxisIndex]&&o.config.yaxis[t.yAxisIndex].reversed&&(n=s)}return n}},{key:"getX1X2",value:function(e,t){var n=this.w,r=this.annoCtx.invertAxis?n.globals.minY:n.globals.minX,o=this.annoCtx.invertAxis?n.globals.maxY:n.globals.maxX,i=this.annoCtx.invertAxis?n.globals.yRange[0]:n.globals.xRange,a=(t.x-r)/(i/n.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(a=(o-t.x)/(i/n.globals.gridWidth)),"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||n.globals.dataFormatXNumeric||(a=this.getStringX(t.x));var s=(t.x2-r)/(i/n.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(s=(o-t.x2)/(i/n.globals.gridWidth)),"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||n.globals.dataFormatXNumeric||(s=this.getStringX(t.x2)),"x1"===e?a:s}},{key:"getStringX",value:function(e){var t=this.w,n=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var r=t.globals.labels.indexOf(e),o=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(r+1)+")");return o&&(n=parseFloat(o.getAttribute("x"))),n}}]),e}(),_=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new E(this.annoCtx)}return c(e,[{key:"addXaxisAnnotation",value:function(e,t,n){var r,o=this.w,i=this.helpers.getX1X2("x1",e),a=e.label.text,s=e.strokeDashArray;if(b.isNumber(i)){if(null===e.x2||void 0===e.x2){var l=this.annoCtx.graphics.drawLine(i+e.offsetX,0+e.offsetY,i+e.offsetX,o.globals.gridHeight+e.offsetY,e.borderColor,s,e.borderWidth);t.appendChild(l.node),e.id&&l.node.classList.add(e.id)}else{if((r=this.helpers.getX1X2("x2",e))<i){var c=i;i=r,r=c}var u=this.annoCtx.graphics.drawRect(i+e.offsetX,0+e.offsetY,r-i,o.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,s);u.node.classList.add("apexcharts-annotation-rect"),u.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),t.appendChild(u.node),e.id&&u.node.classList.add(e.id)}var p="top"===e.label.position?4:o.globals.gridHeight,d=this.annoCtx.graphics.getTextRects(a,parseFloat(e.label.style.fontSize)),h=this.annoCtx.graphics.drawText({x:i+e.label.offsetX,y:p+e.label.offsetY-("vertical"===e.label.orientation?"top"===e.label.position?d.width/2-12:-d.width/2:0),text:a,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});h.attr({rel:n}),t.appendChild(h.node),this.annoCtx.helpers.setOrientations(e,n)}}},{key:"drawXAxisAnnotations",value:function(){var e=this,t=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map((function(t,r){e.addXaxisAnnotation(t,n.node,r)})),n}}]),e}(),R=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t,this.helpers=new E(this.annoCtx)}return c(e,[{key:"addYaxisAnnotation",value:function(e,t,n){var r,o=this.w,i=e.strokeDashArray,a=this.helpers.getY1Y2("y1",e),s=e.label.text;if(null===e.y2||void 0===e.y2){var l=this.annoCtx.graphics.drawLine(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),a+e.offsetY,e.borderColor,i,e.borderWidth);t.appendChild(l.node),e.id&&l.node.classList.add(e.id)}else{if((r=this.helpers.getY1Y2("y2",e))>a){var c=a;a=r,r=c}var u=this.annoCtx.graphics.drawRect(0+e.offsetX,r+e.offsetY,this._getYAxisAnnotationWidth(e),a-r,0,e.fillColor,e.opacity,1,e.borderColor,i);u.node.classList.add("apexcharts-annotation-rect"),u.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),t.appendChild(u.node),e.id&&u.node.classList.add(e.id)}var p="right"===e.label.position?o.globals.gridWidth:0,d=this.annoCtx.graphics.drawText({x:p+e.label.offsetX,y:(null!=r?r:a)+e.label.offsetY-3,text:s,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});d.attr({rel:n}),t.appendChild(d.node)}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return t.globals.gridWidth,(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.map((function(t,r){e.addYaxisAnnotation(t,n.node,r)})),n}}]),e}(),O=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t,this.helpers=new E(this.annoCtx)}return c(e,[{key:"addPointAnnotation",value:function(e,t,n){this.w;var r=this.helpers.getX1X2("x1",e),o=this.helpers.getY1Y2("y1",e);if(b.isNumber(r)){var i={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},a=this.annoCtx.graphics.drawMarker(r+e.marker.offsetX,o+e.marker.offsetY,i);t.appendChild(a.node);var s=e.label.text?e.label.text:"",l=this.annoCtx.graphics.drawText({x:r+e.label.offsetX,y:o+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:s,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(l.attr({rel:n}),t.appendChild(l.node),e.customSVG.SVG){var c=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});c.attr({transform:"translate(".concat(r+e.customSVG.offsetX,", ").concat(o+e.customSVG.offsetY,")")}),c.node.innerHTML=e.customSVG.SVG,t.appendChild(c.node)}if(e.image.path){var u=e.image.width?e.image.width:20,p=e.image.height?e.image.height:20;a=this.annoCtx.addImage({x:r+e.image.offsetX-u/2,y:o+e.image.offsetY-p/2,width:u,height:p,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&a.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&a.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e))}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map((function(t,r){e.addPointAnnotation(t,n.node,r)})),n}}]),e}(),A={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},P=function(){function e(){s(this,e),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:0,mouseEnter:void 0,mouseLeave:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return c(e,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[A],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(e){return new Date(e).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,rangeBarOverlap:!0,rangeBarGroupRows:!1,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal"}},bubble:{minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce((function(e,t){return e+t}),0)/e.globals.series.length+"%"}}}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce((function(e,t){return e+t}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return null!==e?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),e}(),T=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.graphics=new x(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new E(this),this.xAxisAnnotations=new _(this),this.yAxisAnnotations=new R(this),this.pointsAnnotations=new O(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return c(e,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),n=this.xAxisAnnotations.drawXAxisAnnotations(),r=this.pointsAnnotations.drawPointAnnotations(),o=e.config.chart.animations.enabled,i=[t,n,r],a=[n.node,t.node,r.node],s=0;s<3;s++)e.globals.dom.elGraphical.add(i[s]),!o||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&e.globals.dataPoints>1&&a[s].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:a[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map((function(t,n){e.addImage(t,n)}))}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map((function(t,n){e.addText(t,n)}))}},{key:"addXaxisAnnotation",value:function(e,t,n){this.xAxisAnnotations.addXaxisAnnotation(e,t,n)}},{key:"addYaxisAnnotation",value:function(e,t,n){this.yAxisAnnotations.addYaxisAnnotation(e,t,n)}},{key:"addPointAnnotation",value:function(e,t,n){this.pointsAnnotations.addPointAnnotation(e,t,n)}},{key:"addText",value:function(e,t){var n=e.x,r=e.y,o=e.text,i=e.textAnchor,a=e.foreColor,s=e.fontSize,l=e.fontFamily,c=e.fontWeight,u=e.cssClass,p=e.backgroundColor,d=e.borderWidth,h=e.strokeDashArray,f=e.borderRadius,g=e.borderColor,v=e.appendTo,m=void 0===v?".apexcharts-annotations":v,y=e.paddingLeft,b=void 0===y?4:y,w=e.paddingRight,C=void 0===w?4:w,x=e.paddingBottom,S=void 0===x?2:x,E=e.paddingTop,_=void 0===E?2:E,R=this.w,O=this.graphics.drawText({x:n,y:r,text:o,textAnchor:i||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||R.config.chart.fontFamily,foreColor:a||R.config.chart.foreColor,cssClass:u}),A=R.globals.dom.baseEl.querySelector(m);A&&A.appendChild(O.node);var P=O.bbox();if(o){var T=this.graphics.drawRect(P.x-b,P.y-_,P.width+b+C,P.height+S+_,f,p||"transparent",1,d,g,h);A.insertBefore(T.node,O.node)}}},{key:"addImage",value:function(e,t){var n=this.w,r=e.path,o=e.x,i=void 0===o?0:o,a=e.y,s=void 0===a?0:a,l=e.width,c=void 0===l?20:l,u=e.height,p=void 0===u?20:u,d=e.appendTo,h=void 0===d?".apexcharts-annotations":d,f=n.globals.dom.Paper.image(r);f.size(c,p).move(i,s);var g=n.globals.dom.baseEl.querySelector(h);return g&&g.appendChild(f.node),f}},{key:"addXaxisAnnotationExternal",value:function(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:"xaxis",contextMethod:n.addXaxisAnnotation}),n}},{key:"addYaxisAnnotationExternal",value:function(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:"yaxis",contextMethod:n.addYaxisAnnotation}),n}},{key:"addPointAnnotationExternal",value:function(e,t,n){return void 0===this.invertAxis&&(this.invertAxis=n.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:"point",contextMethod:n.addPointAnnotation}),n}},{key:"addAnnotationExternal",value:function(e){var t=e.params,n=e.pushToMemory,r=e.context,o=e.type,i=e.contextMethod,a=r,s=a.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations")),c=l.childNodes.length+1,u=new P,p=Object.assign({},"xaxis"===o?u.xAxisAnnotation:"yaxis"===o?u.yAxisAnnotation:u.pointAnnotation),d=b.extend(p,t);switch(o){case"xaxis":this.addXaxisAnnotation(d,l,c);break;case"yaxis":this.addYaxisAnnotation(d,l,c);break;case"point":this.addPointAnnotation(d,l,c)}var h=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(c,"']")),f=this.helpers.addBackgroundToAnno(h,d);return f&&l.insertBefore(f.node,h),n&&s.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:b.randomId(),method:i,label:"addAnnotation",params:t}),r}},{key:"clearAnnotations",value:function(e){var t=e.w,n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");t.globals.memory.methodsToExec.map((function(e,n){"addText"!==e.label&&"addAnnotation"!==e.label||t.globals.memory.methodsToExec.splice(n,1)})),n=b.listToArray(n),Array.prototype.forEach.call(n,(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}))}},{key:"removeAnnotation",value:function(e,t){var n=e.w,r=n.globals.dom.baseEl.querySelectorAll(".".concat(t));r&&(n.globals.memory.methodsToExec.map((function(e,r){e.id===t&&n.globals.memory.methodsToExec.splice(r,1)})),Array.prototype.forEach.call(r,(function(e){e.parentElement.removeChild(e)})))}}]),e}(),D=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.opts=null,this.seriesIndex=0}return c(e,[{key:"clippedImgArea",value:function(e){var t=this.w,n=t.config,r=parseInt(t.globals.gridWidth,10),o=parseInt(t.globals.gridHeight,10),i=r>o?r:o,a=e.image,s=0,l=0;void 0===e.width&&void 0===e.height?void 0!==n.fill.image.width&&void 0!==n.fill.image.height?(s=n.fill.image.width+1,l=n.fill.image.height):(s=i+1,l=i):(s=e.width,l=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");x.setAttrs(c,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var u=document.createElementNS(t.globals.SVGNS,"image");c.appendChild(u),u.setAttributeNS(window.SVG.xlink,"href",a),x.setAttrs(u,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),u.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(e){var t=this.w;return("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||"heatmap"===t.config.chart.type||"treemap"===t.config.chart.type?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var n,r,o,i=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var a=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(a=t.globals.seriesColors[this.seriesIndex]),"function"==typeof a&&(a=a({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var s=this.getFillType(this.seriesIndex),l=Array.isArray(i.fill.opacity)?i.fill.opacity[this.seriesIndex]:i.fill.opacity;e.color&&(a=e.color);var c=a;if(-1===a.indexOf("rgb")?a.length<9&&(c=b.hexToRgba(a,l)):a.indexOf("rgba")>-1&&(l=b.getOpacityFromRGBA(a)),e.opacity&&(l=e.opacity),"pattern"===s&&(r=this.handlePatternFill(r,a,l,c)),"gradient"===s&&(o=this.handleGradientFill(a,l,this.seriesIndex)),"image"===s){var u=i.fill.image.src,p=e.patternID?e.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(u)?e.seriesNumber<u.length?u[e.seriesNumber]:u[0]:u,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:"pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(p)}),n="url(#pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(p,")")}else n="gradient"===s?o:"pattern"===s?r:c;return e.solid&&(n=c),n}},{key:"getFillType",value:function(e){var t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,t=e.config,n=this.opts,r=[];return e.globals.comboCharts?"line"===e.config.series[this.seriesIndex].type?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors):"line"===t.chart.type?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors),void 0!==n.fillColors&&(r=[],Array.isArray(n.fillColors)?r=n.fillColors.slice():r.push(n.fillColors)),r}},{key:"handlePatternFill",value:function(e,t,n,r){var o=this.w.config,i=this.opts,a=new x(this.ctx),s=void 0===o.fill.pattern.strokeWidth?Array.isArray(o.stroke.width)?o.stroke.width[this.seriesIndex]:o.stroke.width:Array.isArray(o.fill.pattern.strokeWidth)?o.fill.pattern.strokeWidth[this.seriesIndex]:o.fill.pattern.strokeWidth,l=t;return Array.isArray(o.fill.pattern.style)?void 0!==o.fill.pattern.style[i.seriesNumber]?a.drawPattern(o.fill.pattern.style[i.seriesNumber],o.fill.pattern.width,o.fill.pattern.height,l,s,n):r:a.drawPattern(o.fill.pattern.style,o.fill.pattern.width,o.fill.pattern.height,l,s,n)}},{key:"handleGradientFill",value:function(e,t,n){var r,o=this.w.config,i=this.opts,a=new x(this.ctx),s=new b,l=o.fill.gradient.type,c=e,u=void 0===o.fill.gradient.opacityFrom?t:Array.isArray(o.fill.gradient.opacityFrom)?o.fill.gradient.opacityFrom[n]:o.fill.gradient.opacityFrom;c.indexOf("rgba")>-1&&(u=b.getOpacityFromRGBA(c));var p=void 0===o.fill.gradient.opacityTo?t:Array.isArray(o.fill.gradient.opacityTo)?o.fill.gradient.opacityTo[n]:o.fill.gradient.opacityTo;if(void 0===o.fill.gradient.gradientToColors||0===o.fill.gradient.gradientToColors.length)r="dark"===o.fill.gradient.shade?s.shadeColor(-1*parseFloat(o.fill.gradient.shadeIntensity),e.indexOf("rgb")>-1?b.rgb2hex(e):e):s.shadeColor(parseFloat(o.fill.gradient.shadeIntensity),e.indexOf("rgb")>-1?b.rgb2hex(e):e);else if(o.fill.gradient.gradientToColors[i.seriesNumber]){var d=o.fill.gradient.gradientToColors[i.seriesNumber];r=d,d.indexOf("rgba")>-1&&(p=b.getOpacityFromRGBA(d))}else r=e;if(o.fill.gradient.inverseColors){var h=c;c=r,r=h}return c.indexOf("rgb")>-1&&(c=b.rgb2hex(c)),r.indexOf("rgb")>-1&&(r=b.rgb2hex(r)),a.drawGradient(l,c,r,u,p,i.size,o.fill.gradient.stops,o.fill.gradient.colorStops,n)}}]),e}(),k=function(){function e(t,n){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var t=0;t<=e.globals.series.length;t++)void 0===e.globals.markers.size[t]&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map((function(t){return e.config.markers.size}))}},{key:"plotChartMarkers",value:function(e,t,n,r){var o,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=this.w,s=t,l=e,c=null,u=new x(this.ctx),p=a.config.markers.discrete&&a.config.markers.discrete.length;if((a.globals.markers.size[t]>0||i||p)&&(c=u.group({class:i||p?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(l.x))for(var d=0;d<l.x.length;d++){var h=n;1===n&&0===d&&(h=0),1===n&&1===d&&(h=1);var f="apexcharts-marker";"line"!==a.config.chart.type&&"area"!==a.config.chart.type||a.globals.comboCharts||a.config.tooltip.intersect||(f+=" no-pointer-events");var g=Array.isArray(a.config.markers.size)?a.globals.markers.size[t]>0:a.config.markers.size>0;if(g||i||p){b.isNumber(l.y[d])?f+=" w".concat(b.randomId()):f="apexcharts-nullpoint";var v=this.getMarkerConfig({cssClass:f,seriesIndex:t,dataPointIndex:h});a.config.series[s].data[h]&&(a.config.series[s].data[h].fillColor&&(v.pointFillColor=a.config.series[s].data[h].fillColor),a.config.series[s].data[h].strokeColor&&(v.pointStrokeColor=a.config.series[s].data[h].strokeColor)),r&&(v.pSize=r),(o=u.drawMarker(l.x[d],l.y[d],v)).attr("rel",h),o.attr("j",h),o.attr("index",t),o.node.setAttribute("default-marker-size",v.pSize);var m=new C(this.ctx);m.setSelectionFilter(o,t,h),this.addEvents(o),c&&c.add(o)}else void 0===a.globals.pointsArray[t]&&(a.globals.pointsArray[t]=[]),a.globals.pointsArray[t].push([l.x[d],l.y[d]])}return c}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,n=e.seriesIndex,r=e.dataPointIndex,o=void 0===r?null:r,i=e.finishRadius,a=void 0===i?null:i,s=this.w,l=this.getMarkerStyle(n),c=s.globals.markers.size[n],u=s.config.markers;return null!==o&&u.discrete.length&&u.discrete.map((function(e){e.seriesIndex===n&&e.dataPointIndex===o&&(l.pointStrokeColor=e.strokeColor,l.pointFillColor=e.fillColor,c=e.size,l.pointShape=e.shape)})),{pSize:null===a?c:a,pRadius:u.radius,width:Array.isArray(u.width)?u.width[n]:u.width,height:Array.isArray(u.height)?u.height[n]:u.height,pointStrokeWidth:Array.isArray(u.strokeWidth)?u.strokeWidth[n]:u.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(u.shape)?u.shape[n]:u.shape),class:t,pointStrokeOpacity:Array.isArray(u.strokeOpacity)?u.strokeOpacity[n]:u.strokeOpacity,pointStrokeDashArray:Array.isArray(u.strokeDashArray)?u.strokeDashArray[n]:u.strokeDashArray,pointFillOpacity:Array.isArray(u.fillOpacity)?u.fillOpacity[n]:u.fillOpacity,seriesIndex:n}}},{key:"addEvents",value:function(e){var t=this.w,n=new x(this.ctx);e.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",n.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",n.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,n=t.globals.markers.colors,r=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(r)?r[e]:r,pointFillColor:Array.isArray(n)?n[e]:n}}}]),e}(),N=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return c(e,[{key:"draw",value:function(e,t,n){var r=this.w,o=new x(this.ctx),i=n.realIndex,a=n.pointsPos,s=n.zRatio,l=n.elParent,c=o.group({class:"apexcharts-series-markers apexcharts-series-".concat(r.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),Array.isArray(a.x))for(var u=0;u<a.x.length;u++){var p=t+1,d=!0;0===t&&0===u&&(p=0),0===t&&1===u&&(p=1);var h=0,f=r.globals.markers.size[i];if(s!==1/0){f=r.globals.seriesZ[i][p]/s;var g=r.config.plotOptions.bubble;g.minBubbleRadius&&f<g.minBubbleRadius&&(f=g.minBubbleRadius),g.maxBubbleRadius&&f>g.maxBubbleRadius&&(f=g.maxBubbleRadius)}r.config.chart.animations.enabled||(h=f);var v=a.x[u],m=a.y[u];if(h=h||0,null!==m&&void 0!==r.globals.series[i][p]||(d=!1),d){var y=this.drawPoint(v,m,h,f,i,p,t);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(e,t,n,r,o,i,a){var s=this.w,l=o,c=new w(this.ctx),u=new C(this.ctx),p=new D(this.ctx),d=new k(this.ctx),h=new x(this.ctx),f=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:i,finishRadius:"bubble"===s.config.chart.type||s.globals.comboCharts&&s.config.series[o]&&"bubble"===s.config.series[o].type?r:null});r=f.pSize;var g,v=p.fillPath({seriesNumber:o,dataPointIndex:i,color:f.pointFillColor,patternUnits:"objectBoundingBox",value:s.globals.series[o][a]});if("circle"===f.shape?g=h.drawCircle(n):"square"!==f.shape&&"rect"!==f.shape||(g=h.drawRect(0,0,f.width-f.pointStrokeWidth/2,f.height-f.pointStrokeWidth/2,f.pRadius)),s.config.series[l].data[i]&&s.config.series[l].data[i].fillColor&&(v=s.config.series[l].data[i].fillColor),g.attr({x:e-f.width/2-f.pointStrokeWidth/2,y:t-f.height/2-f.pointStrokeWidth/2,cx:e,cy:t,fill:v,"fill-opacity":f.pointFillOpacity,stroke:f.pointStrokeColor,r:r,"stroke-width":f.pointStrokeWidth,"stroke-dasharray":f.pointStrokeDashArray,"stroke-opacity":f.pointStrokeOpacity}),s.config.chart.dropShadow.enabled){var m=s.config.chart.dropShadow;u.dropShadow(g,m,o)}if(!this.initialAnim||s.globals.dataChanged||s.globals.resized)s.globals.animationEnded=!0;else{var y=s.config.chart.animations.speed;c.animateMarker(g,0,"circle"===f.shape?r:{width:f.width,height:f.height},y,s.globals.easing,(function(){window.setTimeout((function(){c.animationCompleted(g)}),100)}))}if(s.globals.dataChanged&&"circle"===f.shape)if(this.dynamicAnim){var b,S,E,_,R=s.config.chart.animations.dynamicAnimation.speed;null!=(_=s.globals.previousPaths[o]&&s.globals.previousPaths[o][a])&&(b=_.x,S=_.y,E=void 0!==_.r?_.r:r);for(var O=0;O<s.globals.collapsedSeries.length;O++)s.globals.collapsedSeries[O].index===o&&(R=1,r=0);0===e&&0===t&&(r=0),c.animateCircle(g,{cx:b,cy:S,r:E},{cx:e,cy:t,r:r},R,s.globals.easing)}else g.attr({r:r});return g.attr({rel:i,j:i,index:o,"default-marker-size":r}),u.setSelectionFilter(g,o,i),d.addEvents(g),g.node.classList.add("apexcharts-marker"),g}},{key:"centerTextInBubble",value:function(e){var t=this.w;return{y:e+=parseInt(t.config.dataLabels.style.fontSize,10)/4}}}]),e}(),M=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"dataLabelsCorrection",value:function(e,t,n,r,o,i,a){var s=this.w,l=!1,c=new x(this.ctx).getTextRects(n,a),u=c.width,p=c.height;t<0&&(t=0),t>s.globals.gridHeight+p&&(t=s.globals.gridHeight+p/2),void 0===s.globals.dataLabelsRects[r]&&(s.globals.dataLabelsRects[r]=[]),s.globals.dataLabelsRects[r].push({x:e,y:t,width:u,height:p});var d=s.globals.dataLabelsRects[r].length-2,h=void 0!==s.globals.lastDrawnDataLabelsIndexes[r]?s.globals.lastDrawnDataLabelsIndexes[r][s.globals.lastDrawnDataLabelsIndexes[r].length-1]:0;if(void 0!==s.globals.dataLabelsRects[r][d]){var f=s.globals.dataLabelsRects[r][h];(e>f.x+f.width+2||t>f.y+f.height+2||e+u<f.x)&&(l=!0)}return(0===o||i)&&(l=!0),{x:e,y:t,textRects:c,drawnextLabel:l}}},{key:"drawDataLabel",value:function(e,t,n){var r=this,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,i=this.w,a=new x(this.ctx),s=i.config.dataLabels,l=0,c=0,u=n,p=null;if(!s.enabled||!Array.isArray(e.x))return p;p=a.group({class:"apexcharts-data-labels"});for(var d=0;d<e.x.length;d++)if(l=e.x[d]+s.offsetX,c=e.y[d]+s.offsetY+o,!isNaN(l)){1===n&&0===d&&(u=0),1===n&&1===d&&(u=1);var h=i.globals.series[t][u],f="",g=function(e){return i.config.dataLabels.formatter(e,{ctx:r.ctx,seriesIndex:t,dataPointIndex:u,w:i})};if("bubble"===i.config.chart.type){f=g(h=i.globals.seriesZ[t][u]),c=e.y[d];var v=new N(this.ctx),m=v.centerTextInBubble(c,t,u);c=m.y}else void 0!==h&&(f=g(h));this.plotDataLabelsText({x:l,y:c,text:f,i:t,j:u,parent:p,offsetCorrection:!0,dataLabelsConfig:i.config.dataLabels})}return p}},{key:"plotDataLabelsText",value:function(e){var t=this.w,n=new x(this.ctx),r=e.x,o=e.y,i=e.i,a=e.j,s=e.text,l=e.textAnchor,c=e.fontSize,u=e.parent,p=e.dataLabelsConfig,d=e.color,h=e.alwaysDrawDataLabel,f=e.offsetCorrection;if(!(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(i)<0)){var g={x:r,y:o,drawnextLabel:!0,textRects:null};f&&(g=this.dataLabelsCorrection(r,o,s,i,a,h,parseInt(p.style.fontSize,10))),t.globals.zoomed||(r=g.x,o=g.y),g.textRects&&(r<-10-g.textRects.width||r>t.globals.gridWidth+g.textRects.width+10)&&(s="");var v=t.globals.dataLabels.style.colors[i];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(v=t.globals.dataLabels.style.colors[a]),"function"==typeof v&&(v=v({series:t.globals.series,seriesIndex:i,dataPointIndex:a,w:t})),d&&(v=d);var m=p.offsetX,y=p.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(m=0,y=0),g.drawnextLabel){var b=n.drawText({width:100,height:parseInt(p.style.fontSize,10),x:r+m,y:o+y,foreColor:v,textAnchor:l||p.textAnchor,text:s,fontSize:c||p.style.fontSize,fontFamily:p.style.fontFamily,fontWeight:p.style.fontWeight||"normal"});if(b.attr({class:"apexcharts-datalabel",cx:r,cy:o}),p.dropShadow.enabled){var w=p.dropShadow;new C(this.ctx).dropShadow(b,w)}u.add(b),void 0===t.globals.lastDrawnDataLabelsIndexes[i]&&(t.globals.lastDrawnDataLabelsIndexes[i]=[]),t.globals.lastDrawnDataLabelsIndexes[i].push(a)}}}},{key:"addBackgroundToDataLabel",value:function(e,t){var n=this.w,r=n.config.dataLabels.background,o=r.padding,i=r.padding/2,a=t.width,s=t.height,l=new x(this.ctx).drawRect(t.x-o,t.y-i/2,a+2*o,s+i,r.borderRadius,"transparent"===n.config.chart.background?"#fff":n.config.chart.background,r.opacity,r.borderWidth,r.borderColor);return r.dropShadow.enabled&&new C(this.ctx).dropShadow(l,r.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var e=this.w;if("bubble"!==e.config.chart.type)for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),n=0;n<t.length;n++){var r=t[n],o=r.getBBox(),i=null;if(o.width&&o.height&&(i=this.addBackgroundToDataLabel(r,o)),i){r.parentNode.insertBefore(i.node,r);var a=r.getAttribute("fill");!e.config.chart.animations.enabled||e.globals.resized||e.globals.dataChanged?i.attr({fill:a}):i.animate().attr({fill:a}),r.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),n=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),r=0;r<t.length;r++)n&&n.insertBefore(t[r],n.nextSibling)}}]),e}(),I=function(){function e(t){s(this,e),this.w=t.w,this.barCtx=t}return c(e,[{key:"handleBarDataLabels",value:function(e){var t=e.x,n=e.y,r=e.y1,o=e.y2,i=e.i,a=e.j,s=e.realIndex,l=e.series,c=e.barHeight,u=e.barWidth,p=e.barYPosition,d=e.visibleSeries,h=e.renderedPath,f=this.w,g=new x(this.barCtx.ctx),v=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth,m=t+parseFloat(u*d),y=n+parseFloat(c*d);f.globals.isXNumeric&&!f.globals.isBarHorizontal&&(m=t+parseFloat(u*(d+1)),y=n+parseFloat(c*(d+1))-v);var b,w=t,C=n,S=f.config.dataLabels,E=this.barCtx.barOptions.dataLabels;void 0!==p&&this.barCtx.isRangeBar&&(y=p,C=p);var _=S.offsetX,R=S.offsetY,O={width:0,height:0};if(f.config.dataLabels.enabled){var A=this.barCtx.series[i][a];O=g.getTextRects(f.globals.yLabelFormatters[0](A),parseFloat(S.style.fontSize))}var P={x:t,y:n,i:i,j:a,renderedPath:h,bcx:m,bcy:y,barHeight:c,barWidth:u,textRects:O,strokeWidth:v,dataLabelsX:w,dataLabelsY:C,barDataLabelsConfig:E,offX:_,offY:R};return b=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(P):this.calculateColumnsDataLabelsPosition(P),h.attr({cy:b.bcy,cx:b.bcx,j:a,val:l[i][a],barHeight:c,barWidth:u}),this.drawCalculatedDataLabels({x:b.dataLabelsX,y:b.dataLabelsY,val:this.barCtx.isRangeBar?[r,o]:l[i][a],i:s,j:a,barWidth:u,barHeight:c,textRects:O,dataLabelsConfig:S})}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var t,n=this.w,r=e.i,o=e.j,i=e.y,a=e.bcx,s=e.barWidth,l=e.barHeight,c=e.textRects,u=e.dataLabelsY,p=e.barDataLabelsConfig,d=e.strokeWidth,h=e.offX,f=e.offY;l=Math.abs(l);var g="vertical"===n.config.plotOptions.bar.dataLabels.orientation;a-=d/2;var v=n.globals.gridWidth/n.globals.dataPoints;t=n.globals.isXNumeric?a-s/2+h:a-v+s/2+h,g&&(t=t+c.height/2-d/2-2);var m=this.barCtx.series[r][o]<0,y=i;switch(this.barCtx.isReversed&&(y=i-l+(m?2*l:0),i-=l),p.position){case"center":u=g?m?y+l/2+f:y+l/2-f:m?y-l/2+c.height/2+f:y+l/2+c.height/2-f;break;case"bottom":u=g?m?y+l+f:y+l-f:m?y-l+c.height+d+f:y+l-c.height/2+d-f;break;case"top":u=g?m?y+f:y-f:m?y-c.height/2-f:y+c.height+f}return n.config.chart.stacked||(u<0?u=0+d:u+c.height/3>n.globals.gridHeight&&(u=n.globals.gridHeight-d)),{bcx:a,bcy:i,dataLabelsX:t,dataLabelsY:u}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,n=e.x,r=e.i,o=e.j,i=e.bcy,a=e.barHeight,s=e.barWidth,l=e.textRects,c=e.dataLabelsX,u=e.strokeWidth,p=e.barDataLabelsConfig,d=e.offX,h=e.offY,f=t.globals.gridHeight/t.globals.dataPoints;s=Math.abs(s);var g=i-(this.barCtx.isRangeBar?0:f)+a/2+l.height/2+h-3,v=this.barCtx.series[r][o]<0,m=n;switch(this.barCtx.isReversed&&(m=n+s-(v?2*s:0),n=t.globals.gridWidth-s),p.position){case"center":c=v?m+s/2-d:Math.max(l.width/2,m-s/2)+d;break;case"bottom":c=v?m+s-u-Math.round(l.width/2)-d:m-s+u+Math.round(l.width/2)+d;break;case"top":c=v?m-u+Math.round(l.width/2)-d:m-u-Math.round(l.width/2)+d}return t.config.chart.stacked||(c<0?c=c+l.width+u:c+l.width/2>t.globals.gridWidth&&(c=t.globals.gridWidth-l.width-u)),{bcx:n,bcy:i,dataLabelsX:c,dataLabelsY:g}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,n=e.y,r=e.val,o=e.i,a=e.j,s=e.textRects,l=e.barHeight,c=e.barWidth,u=e.dataLabelsConfig,p=this.w,d="rotate(0)";"vertical"===p.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(t,", ").concat(n,")"));var h=new M(this.barCtx.ctx),f=new x(this.barCtx.ctx),g=u.formatter,v=null,m=p.globals.collapsedSeriesIndices.indexOf(o)>-1;if(u.enabled&&!m){v=f.group({class:"apexcharts-data-labels",transform:d});var y="";void 0!==r&&(y=g(r,{seriesIndex:o,dataPointIndex:a,w:p}));var b=p.globals.series[o][a]<0,w=p.config.plotOptions.bar.dataLabels.position;"vertical"===p.config.plotOptions.bar.dataLabels.orientation&&("top"===w&&(u.textAnchor=b?"end":"start"),"center"===w&&(u.textAnchor="middle"),"bottom"===w&&(u.textAnchor=b?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<f.getTextRects(y,parseFloat(u.style.fontSize)).width&&(y=""),p.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?s.width/1.6>Math.abs(c)&&(y=""):s.height/1.6>Math.abs(l)&&(y=""));var C=i({},u);this.barCtx.isHorizontal&&r<0&&("start"===u.textAnchor?C.textAnchor="end":"end"===u.textAnchor&&(C.textAnchor="start")),h.plotDataLabelsText({x:t,y:n,text:y,i:o,j:a,parent:v,dataLabelsConfig:C,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return v}}]),e}(),L=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.legendInactiveClass="legend-mouseover-inactive"}return c(e,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(b.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var t=this.getSeriesByName(e),n=parseInt(t.getAttribute("data:realIndex"),10);return{isHidden:t.classList.contains("apexcharts-series-collapsed"),realIndex:n}}},{key:"addCollapsedClassToSeries",value:function(e,t){var n=this.w;function r(n){for(var r=0;r<n.length;r++)n[r].index===t&&e.node.classList.add("apexcharts-series-collapsed")}r(n.globals.collapsedSeries),r(n.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var t=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,t.isHidden),t.isHidden}},{key:"showSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!0)}},{key:"hideSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.w,o=b.clone(r.globals.initialSeries);r.globals.previousPaths=[],n?(r.globals.collapsedSeries=[],r.globals.ancillaryCollapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),r.config.series=o,e&&(t&&(r.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(o,r.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,n=0;n<e.length;n++)t.globals.collapsedSeriesIndices.indexOf(n)>-1&&(e[n].data=[]);return e}},{key:"toggleSeriesOnHover",value:function(e,t){var n=this.w;t||(t=e.target);var r=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===e.type){var o=parseInt(t.getAttribute("rel"),10)-1,i=null,a=null;n.globals.axisCharts||"radialBar"===n.config.chart.type?n.globals.axisCharts?(i=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(o,"']")),a=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(o,"']"))):i=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(o+1,"']")):i=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(o+1,"'] path"));for(var s=0;s<r.length;s++)r[s].classList.add(this.legendInactiveClass);null!==i&&(n.globals.axisCharts||i.parentNode.classList.remove(this.legendInactiveClass),i.classList.remove(this.legendInactiveClass),null!==a&&a.classList.remove(this.legendInactiveClass))}else if("mouseout"===e.type)for(var l=0;l<r.length;l++)r[l].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,t){var n=this,r=this.w,o=r.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),i=function(e){for(var t=0;t<o.length;t++)o[t].classList[e](n.legendInactiveClass)};if("mousemove"===e.type){var a=parseInt(t.getAttribute("rel"),10)-1;i("add"),function(e){for(var t=0;t<o.length;t++){var r=parseInt(o[t].getAttribute("val"),10);r>=e.from&&r<=e.to&&o[t].classList.remove(n.legendInactiveClass)}}(r.config.plotOptions.heatmap.colorScale.ranges[a])}else"mouseout"===e.type&&i("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",n=this.w,r=0;if(n.config.series.length>1)for(var o=n.config.series.map((function(t,r){var o=!1;return e&&(o="bar"===n.config.series[r].type||"column"===n.config.series[r].type),t.data&&t.data.length>0&&!o?r:-1})),i="asc"===t?0:o.length-1;"asc"===t?i<o.length:i>=0;"asc"===t?i++:i--)if(-1!==o[i]){r=o[i];break}return r}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(t,n,r){for(var o=t[n].childNodes,i={type:r,paths:[],realIndex:t[n].getAttribute("data:realIndex")},a=0;a<o.length;a++)if(o[a].hasAttribute("pathTo")){var s=o[a].getAttribute("pathTo");i.paths.push({d:s})}e.globals.previousPaths.push(i)}e.globals.previousPaths=[],["line","area","bar","rangebar","candlestick","radar"].forEach((function(n){for(var r,o=(r=n,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(r,"-series .apexcharts-series"))),i=0;i<o.length;i++)t(o,i,n)})),this.handlePrevBubbleScatterPaths("bubble"),this.handlePrevBubbleScatterPaths("scatter");var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(n.length>0)for(var r=function(t){for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(t,"'] rect")),r=[],o=function(e){var t=function(t){return n[e].getAttribute(t)},o={x:parseFloat(t("x")),y:parseFloat(t("y")),width:parseFloat(t("width")),height:parseFloat(t("height"))};r.push({rect:o,color:n[e].getAttribute("color")})},i=0;i<n.length;i++)o(i);e.globals.previousPaths.push(r)},o=0;o<n.length;o++)r(o);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"handlePrevBubbleScatterPaths",value:function(e){var t=this.w,n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series"));if(n.length>0)for(var r=0;r<n.length;r++){for(var o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series[data\\:realIndex='").concat(r,"'] circle")),i=[],a=0;a<o.length;a++)i.push({x:o[a].getAttribute("cx"),y:o[a].getAttribute("cy"),r:o[a].getAttribute("r")});t.globals.previousPaths.push(i)}}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,t=e.config.noData,n=new x(this.ctx),r=e.globals.svgWidth/2,o=e.globals.svgHeight/2,i="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,"left"===t.align?(r=10,i="start"):"right"===t.align&&(r=e.globals.svgWidth-10,i="end"),"top"===t.verticalAlign?o=50:"bottom"===t.verticalAlign&&(o=e.globals.svgHeight-50),r+=t.offsetX,o=o+parseInt(t.style.fontSize,10)+2+t.offsetY,void 0!==t.text&&""!==t.text){var a=n.drawText({x:r,y:o,text:t.text,textAnchor:i,fontSize:t.style.fontSize,fontFamily:t.style.fontFamily,foreColor:t.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(a)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var t=this.w,n=0;n<e.length;n++)if(0===e[n].length)for(var r=0;r<e[t.globals.maxValsInArrayIndex].length;r++)e[n].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,t=this.w,n=this.filteredSeriesX(),r=0;r<n.length-1;r++)if(n[r][0]!==n[r+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){return this.w.globals.seriesX.map((function(e){return e.length>0?e:[]}))}}]),e}(),F=function(){function e(t){s(this,e),this.w=t.w,this.barCtx=t}return c(e,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var n=0;n<e.length;n++)if(e[n].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[n].length),t.globals.isXNumeric)for(var r=0;r<e[n].length;r++)t.globals.seriesX[n][r]>t.globals.minX&&t.globals.seriesX[n][r]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],this.barCtx.radiusOnSeriesNumber=e.length-1,t.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(){var e,t,n,r,o,i,a,s,l=this.w,c=l.globals.dataPoints;this.barCtx.isRangeBar&&(c=l.globals.labels.length);var u=this.barCtx.seriesLen;if(l.config.plotOptions.bar.rangeBarGroupRows&&(u=1),this.barCtx.isHorizontal)o=(n=l.globals.gridHeight/c)/u,l.globals.isXNumeric&&(o=(n=l.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,s=this.barCtx.baseLineInvertedY+l.globals.padHorizontal+(this.barCtx.isReversed?l.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),t=(n-o*this.barCtx.seriesLen)/2;else{if(r=l.globals.gridWidth/this.barCtx.visibleItems,l.config.xaxis.convertedCatToNumeric&&(r=l.globals.gridWidth/l.globals.dataPoints),i=r/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100,l.globals.isXNumeric){var p=this.barCtx.xRatio;l.config.xaxis.convertedCatToNumeric&&(p=this.barCtx.initialXRatio),l.globals.minXDiff&&.5!==l.globals.minXDiff&&l.globals.minXDiff/p>0&&(r=l.globals.minXDiff/p),(i=r/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(i=1)}a=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),e=l.globals.padHorizontal+(r-i*this.barCtx.seriesLen)/2}return{x:e,y:t,yDivision:n,xDivision:r,barHeight:o,barWidth:i,zeroH:a,zeroW:s}}},{key:"getPathFillColor",value:function(e,t,n,r){var o=this.w,i=new D(this.barCtx.ctx),a=null,s=this.barCtx.barOptions.distributed?n:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(r){e[t][n]>=r.from&&e[t][n]<=r.to&&(a=r.color)})),o.config.series[t].data[n]&&o.config.series[t].data[n].fillColor&&(a=o.config.series[t].data[n].fillColor),i.fillPath({seriesNumber:this.barCtx.barOptions.distributed?s:r,dataPointIndex:n,color:a,value:e[t][n]})}},{key:"getStrokeWidth",value:function(e,t,n){var r=0,o=this.w;return void 0===this.barCtx.series[e][t]||null===this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,o.config.stroke.show&&(this.barCtx.isNullValue||(r=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth)),r}},{key:"barBackground",value:function(e){var t=e.j,n=e.i,r=e.x1,o=e.x2,i=e.y1,a=e.y2,s=e.elSeries,l=this.w,c=new x(this.barCtx.ctx),u=new L(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&u===n){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var p=this.barCtx.barOptions.colors.backgroundBarColors[t],d=c.drawRect(void 0!==r?r:0,void 0!==i?i:0,void 0!==o?o:l.globals.gridWidth,void 0!==a?a:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,p,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(d),d.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t=e.barWidth,n=e.barXPosition,r=e.yRatio,o=e.y1,i=e.y2,a=e.strokeWidth,s=e.series,l=e.realIndex,c=e.i,u=e.j,p=e.w,d=new x(this.barCtx.ctx);(a=Array.isArray(a)?a[l]:a)||(a=0);var h={barWidth:t,strokeWidth:a,yRatio:r,barXPosition:n,y1:o,y2:i},f=this.getRoundedBars(p,h,s,c,u),g=n,v=n+t,m=d.move(g,o),y=d.move(g,o),b=d.line(v-a,o);return p.globals.previousPaths.length>0&&(y=this.barCtx.getPreviousPath(l,u,!1)),m=m+d.line(g,f.y2)+f.pathWithRadius+d.line(v-a,f.y2)+b+b+"z",y=y+d.line(g,o)+b+b+b+b+b+d.line(g,o),p.config.chart.stacked&&(this.barCtx.yArrj.push(f.y2),this.barCtx.yArrjF.push(Math.abs(o-f.y2)),this.barCtx.yArrjVal.push(this.barCtx.series[c][u])),{pathTo:m,pathFrom:y}}},{key:"getBarpaths",value:function(e){var t=e.barYPosition,n=e.barHeight,r=e.x1,o=e.x2,i=e.strokeWidth,a=e.series,s=e.realIndex,l=e.i,c=e.j,u=e.w,p=new x(this.barCtx.ctx);(i=Array.isArray(i)?i[s]:i)||(i=0);var d={barHeight:n,strokeWidth:i,barYPosition:t,x2:o,x1:r},h=this.getRoundedBars(u,d,a,l,c),f=p.move(r,t),g=p.move(r,t);u.globals.previousPaths.length>0&&(g=this.barCtx.getPreviousPath(s,c,!1));var v=t,m=t+n,y=p.line(r,m-i);return f=f+p.line(h.x2,v)+h.pathWithRadius+p.line(h.x2,m-i)+y+y+"z",g=g+p.line(r,v)+y+y+y+y+y+p.line(r,v),u.config.chart.stacked&&(this.barCtx.xArrj.push(h.x2),this.barCtx.xArrjF.push(Math.abs(r-h.x2)),this.barCtx.xArrjVal.push(this.barCtx.series[l][c])),{pathTo:f,pathFrom:g}}},{key:"getRoundedBars",value:function(e,t,n,r,o){var i=new x(this.barCtx.ctx),a=0,s=e.config.plotOptions.bar.borderRadius,l=Array.isArray(s);if(a=l?s[r>s.length-1?s.length-1:r]:s,e.config.chart.stacked&&n.length>1&&r!==this.barCtx.radiusOnSeriesNumber&&!l&&(a=0),this.barCtx.isHorizontal){var c="",u=t.x2;if(Math.abs(t.x1-t.x2)<a&&(a=Math.abs(t.x1-t.x2)),void 0!==n[r][o]||null!==n[r][o]){var p=this.barCtx.isReversed?n[r][o]>0:n[r][o]<0;p&&(a*=-1),u-=a,c=i.quadraticCurve(u+a,t.barYPosition,u+a,t.barYPosition+(p?-1*a:a))+i.line(u+a,t.barYPosition+t.barHeight-t.strokeWidth-(p?-1*a:a))+i.quadraticCurve(u+a,t.barYPosition+t.barHeight-t.strokeWidth,u,t.barYPosition+t.barHeight-t.strokeWidth)}return{pathWithRadius:c,x2:u}}var d="",h=t.y2;if(Math.abs(t.y1-t.y2)<a&&(a=Math.abs(t.y1-t.y2)),void 0!==n[r][o]||null!==n[r][o]){var f=n[r][o]<0;f&&(a*=-1),h+=a,d=i.quadraticCurve(t.barXPosition,h-a,t.barXPosition+(f?-1*a:a),h-a)+i.line(t.barXPosition+t.barWidth-t.strokeWidth-(f?-1*a:a),h-a)+i.quadraticCurve(t.barXPosition+t.barWidth-t.strokeWidth,h-a,t.barXPosition+t.barWidth-t.strokeWidth,h)}return{pathWithRadius:d,y2:h}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,n=this.w,r=0;r<t.length;r++){for(var o=0,i=0;i<t[n.globals.maxValsInArrayIndex].length;i++)o+=t[r][i];0===o&&this.barCtx.zeroSerieses.push(r)}for(var a=t.length-1;a>=0;a--)this.barCtx.zeroSerieses.indexOf(a)>-1&&a===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var s=t.length-1;s>=0;s--)n.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n?t:null;return null!=e&&(r=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),r}},{key:"getYForValue",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n?t:null;return null!=e&&(r=t-e/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),r}},{key:"getGoalValues",value:function(e,t,n,r,o){var i=this,a=this.w,s=[];return a.globals.seriesGoals[r]&&a.globals.seriesGoals[r][o]&&Array.isArray(a.globals.seriesGoals[r][o])&&a.globals.seriesGoals[r][o].forEach((function(r){var o;s.push((u(o={},e,"x"===e?i.getXForValue(r.value,t,!1):i.getYForValue(r.value,n,!1)),u(o,"attrs",r),o))})),s}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,n=e.barYPosition,r=e.goalX,o=e.goalY,i=e.barWidth,a=e.barHeight,s=new x(this.barCtx.ctx),l=s.group({className:"apexcharts-bar-goals-groups"}),c=null;return this.barCtx.isHorizontal?Array.isArray(r)&&r.forEach((function(e){var t=void 0!==e.attrs.strokeHeight?e.attrs.strokeHeight:a/2,r=n+t+a/2;c=s.drawLine(e.x,r-2*t,e.x,r,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeWidth?e.attrs.strokeWidth:2,e.attrs.strokeLineCap),l.add(c)})):Array.isArray(o)&&o.forEach((function(e){var n=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:i/2,r=t+n+i/2;c=s.drawLine(r-2*n,e.y,r,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),l.add(c)})),l}}]),e}(),G=function(){function e(t,n){s(this,e),this.ctx=t,this.w=t.w;var r=this.w;this.barOptions=r.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=r.config.stroke.width,this.isNullValue=!1,this.isRangeBar=r.globals.seriesRangeBar.length&&this.isHorizontal,this.xyRatios=n,null!==this.xyRatios&&(this.xRatio=n.xRatio,this.initialXRatio=n.initialXRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0,this.barHelpers=new F(this)}return c(e,[{key:"draw",value:function(e,t){var n=this.w,r=new x(this.ctx),o=new S(this.ctx,n);e=o.getLogSeries(e),this.series=e,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var a=r.group({class:"apexcharts-bar-series apexcharts-plot-series"});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var s=0,l=0;s<e.length;s++,l++){var c,u,p,d,h=void 0,f=void 0,g=[],v=[],m=n.globals.comboCharts?t[s]:s,y=r.group({class:"apexcharts-series",rel:s+1,seriesName:b.escapeString(n.globals.seriesNames[m]),"data:realIndex":m});this.ctx.series.addCollapsedClassToSeries(y,m),e[s].length>0&&(this.visibleI=this.visibleI+1);var w=0,C=0;this.yRatio.length>1&&(this.yaxisIndex=m),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;var E=this.barHelpers.initialPositions();f=E.y,w=E.barHeight,u=E.yDivision,d=E.zeroW,h=E.x,C=E.barWidth,c=E.xDivision,p=E.zeroH,this.horizontal||v.push(h+C/2);for(var _=r.group({class:"apexcharts-datalabels","data:realIndex":m}),R=r.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),O=0;O<n.globals.dataPoints;O++){var A=this.barHelpers.getStrokeWidth(s,O,m),P=null,T={indexes:{i:s,j:O,realIndex:m,bc:l},x:h,y:f,strokeWidth:A,elSeries:y};this.isHorizontal?(P=this.drawBarPaths(i(i({},T),{},{barHeight:w,zeroW:d,yDivision:u})),C=this.series[s][O]/this.invertedYRatio):(P=this.drawColumnPaths(i(i({},T),{},{xDivision:c,barWidth:C,zeroH:p})),w=this.series[s][O]/this.yRatio[this.yaxisIndex]);var D=this.barHelpers.drawGoalLine({barXPosition:P.barXPosition,barYPosition:P.barYPosition,goalX:P.goalX,goalY:P.goalY,barHeight:w,barWidth:C});D&&R.add(D),f=P.y,h=P.x,O>0&&v.push(h+C/2),g.push(f);var k=this.barHelpers.getPathFillColor(e,s,O,m);this.renderSeries({realIndex:m,pathFill:k,j:O,i:s,pathFrom:P.pathFrom,pathTo:P.pathTo,strokeWidth:A,elSeries:y,x:h,y:f,series:e,barHeight:w,barWidth:C,elDataLabelsWrap:_,elGoalsMarkers:R,visibleSeries:this.visibleI,type:"bar"})}n.globals.seriesXvalues[m]=v,n.globals.seriesYvalues[m]=g,a.add(y)}return a}},{key:"renderSeries",value:function(e){var t=e.realIndex,n=e.pathFill,r=e.lineFill,o=e.j,i=e.i,a=e.pathFrom,s=e.pathTo,l=e.strokeWidth,c=e.elSeries,u=e.x,p=e.y,d=e.y1,h=e.y2,f=e.series,g=e.barHeight,v=e.barWidth,m=e.barYPosition,y=e.elDataLabelsWrap,b=e.elGoalsMarkers,w=e.visibleSeries,S=e.type,E=this.w,_=new x(this.ctx);r||(r=this.barOptions.distributed?E.globals.stroke.colors[o]:E.globals.stroke.colors[t]),E.config.series[i].data[o]&&E.config.series[i].data[o].strokeColor&&(r=E.config.series[i].data[o].strokeColor),this.isNullValue&&(n="none");var R=o/E.config.chart.animations.animateGradually.delay*(E.config.chart.animations.speed/E.globals.dataPoints)/2.4,O=_.renderPaths({i:i,j:o,realIndex:t,pathFrom:a,pathTo:s,stroke:r,strokeWidth:l,strokeLineCap:E.config.stroke.lineCap,fill:n,animationDelay:R,initialSpeed:E.config.chart.animations.speed,dataChangeSpeed:E.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(S,"-area")});O.attr("clip-path","url(#gridRectMask".concat(E.globals.cuid,")"));var A=E.config.forecastDataPoints;A.count>0&&o>=E.globals.dataPoints-A.count&&(O.node.setAttribute("stroke-dasharray",A.dashArray),O.node.setAttribute("stroke-width",A.strokeWidth),O.node.setAttribute("fill-opacity",A.fillOpacity)),void 0!==d&&void 0!==h&&(O.attr("data-range-y1",d),O.attr("data-range-y2",h)),new C(this.ctx).setSelectionFilter(O,t,o),c.add(O);var P=new I(this).handleBarDataLabels({x:u,y:p,y1:d,y2:h,i:i,j:o,series:f,realIndex:t,barHeight:g,barWidth:v,barYPosition:m,renderedPath:O,visibleSeries:w});return null!==P&&y.add(P),c.add(y),b&&c.add(b),c}},{key:"drawBarPaths",value:function(e){var t=e.indexes,n=e.barHeight,r=e.strokeWidth,o=e.zeroW,i=e.x,a=e.y,s=e.yDivision,l=e.elSeries,c=this.w,u=t.i,p=t.j;c.globals.isXNumeric&&(a=(c.globals.seriesX[u][p]-c.globals.minX)/this.invertedXRatio-n);var d=a+n*this.visibleI;i=this.barHelpers.getXForValue(this.series[u][p],o);var h=this.barHelpers.getBarpaths({barYPosition:d,barHeight:n,x1:o,x2:i,strokeWidth:r,series:this.series,realIndex:t.realIndex,i:u,j:p,w:c});return c.globals.isXNumeric||(a+=s),this.barHelpers.barBackground({j:p,i:u,y1:d-n*this.visibleI,y2:n*this.seriesLen,elSeries:l}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x:i,y:a,goalX:this.barHelpers.getGoalValues("x",o,null,u,p),barYPosition:d}}},{key:"drawColumnPaths",value:function(e){var t=e.indexes,n=e.x,r=e.y,o=e.xDivision,i=e.barWidth,a=e.zeroH,s=e.strokeWidth,l=e.elSeries,c=this.w,u=t.realIndex,p=t.i,d=t.j,h=t.bc;if(c.globals.isXNumeric){var f=u;c.globals.seriesX[u].length||(f=c.globals.maxValsInArrayIndex),n=(c.globals.seriesX[f][d]-c.globals.minX)/this.xRatio-i*this.seriesLen/2}var g=n+i*this.visibleI;r=this.barHelpers.getYForValue(this.series[p][d],a);var v=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:i,y1:a,y2:r,strokeWidth:s,series:this.series,realIndex:t.realIndex,i:p,j:d,w:c});return c.globals.isXNumeric||(n+=o),this.barHelpers.barBackground({bc:h,j:d,i:p,x1:g-s/2-i*this.visibleI,x2:i*this.seriesLen+s/2,elSeries:l}),{pathTo:v.pathTo,pathFrom:v.pathFrom,x:n,y:r,goalY:this.barHelpers.getGoalValues("y",null,a,p,d),barXPosition:g}}},{key:"getPreviousPath",value:function(e,t){for(var n,r=this.w,o=0;o<r.globals.previousPaths.length;o++){var i=r.globals.previousPaths[o];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(e,10)&&void 0!==r.globals.previousPaths[o].paths[t]&&(n=r.globals.previousPaths[o].paths[t].d)}return n}}]),e}(),H=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return c(e,[{key:"isValidDate",value:function(e){return!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);var n=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(n)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,t){var n=this.w.globals.locale,r=this.w.config.xaxis.labels.datetimeUTC,o=["\0"].concat(v(n.months)),i=["\x01"].concat(v(n.shortMonths)),a=["\x02"].concat(v(n.days)),s=["\x03"].concat(v(n.shortDays));function l(e,t){var n=e+"";for(t=t||2;n.length<t;)n="0"+n;return n}var c=r?e.getUTCFullYear():e.getFullYear();t=(t=(t=t.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);var u=(r?e.getUTCMonth():e.getMonth())+1;t=(t=(t=(t=t.replace(/(^|[^\\])MMMM+/g,"$1"+o[0])).replace(/(^|[^\\])MMM/g,"$1"+i[0])).replace(/(^|[^\\])MM/g,"$1"+l(u))).replace(/(^|[^\\])M/g,"$1"+u);var p=r?e.getUTCDate():e.getDate();t=(t=(t=(t=t.replace(/(^|[^\\])dddd+/g,"$1"+a[0])).replace(/(^|[^\\])ddd/g,"$1"+s[0])).replace(/(^|[^\\])dd/g,"$1"+l(p))).replace(/(^|[^\\])d/g,"$1"+p);var d=r?e.getUTCHours():e.getHours(),h=d>12?d-12:0===d?12:d;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+l(d))).replace(/(^|[^\\])H/g,"$1"+d)).replace(/(^|[^\\])hh+/g,"$1"+l(h))).replace(/(^|[^\\])h/g,"$1"+h);var f=r?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+l(f))).replace(/(^|[^\\])m/g,"$1"+f);var g=r?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var m=r?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+l(m,3)),m=Math.round(m/10),t=t.replace(/(^|[^\\])ff/g,"$1"+l(m)),m=Math.round(m/10);var y=d<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+m)).replace(/(^|[^\\])TT+/g,"$1"+y)).replace(/(^|[^\\])T/g,"$1"+y.charAt(0));var b=y.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+b)).replace(/(^|[^\\])t/g,"$1"+b.charAt(0));var w=-e.getTimezoneOffset(),C=r||!w?"Z":w>0?"+":"-";if(!r){var x=(w=Math.abs(w))%60;C+=l(Math.floor(w/60))+":"+l(x)}t=t.replace(/(^|[^\\])K/g,"$1"+C);var S=(r?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(a[0],"g"),a[S])).replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(o[0],"g"),o[u])).replace(new RegExp(i[0],"g"),i[u])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,n){var r=this.w;void 0!==r.config.xaxis.min&&(e=r.config.xaxis.min),void 0!==r.config.xaxis.max&&(t=r.config.xaxis.max);var o=this.getDate(e),i=this.getDate(t),a=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,n){return this.determineDaysOfMonths(e,t)-n}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,n){var r=this.daysCntOfYear[t]+n;return t>1&&this.isLeapYear()&&r++,r}},{key:"determineDaysOfMonths",value:function(e,t){var n=30;switch(e=b.monthMod(e),!0){case this.months30.indexOf(e)>-1:2===e&&(n=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:n=31}return n}}]),e}(),W=function(e){p(n,G);var t=g(n);function n(){return s(this,n),t.apply(this,arguments)}return c(n,[{key:"draw",value:function(e,t){var n=this.w,r=new x(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=n.globals.seriesRangeStart,this.seriesRangeEnd=n.globals.seriesRangeEnd,this.barHelpers.initVariables(e);for(var o=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),a=0;a<e.length;a++){var s,l,c,u=void 0,p=void 0,d=void 0,h=n.globals.comboCharts?t[a]:a,f=r.group({class:"apexcharts-series",seriesName:b.escapeString(n.globals.seriesNames[h]),rel:a+1,"data:realIndex":h});this.ctx.series.addCollapsedClassToSeries(f,h),e[a].length>0&&(this.visibleI=this.visibleI+1);var g=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=h);var m=this.barHelpers.initialPositions();p=m.y,c=m.zeroW,u=m.x,v=m.barWidth,s=m.xDivision,l=m.zeroH;for(var y=r.group({class:"apexcharts-datalabels","data:realIndex":h}),w=r.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),C=0;C<n.globals.dataPoints;C++){var S=this.barHelpers.getStrokeWidth(a,C,h),E=this.seriesRangeStart[a][C],_=this.seriesRangeEnd[a][C],R=null,O=null,A={x:u,y:p,strokeWidth:S,elSeries:f};if(d=m.yDivision,g=m.barHeight,this.isHorizontal){O=p+g*this.visibleI;var P=this.seriesLen;n.config.plotOptions.bar.rangeBarGroupRows&&(P=1);var T=(d-g*P)/2;if(void 0===n.config.series[a].data[C])break;if(n.config.series[a].data[C].x){var D=this.detectOverlappingBars({i:a,j:C,barYPosition:O,srty:T,barHeight:g,yDivision:d,initPositions:m});g=D.barHeight,O=D.barYPosition}v=(R=this.drawRangeBarPaths(i({indexes:{i:a,j:C,realIndex:h},barHeight:g,barYPosition:O,zeroW:c,yDivision:d,y1:E,y2:_},A))).barWidth}else g=(R=this.drawRangeColumnPaths(i({indexes:{i:a,j:C,realIndex:h},zeroH:l,barWidth:v,xDivision:s},A))).barHeight;var k=this.barHelpers.drawGoalLine({barXPosition:R.barXPosition,barYPosition:O,goalX:R.goalX,goalY:R.goalY,barHeight:g,barWidth:v});k&&w.add(k),p=R.y,u=R.x;var N=this.barHelpers.getPathFillColor(e,a,C,h),M=n.globals.stroke.colors[h];this.renderSeries({realIndex:h,pathFill:N,lineFill:M,j:C,i:a,x:u,y:p,y1:E,y2:_,pathFrom:R.pathFrom,pathTo:R.pathTo,strokeWidth:S,elSeries:f,series:e,barHeight:g,barYPosition:O,barWidth:v,elDataLabelsWrap:y,elGoalsMarkers:w,visibleSeries:this.visibleI,type:"rangebar"})}o.add(f)}return o}},{key:"detectOverlappingBars",value:function(e){var t=e.i,n=e.j,r=e.barYPosition,o=e.srty,i=e.barHeight,a=e.yDivision,s=e.initPositions,l=this.w,c=[],u=l.config.series[t].data[n].rangeName,p=l.config.series[t].data[n].x,d=l.globals.labels.indexOf(p),h=l.globals.seriesRangeBar[t].findIndex((function(e){return e.x===p&&e.overlaps.length>0}));return r=l.config.plotOptions.bar.rangeBarGroupRows?o+a*d:o+i*this.visibleI+a*d,h>-1&&!l.config.plotOptions.bar.rangeBarOverlap&&(c=l.globals.seriesRangeBar[t][h].overlaps).indexOf(u)>-1&&(r=(i=s.barHeight/c.length)*this.visibleI+a*(100-parseInt(this.barOptions.barHeight,10))/100/2+i*(this.visibleI+c.indexOf(u))+a*d),{barYPosition:r,barHeight:i}}},{key:"drawRangeColumnPaths",value:function(e){var t=e.indexes,n=e.x;e.strokeWidth;var r=e.xDivision,o=e.barWidth,i=e.zeroH,a=this.w,s=t.i,l=t.j,c=this.yRatio[this.yaxisIndex],u=t.realIndex,p=this.getRangeValue(u,l),d=Math.min(p.start,p.end),h=Math.max(p.start,p.end);a.globals.isXNumeric&&(n=(a.globals.seriesX[s][l]-a.globals.minX)/this.xRatio-o/2);var f=n+o*this.visibleI;void 0===this.series[s][l]||null===this.series[s][l]?d=i:(d=i-d/c,h=i-h/c);var g=Math.abs(h-d),v=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:o,y1:d,y2:h,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:t.realIndex,i:u,j:l,w:a});return a.globals.isXNumeric||(n+=r),{pathTo:v.pathTo,pathFrom:v.pathFrom,barHeight:g,x:n,y:h,goalY:this.barHelpers.getGoalValues("y",null,i,s,l),barXPosition:f}}},{key:"drawRangeBarPaths",value:function(e){var t=e.indexes,n=e.y,r=e.y1,o=e.y2,i=e.yDivision,a=e.barHeight,s=e.barYPosition,l=e.zeroW,c=this.w,u=l+r/this.invertedYRatio,p=l+o/this.invertedYRatio,d=Math.abs(p-u),h=this.barHelpers.getBarpaths({barYPosition:s,barHeight:a,x1:u,x2:p,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:t.realIndex,realIndex:t.realIndex,j:t.j,w:c});return c.globals.isXNumeric||(n+=i),{pathTo:h.pathTo,pathFrom:h.pathFrom,barWidth:d,x:p,goalX:this.barHelpers.getGoalValues("x",l,null,t.realIndex,t.j),y:n}}},{key:"getRangeValue",value:function(e,t){var n=this.w;return{start:n.globals.seriesRangeStart[e][t],end:n.globals.seriesRangeEnd[e][t]}}},{key:"getTooltipValues",value:function(e){var t=e.ctx,n=e.seriesIndex,r=e.dataPointIndex,o=e.y1,i=e.y2,a=e.w,s=a.globals.seriesRangeStart[n][r],l=a.globals.seriesRangeEnd[n][r],c=a.globals.labels[r],u=a.config.series[n].name?a.config.series[n].name:"",p=a.config.tooltip.y.formatter,d=a.config.tooltip.y.title.formatter,h={w:a,seriesIndex:n,dataPointIndex:r,start:s,end:l};"function"==typeof d&&(u=d(u,h)),Number.isFinite(o)&&Number.isFinite(i)&&(s=o,l=i,a.config.series[n].data[r].x&&(c=a.config.series[n].data[r].x+":"),"function"==typeof p&&(c=p(c,h)));var f="",g="",v=a.globals.colors[n];if(void 0===a.config.tooltip.x.formatter)if("datetime"===a.config.xaxis.type){var m=new H(t);f=m.formatDate(m.getDate(s),a.config.tooltip.x.format),g=m.formatDate(m.getDate(l),a.config.tooltip.x.format)}else f=s,g=l;else f=a.config.tooltip.x.formatter(s),g=a.config.tooltip.x.formatter(l);return{start:s,end:l,startVal:f,endVal:g,ylabel:c,color:v,seriesName:u}}},{key:"buildCustomTooltipHTML",value:function(e){return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e.color+'">'+(e.seriesName||"")+'</span></div><div> <span class="category">'+e.ylabel+' </span> <span class="value start-value">'+e.start+'</span> <span class="separator">-</span> <span class="value end-value">'+e.end+"</span></div></div>"}}]),n}(),V=function(){function e(t){s(this,e),this.opts=t}return c(e,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0,b.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var n=t.seriesIndex,r=t.dataPointIndex,o=t.w;return e._getBoxTooltip(o,n,r,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var n=t.seriesIndex,r=t.dataPointIndex,o=t.w;return e._getBoxTooltip(o,n,r,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,t){t.ctx;var n=t.seriesIndex,r=t.dataPointIndex,o=t.w,i=o.globals.seriesRangeStart[n][r];return o.globals.seriesRangeEnd[n][r]-i},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(e){var t=new W(e.ctx,null),n=t.getTooltipValues(e),r=n.color,o=n.seriesName,i=n.ylabel,a=n.startVal,s=n.endVal;return t.buildCustomTooltipHTML({color:r,seriesName:o,ylabel:i,start:a,end:s})}(e):function(e){var t=new W(e.ctx,null),n=t.getTooltipValues(e),r=n.color,o=n.seriesName,i=n.ylabel,a=n.start,s=n.end;return t.buildCustomTooltipHTML({color:r,seriesName:o,ylabel:i,start:a,end:s})}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"brush",value:function(e){return b.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach((function(t,n){e.yaxis[n].min=0,e.yaxis[n].max=100})),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(e){return"number"==typeof e&&e?e.toFixed(0)+"%":e}),e}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,n){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(e){return b.isNumber(e)?Math.floor(e):e};var r=e.xaxis.labels.formatter,o=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return n&&n.length&&(o=n.map((function(e){return Array.isArray(e)?e:String(e)}))),o&&o.length&&(e.xaxis.labels.formatter=function(e){return b.isNumber(e)?r(o[Math.floor(e)-1]):r(e)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(e,t,n,r,o){var i=e.globals.seriesCandleO[t][n],a=e.globals.seriesCandleH[t][n],s=e.globals.seriesCandleM[t][n],l=e.globals.seriesCandleL[t][n],c=e.globals.seriesCandleC[t][n];return e.config.series[t].type&&e.config.series[t].type!==o?'<div class="apexcharts-custom-tooltip">\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": <strong>").concat(e.globals.series[t][n],"</strong>\n </div>"):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(r[0],': <span class="value">')+i+"</span></div>"+"<div>".concat(r[1],': <span class="value">')+a+"</span></div>"+(s?"<div>".concat(r[2],': <span class="value">')+s+"</span></div>":"")+"<div>".concat(r[3],': <span class="value">')+l+"</span></div>"+"<div>".concat(r[4],': <span class="value">')+c+"</span></div></div>"}}]),e}(),j=function(){function e(t){s(this,e),this.opts=t}return c(e,[{key:"init",value:function(e){var t=e.responsiveOverride,n=this.opts,r=new P,o=new V(n);this.chartType=n.chart.type,"histogram"===this.chartType&&(n.chart.type="bar",n=b.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},n)),n=this.extendYAxis(n),n=this.extendAnnotations(n);var i=r.init(),s={};if(n&&"object"===a(n)){var l={};l=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","histogram","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(n.chart.type)?o[n.chart.type]():o.line(),n.chart.brush&&n.chart.brush.enabled&&(l=o.brush(l)),n.chart.stacked&&"100%"===n.chart.stackType&&(n=o.stacked100(n)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(n),n.xaxis=n.xaxis||window.Apex.xaxis||{},t||(n.xaxis.convertedCatToNumeric=!1),((n=this.checkForCatToNumericXAxis(this.chartType,l,n)).chart.sparkline&&n.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(l=o.sparkline(l)),s=b.extend(i,l)}var c=b.extend(s,window.Apex);return i=b.extend(c,n),this.handleUserInputErrors(i)}},{key:"checkForCatToNumericXAxis",value:function(e,t,n){var r=new V(n),o=("bar"===e||"boxPlot"===e)&&n.plotOptions&&n.plotOptions.bar&&n.plotOptions.bar.horizontal,i="pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e,a="datetime"!==n.xaxis.type&&"numeric"!==n.xaxis.type,s=n.xaxis.tickPlacement?n.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return o||i||!a||"between"===s||(n=r.convertCatToNumeric(n)),n}},{key:"extendYAxis",value:function(e,t){var n=new P;(void 0===e.yaxis||!e.yaxis||Array.isArray(e.yaxis)&&0===e.yaxis.length)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=b.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[b.extend(n.yAxis,e.yaxis)]:e.yaxis=b.extendArray(e.yaxis,n.yAxis);var r=!1;e.yaxis.forEach((function(e){e.logarithmic&&(r=!0)}));var o=e.series;return t&&!o&&(o=t.config.series),r&&o.length!==e.yaxis.length&&o.length&&(e.yaxis=o.map((function(t,r){if(t.name||(o[r].name="series-".concat(r+1)),e.yaxis[r])return e.yaxis[r].seriesName=o[r].name,e.yaxis[r];var i=b.extend(n.yAxis,e.yaxis[0]);return i.show=!1,i}))),r&&o.length>1&&o.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),e}},{key:"extendAnnotations",value:function(e){return void 0===e.annotations&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new P;return e.annotations.yaxis=b.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new P;return e.annotations.xaxis=b.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new P;return e.annotations.points=b.extendArray(void 0!==e.annotations.points?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&"dark"===e.theme.mode&&(e.tooltip||(e.tooltip={}),"light"!==e.tooltip.theme&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.chart.background||(e.chart.background="#424242"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===t.chart.type&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t}}]),e}(),B=function(){function e(){s(this,e)}return c(e,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRangeBar=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasGroups=!1,e.groups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.xaxisLabelsCount=0,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:"pan"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.pan,selectionEnabled:"selection"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=b.extend({},e),t.initialSeries=b.clone(e.series),t.lastXAxis=b.clone(t.initialConfig.xaxis),t.lastYAxis=b.clone(t.initialConfig.yaxis),t}}]),e}(),z=function(){function e(t){s(this,e),this.opts=t}return c(e,[{key:"init",value:function(){var e=new j(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new B).init(e)}}}]),e}(),U=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new S(this.ctx)}return c(e,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new L(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!==e[this.activeSeriesIndex].data[0]&&void 0!==e[this.activeSeriesIndex].data[0].x&&null!==e[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new L(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&void 0!==e[this.activeSeriesIndex].data[0]&&null!==e[this.activeSeriesIndex].data[0]&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var n=this.w.config,r=this.w.globals,o="boxPlot"===n.chart.type||"boxPlot"===n.series[t].type,i=0;i<e[t].data.length;i++)if(void 0!==e[t].data[i][1]&&(Array.isArray(e[t].data[i][1])&&4===e[t].data[i][1].length&&!o?this.twoDSeries.push(b.parseNumber(e[t].data[i][1][3])):e[t].data[i].length>=5?this.twoDSeries.push(b.parseNumber(e[t].data[i][4])):this.twoDSeries.push(b.parseNumber(e[t].data[i][1])),r.dataFormatXNumeric=!0),"datetime"===n.xaxis.type){var a=new Date(e[t].data[i][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(e[t].data[i][0]);for(var s=0;s<e[t].data.length;s++)void 0!==e[t].data[s][2]&&(this.threeDSeries.push(e[t].data[s][2]),r.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,t){var n=this.w.config,r=this.w.globals,o=new H(this.ctx),i=t;r.collapsedSeriesIndices.indexOf(t)>-1&&(i=this.activeSeriesIndex);for(var a=0;a<e[t].data.length;a++)void 0!==e[t].data[a].y&&(Array.isArray(e[t].data[a].y)?this.twoDSeries.push(b.parseNumber(e[t].data[a].y[e[t].data[a].y.length-1])):this.twoDSeries.push(b.parseNumber(e[t].data[a].y))),void 0!==e[t].data[a].goals&&Array.isArray(e[t].data[a].goals)?(void 0===this.seriesGoals[t]&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(e[t].data[a].goals)):(void 0===this.seriesGoals[t]&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(null));for(var s=0;s<e[i].data.length;s++){var l="string"==typeof e[i].data[s].x,c=Array.isArray(e[i].data[s].x),u=!c&&!!o.isValidDate(e[i].data[s].x.toString());if(l||u)if(l||n.xaxis.convertedCatToNumeric){var p=r.isBarHorizontal&&r.isRangeData;"datetime"!==n.xaxis.type||p?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[i].data[s].x)):this.twoDSeriesX.push(o.parseDate(e[i].data[s].x))}else"datetime"===n.xaxis.type?this.twoDSeriesX.push(o.parseDate(e[i].data[s].x.toString())):(r.dataFormatXNumeric=!0,r.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[i].data[s].x)));else c?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[i].data[s].x)):(r.isXNumeric=!0,r.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[i].data[s].x))}if(e[t].data[0]&&void 0!==e[t].data[0].z){for(var d=0;d<e[t].data.length;d++)this.threeDSeries.push(e[t].data[d].z);r.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,t){var n=this.w.globals,r={};return this.isFormat2DArray()?r=this.handleRangeDataFormat("array",e,t):this.isFormatXY()&&(r=this.handleRangeDataFormat("xy",e,t)),n.seriesRangeStart.push(r.start),n.seriesRangeEnd.push(r.end),n.seriesRangeBar.push(r.rangeUniques),n.seriesRangeBar.forEach((function(e,t){e&&e.forEach((function(e,t){e.y.forEach((function(t,n){for(var r=0;r<e.y.length;r++)if(n!==r){var o=t.y1,i=t.y2,a=e.y[r].y1;o<=e.y[r].y2&&a<=i&&(e.overlaps.indexOf(t.rangeName)<0&&e.overlaps.push(t.rangeName),e.overlaps.indexOf(e.y[r].rangeName)<0&&e.overlaps.push(e.y[r].rangeName))}}))}))})),r}},{key:"handleCandleStickBoxData",value:function(e,t){var n=this.w.globals,r={};return this.isFormat2DArray()?r=this.handleCandleStickBoxDataFormat("array",e,t):this.isFormatXY()&&(r=this.handleCandleStickBoxDataFormat("xy",e,t)),n.seriesCandleO[t]=r.o,n.seriesCandleH[t]=r.h,n.seriesCandleM[t]=r.m,n.seriesCandleL[t]=r.l,n.seriesCandleC[t]=r.c,r}},{key:"handleRangeDataFormat",value:function(e,t,n){var r=[],o=[],i=t[n].data.filter((function(e,t,n){return t===n.findIndex((function(t){return t.x===e.x}))})).map((function(e,t){return{x:e.x,overlaps:[],y:[]}})),a="Please provide [Start, End] values in valid format. Read more https://apexcharts.com/docs/series/#rangecharts",s=new L(this.ctx).getActiveConfigSeriesIndex();if("array"===e){if(2!==t[s].data[0][1].length)throw new Error(a);for(var l=0;l<t[n].data.length;l++)r.push(t[n].data[l][1][0]),o.push(t[n].data[l][1][1])}else if("xy"===e){if(2!==t[s].data[0].y.length)throw new Error(a);for(var c=function(e){var a=b.randomId(),s=t[n].data[e].x,l={y1:t[n].data[e].y[0],y2:t[n].data[e].y[1],rangeName:a};t[n].data[e].rangeName=a;var c=i.findIndex((function(e){return e.x===s}));i[c].y.push(l),r.push(l.y1),o.push(l.y2)},u=0;u<t[n].data.length;u++)c(u)}return{start:r,end:o,rangeUniques:i}}},{key:"handleCandleStickBoxDataFormat",value:function(e,t,n){var r=this.w,o="boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[n].type,i=[],a=[],s=[],l=[],c=[];if("array"===e)if(o&&6===t[n].data[0].length||!o&&5===t[n].data[0].length)for(var u=0;u<t[n].data.length;u++)i.push(t[n].data[u][1]),a.push(t[n].data[u][2]),o?(s.push(t[n].data[u][3]),l.push(t[n].data[u][4]),c.push(t[n].data[u][5])):(l.push(t[n].data[u][3]),c.push(t[n].data[u][4]));else for(var p=0;p<t[n].data.length;p++)Array.isArray(t[n].data[p][1])&&(i.push(t[n].data[p][1][0]),a.push(t[n].data[p][1][1]),o?(s.push(t[n].data[p][1][2]),l.push(t[n].data[p][1][3]),c.push(t[n].data[p][1][4])):(l.push(t[n].data[p][1][2]),c.push(t[n].data[p][1][3])));else if("xy"===e)for(var d=0;d<t[n].data.length;d++)Array.isArray(t[n].data[d].y)&&(i.push(t[n].data[d].y[0]),a.push(t[n].data[d].y[1]),o?(s.push(t[n].data[d].y[2]),l.push(t[n].data[d].y[3]),c.push(t[n].data[d].y[4])):(l.push(t[n].data[d].y[2]),c.push(t[n].data[d].y[3])));return{o:i,h:a,m:s,l:l,c:c}}},{key:"parseDataAxisCharts",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx,r=this.w.config,o=this.w.globals,i=new H(n),a=r.labels.length>0?r.labels.slice():r.xaxis.categories.slice();o.isRangeBar="rangeBar"===r.chart.type&&o.isBarHorizontal,o.hasGroups="category"===r.xaxis.type&&void 0!==r.xaxis.group&&void 0!==r.xaxis.group.groups&&r.xaxis.group.groups.length>0,o.hasGroups&&(o.groups=r.xaxis.group.groups);for(var s=function(){for(var e=0;e<a.length;e++)if("string"==typeof a[e]){if(!i.isValidDate(a[e]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");t.twoDSeriesX.push(i.parseDate(a[e]))}else t.twoDSeriesX.push(a[e])},l=0;l<e.length;l++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===e[l].data)return void console.error("It is a possibility that you may have not included 'data' property in series.");if("rangeBar"!==r.chart.type&&"rangeArea"!==r.chart.type&&"rangeBar"!==e[l].type&&"rangeArea"!==e[l].type||(o.isRangeData=!0,this.handleRangeData(e,l)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,l):this.isFormatXY()&&this.handleFormatXY(e,l),"candlestick"!==r.chart.type&&"candlestick"!==e[l].type&&"boxPlot"!==r.chart.type&&"boxPlot"!==e[l].type||this.handleCandleStickBoxData(e,l),o.series.push(this.twoDSeries),o.labels.push(this.twoDSeriesX),o.seriesX.push(this.twoDSeriesX),o.seriesGoals=this.seriesGoals,l!==this.activeSeriesIndex||this.fallbackToCategory||(o.isXNumeric=!0);else{"datetime"===r.xaxis.type?(o.isXNumeric=!0,s(),o.seriesX.push(this.twoDSeriesX)):"numeric"===r.xaxis.type&&(o.isXNumeric=!0,a.length>0&&(this.twoDSeriesX=a,o.seriesX.push(this.twoDSeriesX))),o.labels.push(this.twoDSeriesX);var c=e[l].data.map((function(e){return b.parseNumber(e)}));o.series.push(c)}o.seriesZ.push(this.threeDSeries),void 0!==e[l].name?o.seriesNames.push(e[l].name):o.seriesNames.push("series-"+parseInt(l+1,10)),void 0!==e[l].color?o.seriesColors.push(e[l].color):o.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,n=this.w.config;t.series=e.slice(),t.seriesNames=n.labels.slice();for(var r=0;r<t.series.length;r++)void 0===t.seriesNames[r]&&t.seriesNames.push("series-"+(r+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var t=this.w.config,n=this.w.globals;t.xaxis.categories.length>0?n.labels=t.xaxis.categories:t.labels.length>0?n.labels=t.labels.slice():this.fallbackToCategory?(n.labels=n.labels[0],n.seriesRangeBar.length&&(n.seriesRangeBar.map((function(e){e.forEach((function(e){n.labels.indexOf(e.x)<0&&e.x&&n.labels.push(e.x)}))})),n.labels=n.labels.filter((function(e,t,n){return n.indexOf(e)===t}))),t.xaxis.convertedCatToNumeric&&(new V(t).convertCatToNumericXaxis(t,this.ctx,n.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,n=this.w.config,r=[];if(t.axisCharts){if(t.series.length>0)if(this.isFormatXY())for(var o=n.series.map((function(e,t){return e.data.filter((function(e,t,n){return n.findIndex((function(t){return t.x===e.x}))===t}))})),i=o.reduce((function(e,t,n,r){return r[e].length>t.length?e:n}),0),a=0;a<o[i].length;a++)r.push(a+1);else for(var s=0;s<t.series[t.maxValsInArrayIndex].length;s++)r.push(s+1);t.seriesX=[];for(var l=0;l<e.length;l++)t.seriesX.push(r);t.isXNumeric=!0}if(0===r.length){r=t.axisCharts?[]:t.series.map((function(e,t){return t+1}));for(var c=0;c<e.length;c++)t.seriesX.push(r)}t.labels=r,n.xaxis.convertedCatToNumeric&&(t.categoryLabels=r.map((function(e){return n.xaxis.labels.formatter(e)}))),t.noLabelsProvided=!0}},{key:"parseData",value:function(e){var t=this.w,n=t.config,r=t.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),r.axisCharts?this.parseDataAxisCharts(e):this.parseDataNonAxisCharts(e),this.coreUtils.getLargestSeries(),"bar"===n.chart.type&&n.chart.stacked){var o=new L(this.ctx);r.series=o.setNullSeriesToZeroValues(r.series)}this.coreUtils.getSeriesTotals(),r.axisCharts&&this.coreUtils.getStackedSeriesTotals(),this.coreUtils.getPercentSeries(),r.dataFormatXNumeric||r.isXNumeric&&("numeric"!==n.xaxis.type||0!==n.labels.length||0!==n.xaxis.categories.length)||this.handleExternalLabelsData(e);for(var i=this.coreUtils.getCategoryLabels(r.labels),a=0;a<i.length;a++)if(Array.isArray(i[a])){r.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this,t=this.w;t.globals.ignoreYAxisIndexes=t.globals.collapsedSeries.map((function(n,r){if(e.w.globals.isMultipleYAxis&&!t.config.chart.stacked)return n.index}))}}]),e}(),Y=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.tooltipKeyFormat="dd MMM"}return c(e,[{key:"xLabelFormat",value:function(e,t,n,r){var o=this.w;if("datetime"===o.config.xaxis.type&&void 0===o.config.xaxis.labels.formatter&&void 0===o.config.tooltip.x.formatter){var i=new H(this.ctx);return i.formatDate(i.getDate(t),o.config.tooltip.x.format)}return e(t,n,r)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map((function(e){return e})):e}},{key:"defaultYFormatter",value:function(e,t,n){var r=this.w;return b.isNumber(e)&&(e=0!==r.globals.yValueDecimal?e.toFixed(void 0!==t.decimalsInFloat?t.decimalsInFloat:r.globals.yValueDecimal):r.globals.maxYArr[n]-r.globals.minYArr[n]<5?e.toFixed(1):e.toFixed(0)),e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(t){return e.defaultGeneralFormatter(t)},t.globals.ttKeyFormatter=function(t){return e.defaultGeneralFormatter(t)},t.globals.ttZFormatter=function(e){return e},t.globals.legendFormatter=function(t){return e.defaultGeneralFormatter(t)},void 0!==t.config.xaxis.labels.formatter?t.globals.xLabelFormatter=t.config.xaxis.labels.formatter:t.globals.xLabelFormatter=function(e){if(b.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(b.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);var n=t.globals.maxX-t.globals.minX;return n>0&&n<100?e.toFixed(1):e.toFixed(0)}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?e.toFixed(1):e.toFixed(0)}return e},"function"==typeof t.config.tooltip.x.formatter?t.globals.ttKeyFormatter=t.config.tooltip.x.formatter:t.globals.ttKeyFormatter=t.globals.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach((function(n,r){void 0!==n.labels.formatter?t.globals.yLabelFormatters[r]=n.labels.formatter:t.globals.yLabelFormatters[r]=function(o){return t.globals.xyCharts?Array.isArray(o)?o.map((function(t){return e.defaultYFormatter(t,n,r)})):e.defaultYFormatter(o,n,r):o}})),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if("heatmap"===e.config.chart.type){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce((function(e,t){return e.length>t.length?e:t}),0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),e}(),X=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"getLabel",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=this.w,l=void 0===e[r]?"":e[r],c=l,u=s.globals.xLabelFormatter,p=s.config.xaxis.labels.formatter,d=!1,h=new Y(this.ctx),f=l;a&&(c=h.xLabelFormat(u,l,f,{i:r,dateFormatter:new H(this.ctx).formatDate,w:s}),void 0!==p&&(c=p(l,e[r],{i:r,dateFormatter:new H(this.ctx).formatDate,w:s})));var g=function(e){var n=null;return t.forEach((function(e){"month"===e.unit?n="year":"day"===e.unit?n="month":"hour"===e.unit?n="day":"minute"===e.unit&&(n="hour")})),n===e};t.length>0?(d=g(t[r].unit),n=t[r].position,c=t[r].value):"datetime"===s.config.xaxis.type&&void 0===p&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();var v=new x(this.ctx),m={};m=s.globals.rotateXLabels&&a?v.getTextRects(c,parseInt(i,10),null,"rotate(".concat(s.config.xaxis.labels.rotate," 0 0)"),!1):v.getTextRects(c,parseInt(i,10));var y=!s.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&(0===c.indexOf("NaN")||0===c.toLowerCase().indexOf("invalid")||c.toLowerCase().indexOf("infinity")>=0||o.indexOf(c)>=0&&y)&&(c=""),{x:n,text:c,textRect:m,isBold:d}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,n){var r=this.w,o=r.config.xaxis.tickAmount;return"dataPoints"===o&&(o=Math.round(r.globals.gridWidth/120)),o>n||e%Math.round(n/(o+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,n,r,o){var i=this.w;if(0===e&&i.globals.skipFirstTimelinelabel&&(t.text=""),e===n-1&&i.globals.skipLastTimelinelabel&&(t.text=""),i.config.xaxis.labels.hideOverlappingLabels&&r.length>0){var a=o[o.length-1];t.x<a.textRect.width/(i.globals.rotateXLabels?Math.abs(i.config.xaxis.labels.rotate)/12:1.01)+a.x&&(t.text="")}return t}},{key:"checkForReversedLabels",value:function(e,t){var n=this.w;return n.config.yaxis[e]&&n.config.yaxis[e].reversed&&t.reverse(),t}},{key:"isYAxisHidden",value:function(e){var t=this.w,n=new S(this.ctx);return!t.config.yaxis[e].show||!t.config.yaxis[e].showForNullSeries&&n.isSeriesNull(e)&&-1===t.globals.collapsedSeriesIndices.indexOf(e)}},{key:"getYAxisForeColor",value:function(e,t){var n=this.w;return Array.isArray(e)&&n.globals.yAxisScale[t]&&this.ctx.theme.pushExtraColors(e,n.globals.yAxisScale[t].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,t,n,r,o,i,a){var s=this.w,l=new x(this.ctx),c=s.globals.translateY;if(r.show&&t>0){!0===s.config.yaxis[o].opposite&&(e+=r.width);for(var u=t;u>=0;u--){var p=c+t/10+s.config.yaxis[o].labels.offsetY-1;s.globals.isBarHorizontal&&(p=i*u),"heatmap"===s.config.chart.type&&(p+=i/2);var d=l.drawLine(e+n.offsetX-r.width+r.offsetX,p+r.offsetY,e+n.offsetX+r.offsetX,p+r.offsetY,r.color);a.add(d),c+=i}}}}]),e}(),q=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"scaleSvgNode",value:function(e,t){var n=parseFloat(e.getAttributeNS(null,"width")),r=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",n*t),e.setAttributeNS(null,"height",r*t),e.setAttributeNS(null,"viewBox","0 0 "+n+" "+r)}},{key:"fixSvgStringForIe11",value:function(e){if(!b.isIE11())return e.replace(/ /g," ");var t=0,n=e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(e){return 2===++t?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':e}));return(n=n.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(e){var t=this.w.globals.dom.Paper.svg();if(1!==e){var n=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(n,e),t=(new XMLSerializer).serializeToString(n)}return this.fixSvgStringForIe11(t)}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),n=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(r,(function(e){e.setAttribute("width",0)})),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[0].setAttribute("x2",-500)),n&&n[0]&&(n[0].setAttribute("y",-100),n[0].setAttribute("y1",-100),n[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var e=this.getSvgString(),t=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(t)}},{key:"dataURI",value:function(e){var t=this;return new Promise((function(n){var r=t.w,o=e?e.scale||e.width/r.globals.svgWidth:1;t.cleanup();var i=document.createElement("canvas");i.width=r.globals.svgWidth*o,i.height=parseInt(r.globals.dom.elWrap.style.height,10)*o;var a="transparent"===r.config.chart.background?"#fff":r.config.chart.background,s=i.getContext("2d");s.fillStyle=a,s.fillRect(0,0,i.width*o,i.height*o);var l=t.getSvgString(o);if(window.canvg&&b.isIE11()){var c=window.canvg.Canvg.fromString(s,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var u=i.msToBlob();c.stop(),n({blob:u})}else{var p="data:image/svg+xml,"+encodeURIComponent(l),d=new Image;d.crossOrigin="anonymous",d.onload=function(){if(s.drawImage(d,0,0),i.msToBlob){var e=i.msToBlob();n({blob:e})}else{var t=i.toDataURL("image/png");n({imgURI:t})}},d.src=p}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var e=this;this.dataURI().then((function(t){var n=t.imgURI,r=t.blob;r?navigator.msSaveOrOpenBlob(r,e.w.globals.chartID+".png"):e.triggerDownload(n,e.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(e){var t=this,n=e.series,r=e.columnDelimiter,o=e.lineDelimiter,i=void 0===o?"\n":o,a=this.w,s=[],l=[],c="",u=new U(this.ctx),p=new X(this.ctx),d=function(e){var n="";if(a.globals.axisCharts){if("category"===a.config.xaxis.type||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){var o=a.globals.yLabelFormatters[0],i=new L(t.ctx).getActiveConfigSeriesIndex();n=o(a.globals.labels[e],{seriesIndex:i,dataPointIndex:e,w:a})}else n=p.getLabel(a.globals.labels,a.globals.timescaleLabels,0,e).text;"datetime"===a.config.xaxis.type&&(a.config.xaxis.categories.length?n=a.config.xaxis.categories[e]:a.config.labels.length&&(n=a.config.labels[e]))}else n=a.config.labels[e];return Array.isArray(n)&&(n=n.join(" ")),b.isNumber(n)?n:n.split(r).join("")};s.push(a.config.chart.toolbar.export.csv.headerCategory),n.map((function(e,t){var n=e.name?e.name:"series-".concat(t);a.globals.axisCharts&&s.push(n.split(r).join("")?n.split(r).join(""):"series-".concat(t))})),a.globals.axisCharts||(s.push(a.config.chart.toolbar.export.csv.headerValue),l.push(s.join(r))),n.map((function(e,t){a.globals.axisCharts?function(e,t){if(s.length&&0===t&&l.push(s.join(r)),e.data&&e.data.length)for(var o=0;o<e.data.length;o++){s=[];var i=d(o);if(i||(u.isFormatXY()?i=n[t].data[o].x:u.isFormat2DArray()&&(i=n[t].data[o]?n[t].data[o][0]:"")),0===t){s.push((p=i,"datetime"===a.config.xaxis.type&&String(p).length>=10?a.config.chart.toolbar.export.csv.dateFormatter(i):b.isNumber(i)?i:i.split(r).join("")));for(var c=0;c<a.globals.series.length;c++)s.push(a.globals.series[c][o])}("candlestick"===a.config.chart.type||e.type&&"candlestick"===e.type)&&(s.pop(),s.push(a.globals.seriesCandleO[t][o]),s.push(a.globals.seriesCandleH[t][o]),s.push(a.globals.seriesCandleL[t][o]),s.push(a.globals.seriesCandleC[t][o])),("boxPlot"===a.config.chart.type||e.type&&"boxPlot"===e.type)&&(s.pop(),s.push(a.globals.seriesCandleO[t][o]),s.push(a.globals.seriesCandleH[t][o]),s.push(a.globals.seriesCandleM[t][o]),s.push(a.globals.seriesCandleL[t][o]),s.push(a.globals.seriesCandleC[t][o])),"rangeBar"===a.config.chart.type&&(s.pop(),s.push(a.globals.seriesRangeStart[t][o]),s.push(a.globals.seriesRangeEnd[t][o])),s.length&&l.push(s.join(r))}var p}(e,t):((s=[]).push(a.globals.labels[t].split(r).join("")),s.push(a.globals.series[t]),l.push(s.join(r)))})),c+=l.join(i),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+c),a.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,t,n){var r=document.createElement("a");r.href=e,r.download=(t||this.w.globals.chartID)+n,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}]),e}(),K=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var n=this.w;this.axesUtils=new X(t),this.xaxisLabels=n.globals.labels.slice(),n.globals.timescaleLabels.length>0&&!n.globals.isBarHorizontal&&(this.xaxisLabels=n.globals.timescaleLabels.slice()),n.config.xaxis.overwriteCategories&&(this.xaxisLabels=n.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===n.config.xaxis.position?this.offY=0:this.offY=n.globals.gridHeight+1,this.offY=this.offY+n.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===n.config.chart.type&&n.config.plotOptions.bar.horizontal,this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.xaxisBorderWidth=n.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=n.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=n.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=n.config.xaxis.axisBorder.height,this.yaxis=n.config.yaxis[0]}return c(e,[{key:"drawXaxis",value:function(){var e=this.w,t=new x(this.ctx),n=t.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),r=t.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});n.add(r);for(var o=[],i=0;i<this.xaxisLabels.length;i++)o.push(this.xaxisLabels[i]);if(this.drawXAxisLabelAndGroup(!0,t,r,o,e.globals.isXNumeric,(function(e,t){return t})),e.globals.hasGroups){var a=e.globals.groups;o=[];for(var s=0;s<a.length;s++)o.push(a[s].title);var l={};e.config.xaxis.group.style&&(l.xaxisFontSize=e.config.xaxis.group.style.fontSize,l.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,l.xaxisForeColors=e.config.xaxis.group.style.colors,l.fontWeight=e.config.xaxis.group.style.fontWeight,l.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,t,r,o,!1,(function(e,t){return a[e].cols*t}),l)}if(void 0!==e.config.xaxis.title.text){var c=t.group({class:"apexcharts-xaxis-title"}),u=t.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+e.globals.xAxisLabelsHeight+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});c.add(u),n.add(c)}if(e.config.xaxis.axisBorder.show){var p=e.globals.barPadForNumericAxis,d=t.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-p,this.offY,this.xaxisBorderWidth+p,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);n.add(d)}return n}},{key:"drawXAxisLabelAndGroup",value:function(e,t,n,r,o,i){var a,s=this,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=[],u=[],p=this.w,d=l.xaxisFontSize||this.xaxisFontSize,h=l.xaxisFontFamily||this.xaxisFontFamily,f=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||p.config.xaxis.labels.style.fontWeight,v=l.cssClass||p.config.xaxis.labels.style.cssClass,m=p.globals.padHorizontal,y=r.length,b="category"===p.config.xaxis.type?p.globals.dataPoints:y;if(o){var w=b>1?b-1:b;a=p.globals.gridWidth/w,m=m+i(0,a)/2+p.config.xaxis.labels.offsetX}else a=p.globals.gridWidth/b,m=m+i(0,a)+p.config.xaxis.labels.offsetX;for(var C=function(o){var l=m-i(o,a)/2+p.config.xaxis.labels.offsetX;0===o&&1===y&&a/2===m&&1===b&&(l=p.globals.gridWidth/2);var w=s.axesUtils.getLabel(r,p.globals.timescaleLabels,l,o,c,d,e),C=28;if(p.globals.rotateXLabels&&e&&(C=22),e||(C=C+parseFloat(d)+(p.globals.xAxisLabelsHeight-p.globals.xAxisGroupLabelsHeight)+(p.globals.rotateXLabels?10:0)),w=void 0!==p.config.xaxis.tickAmount&&"dataPoints"!==p.config.xaxis.tickAmount&&"datetime"!==p.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(o,w,y):s.axesUtils.checkForOverflowingLabels(o,w,y,c,u),e&&w.text&&p.globals.xaxisLabelsCount++,p.config.xaxis.labels.show){var x=t.drawText({x:w.x,y:s.offY+p.config.xaxis.labels.offsetY+C-("top"===p.config.xaxis.position?p.globals.xAxisHeight+p.config.xaxis.axisTicks.height-2:0),text:w.text,textAnchor:"middle",fontWeight:w.isBold?600:g,fontSize:d,fontFamily:h,foreColor:Array.isArray(f)?e&&p.config.xaxis.convertedCatToNumeric?f[p.globals.minX+o-1]:f[o]:f,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+v});if(n.add(x),e){var S=document.createElementNS(p.globals.SVGNS,"title");S.textContent=Array.isArray(w.text)?w.text.join(" "):w.text,x.node.appendChild(S),""!==w.text&&(c.push(w.text),u.push(w))}}o<y-1&&(m+=i(o+1,a))},x=0;x<=y-1;x++)C(x)}},{key:"drawXaxisInversed",value:function(e){var t,n,r=this,o=this.w,i=new x(this.ctx),a=o.config.yaxis[0].opposite?o.globals.translateYAxisX[e]:0,s=i.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),l=i.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+a+", 0)"});s.add(l);var c=[];if(o.config.yaxis[e].show)for(var u=0;u<this.xaxisLabels.length;u++)c.push(this.xaxisLabels[u]);t=o.globals.gridHeight/c.length,n=-t/2.2;var p=o.globals.yLabelFormatters[0],d=o.config.yaxis[0].labels;if(d.show)for(var h=function(a){var s=void 0===c[a]?"":c[a];s=p(s,{seriesIndex:e,dataPointIndex:a,w:o});var u=r.axesUtils.getYAxisForeColor(d.style.colors,e),h=0;Array.isArray(s)&&(h=s.length/2*parseInt(d.style.fontSize,10));var f=i.drawText({x:d.offsetX-15,y:n+t+d.offsetY-h,text:s,textAnchor:r.yaxis.opposite?"start":"end",foreColor:Array.isArray(u)?u[a]:u,fontSize:d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+d.style.cssClass});l.add(f);var g=document.createElementNS(o.globals.SVGNS,"title");if(g.textContent=Array.isArray(s)?s.join(" "):s,f.node.appendChild(g),0!==o.config.yaxis[e].labels.rotate){var v=i.rotateAroundCenter(f.node);f.node.setAttribute("transform","rotate(".concat(o.config.yaxis[e].labels.rotate," 0 ").concat(v.y,")"))}n+=t},f=0;f<=c.length-1;f++)h(f);if(void 0!==o.config.yaxis[0].title.text){var g=i.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),v=i.drawText({x:0,y:o.globals.gridHeight/2,text:o.config.yaxis[0].title.text,textAnchor:"middle",foreColor:o.config.yaxis[0].title.style.color,fontSize:o.config.yaxis[0].title.style.fontSize,fontWeight:o.config.yaxis[0].title.style.fontWeight,fontFamily:o.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+o.config.yaxis[0].title.style.cssClass});g.add(v),s.add(g)}var m=0;this.isCategoryBarHorizontal&&o.config.yaxis[0].opposite&&(m=o.globals.gridWidth);var y=o.config.xaxis.axisBorder;if(y.show){var b=i.drawLine(o.globals.padHorizontal+y.offsetX+m,1+y.offsetY,o.globals.padHorizontal+y.offsetX+m,o.globals.gridHeight+y.offsetY,y.color,0);s.add(b)}return o.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(m,c.length,o.config.yaxis[0].axisBorder,o.config.yaxis[0].axisTicks,0,t,s),s}},{key:"drawXaxisTicks",value:function(e,t,n){var r=this.w,o=e;if(!(e<0||e-2>r.globals.gridWidth)){var i=this.offY+r.config.xaxis.axisTicks.offsetY;if(t=t+i+r.config.xaxis.axisTicks.height,"top"===r.config.xaxis.position&&(t=i-r.config.xaxis.axisTicks.height),r.config.xaxis.axisTicks.show){var a=new x(this.ctx).drawLine(e+r.config.xaxis.axisTicks.offsetX,i+r.config.xaxis.offsetY,o+r.config.xaxis.axisTicks.offsetX,t+r.config.xaxis.offsetY,r.config.xaxis.axisTicks.color);n.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],n=this.xaxisLabels.length,r=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var o=0;o<n;o++)r=this.xaxisLabels[o].position,t.push(r);else for(var i=n,a=0;a<i;a++){var s=i;e.globals.isXNumeric&&"bar"!==e.config.chart.type&&(s-=1),r+=e.globals.gridWidth/s,t.push(r)}return t}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,t=new x(this.ctx),n=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var a=0;a<r.length;a++){var s=t.rotateAroundCenter(r[a]);s.y=s.y-1,s.x=s.x+1,r[a].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(s.x," ").concat(s.y,")")),r[a].setAttribute("text-anchor","end"),n.setAttribute("transform","translate(0, ".concat(-10,")"));var l=r[a].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(l,(function(n){t.placeTextWithEllipsis(n,n.textContent,e.globals.xAxisLabelsHeight-("bottom"===e.config.legend.position?20:10))}))}else!function(){for(var n=e.globals.gridWidth/(e.globals.labels.length+1),o=0;o<r.length;o++){var i=r[o].childNodes;e.config.xaxis.labels.trim&&"datetime"!==e.config.xaxis.type&&Array.prototype.forEach.call(i,(function(e){t.placeTextWithEllipsis(e,e.textContent,n)}))}}();if(o.length>0){var c=o[o.length-1].getBBox(),u=o[0].getBBox();c.x<-20&&o[o.length-1].parentNode.removeChild(o[o.length-1]),u.x+u.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&o[0].parentNode.removeChild(o[0]);for(var p=0;p<i.length;p++)t.placeTextWithEllipsis(i[p],i[p].textContent,e.config.yaxis[0].labels.maxWidth-2*parseFloat(e.config.yaxis[0].title.style.fontSize)-20)}}}]),e}(),$=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var n=this.w;this.xaxisLabels=n.globals.labels.slice(),this.axesUtils=new X(t),this.isRangeBar=n.globals.seriesRangeBar.length,n.globals.timescaleLabels.length>0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return c(e,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,n=new x(this.ctx);null===e&&(e=n.group({class:"apexcharts-grid"}));var r=n.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),o=n.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(o),e.add(r),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,n=new x(this.ctx),r=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var o=0;e.config.stroke.width.forEach((function(e){o=Math.max(o,e)})),r=o}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elForecastMask.setAttribute("id","forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(t.cuid));var i=e.config.chart.type,a=0,s=0;("bar"===i||"rangeBar"===i||"candlestick"===i||"boxPlot"===i||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(a=e.config.grid.padding.left,s=e.config.grid.padding.right,t.barPadForNumericAxis>a&&(a=t.barPadForNumericAxis,s=t.barPadForNumericAxis)),t.dom.elGridRect=n.drawRect(-r/2-a-2,-r/2,t.gridWidth+r+s+a+4,t.gridHeight+r,0,"#fff");var l=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=n.drawRect(2*-l,2*-l,t.gridWidth+4*l,t.gridHeight+4*l,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var c=t.dom.baseEl.querySelector("defs");c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask),c.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,n=e.x1,r=e.y1,o=e.x2,i=e.y2,a=e.xCount,s=e.parent,l=this.w;if(!(0===t&&l.globals.skipFirstTimelinelabel||t===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({x1:n,y1:r,x2:o,y2:i,parent:s});var c=0;if(l.globals.hasGroups&&(void 0===l.config.xaxis.tickAmount||"dataPoints"===l.config.xaxis.tickAmount)&&"between"===l.config.xaxis.tickPlacement){var u=l.globals.groups;if(u){for(var p=0,d=0;p<t&&d<u.length;d++)p+=u[d].cols;p===t&&(c=.6*l.globals.xAxisLabelsHeight)}}new K(this.ctx).drawXaxisTicks(n,c,this.elg)}}},{key:"_drawGridLine",value:function(e){var t=e.x1,n=e.y1,r=e.x2,o=e.y2,i=e.parent,a=this.w,s=i.node.classList.contains("apexcharts-gridlines-horizontal"),l=a.config.grid.strokeDashArray,c=a.globals.barPadForNumericAxis,u=new x(this).drawLine(t-(s?c:0),n,r+(s?c:0),o,a.config.grid.borderColor,l);u.node.classList.add("apexcharts-gridline"),i.add(u)}},{key:"_drawGridBandRect",value:function(e){var t=e.c,n=e.x1,r=e.y1,o=e.x2,i=e.y2,a=e.type,s=this.w,l=new x(this.ctx),c=s.globals.barPadForNumericAxis;if("column"!==a||"datetime"!==s.config.xaxis.type){var u=s.config.grid[a].colors[t],p=l.drawRect(n-("row"===a?c:0),r,o+("row"===a?2*c:0),i,0,u,s.config.grid[a].opacity);this.elg.add(p),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),p.node.classList.add("apexcharts-grid-".concat(a))}}},{key:"_drawXYLines",value:function(e){var t=this,n=e.xCount,r=e.tickAmount,o=this.w;if(o.config.grid.xaxis.lines.show||o.config.xaxis.axisTicks.show){var i,a=o.globals.padHorizontal,s=o.globals.gridHeight;o.globals.timescaleLabels.length?function(e){for(var r=e.xC,o=e.x1,i=e.y1,a=e.x2,s=e.y2,l=0;l<r;l++)o=t.xaxisLabels[l].position,a=t.xaxisLabels[l].position,t._drawGridLines({i:l,x1:o,y1:i,x2:a,y2:s,xCount:n,parent:t.elgridLinesV})}({xC:n,x1:a,y1:0,x2:i,y2:s}):(o.globals.isXNumeric&&(n=o.globals.xAxisScale.result.length),o.config.xaxis.convertedCatToNumeric&&(n=o.globals.xaxisLabelsCount),function(e){var r=e.xC,i=e.x1,a=e.y1,s=e.x2,l=e.y2;if(void 0!==o.config.xaxis.tickAmount&&"dataPoints"!==o.config.xaxis.tickAmount)o.globals.dom.baseEl.querySelectorAll(".apexcharts-text.apexcharts-xaxis-label tspan:not(:empty)").forEach((function(e,r){var o=e.getBBox();t._drawGridLines({i:r,x1:o.x+o.width/2,y1:a,x2:o.x+o.width/2,y2:l,xCount:n,parent:t.elgridLinesV})}));else for(var c=0;c<r+(o.globals.isXNumeric?0:1);c++)0===c&&1===r&&1===o.globals.dataPoints&&(s=i=o.globals.gridWidth/2),t._drawGridLines({i:c,x1:i,y1:a,x2:s,y2:l,xCount:n,parent:t.elgridLinesV}),s=i+=o.globals.gridWidth/(o.globals.isXNumeric?r-1:r)}({xC:n,x1:a,y1:0,x2:i,y2:s}))}if(o.config.grid.yaxis.lines.show){var l=0,c=0,u=o.globals.gridWidth,p=r+1;this.isRangeBar&&(p=o.globals.labels.length);for(var d=0;d<p+(this.isRangeBar?1:0);d++)this._drawGridLine({x1:0,y1:l,x2:u,y2:c,parent:this.elgridLinesH}),c=l+=o.globals.gridHeight/(this.isRangeBar?p:r)}}},{key:"_drawInvertedXYLines",value:function(e){var t=e.xCount,n=this.w;if(n.config.grid.xaxis.lines.show||n.config.xaxis.axisTicks.show)for(var r,o=n.globals.padHorizontal,i=n.globals.gridHeight,a=0;a<t+1;a++)n.config.grid.xaxis.lines.show&&this._drawGridLine({x1:o,y1:0,x2:r,y2:i,parent:this.elgridLinesV}),new K(this.ctx).drawXaxisTicks(o,0,this.elg),r=o=o+n.globals.gridWidth/t+.3;if(n.config.grid.yaxis.lines.show)for(var s=0,l=0,c=n.globals.gridWidth,u=0;u<n.globals.dataPoints+1;u++)this._drawGridLine({x1:0,y1:s,x2:c,y2:l,parent:this.elgridLinesH}),l=s+=n.globals.gridHeight/n.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,t=new x(this.ctx);this.elg=t.group({class:"apexcharts-grid"}),this.elgridLinesH=t.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=t.group({class:"apexcharts-gridlines-vertical"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide());for(var n,r=e.globals.yAxisScale.length?e.globals.yAxisScale[0].result.length-1:5,o=0;o<e.globals.series.length&&(void 0!==e.globals.yAxisScale[o]&&(r=e.globals.yAxisScale[o].result.length-1),!(r>2));o++);return!e.globals.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(r=e.globals.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(n=e.config.xaxis.tickAmount)),this._drawXYLines({xCount:n,tickAmount:r})):(n=r,r=e.globals.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:r})),this.drawGridBands(n,r),{el:this.elg,xAxisTickWidth:e.globals.gridWidth/n}}},{key:"drawGridBands",value:function(e,t){var n=this.w;if(void 0!==n.config.grid.row.colors&&n.config.grid.row.colors.length>0)for(var r=0,o=n.globals.gridHeight/t,i=n.globals.gridWidth,a=0,s=0;a<t;a++,s++)s>=n.config.grid.row.colors.length&&(s=0),this._drawGridBandRect({c:s,x1:0,y1:r,x2:i,y2:o,type:"row"}),r+=n.globals.gridHeight/t;if(void 0!==n.config.grid.column.colors&&n.config.grid.column.colors.length>0)for(var l=n.globals.isBarHorizontal||"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric?e:e-1,c=n.globals.padHorizontal,u=n.globals.padHorizontal+n.globals.gridWidth/l,p=n.globals.gridHeight,d=0,h=0;d<e;d++,h++)h>=n.config.grid.column.colors.length&&(h=0),this._drawGridBandRect({c:h,x1:c,y1:0,x2:u,y2:p,type:"column"}),c+=n.globals.gridWidth/l}}]),e}(),Q=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"niceScale",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=this.w,a=Math.abs(t-e);if("dataPoints"===(n=this._adjustTicksForSmallRange(n,r,a))&&(n=i.globals.dataPoints-1),e===Number.MIN_VALUE&&0===t||!b.isNumber(e)&&!b.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE){e=0,t=n;var s=this.linearScale(e,t,n);return s}e>t?(console.warn("axis.min cannot be greater than axis.max"),t=e+.1):e===t&&(e=0===e?0:e-.5,t=0===t?2:t+.5);var l=[];a<1&&o&&("candlestick"===i.config.chart.type||"candlestick"===i.config.series[r].type||"boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[r].type||i.globals.isRangeData)&&(t*=1.01);var c=n+1;c<2?c=2:c>2&&(c-=2);var u=a/c,p=Math.floor(b.log10(u)),d=Math.pow(10,p),h=Math.round(u/d);h<1&&(h=1);var f=h*d,g=f*Math.floor(e/f),v=f*Math.ceil(t/f),m=g;if(o&&a>2){for(;l.push(m),!((m+=f)>v););return{result:l,niceMin:l[0],niceMax:l[l.length-1]}}var y=e;(l=[]).push(y);for(var w=Math.abs(t-e)/n,C=0;C<=n;C++)y+=w,l.push(y);return l[l.length-2]>=t&&l.pop(),{result:l,niceMin:l[0],niceMax:l[l.length-1]}}},{key:"linearScale",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length>3?arguments[3]:void 0,o=Math.abs(t-e);"dataPoints"===(n=this._adjustTicksForSmallRange(n,r,o))&&(n=this.w.globals.dataPoints-1);var i=o/n;n===Number.MAX_VALUE&&(n=10,i=1);for(var a=[],s=e;n>=0;)a.push(s),s+=i,n-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScale",value:function(e,t,n){for(var r=[],o=Math.ceil(Math.log(t)/Math.log(n))+1,i=0;i<o;i++)r.push(Math.pow(n,i));return 0===e&&r.unshift(e),{result:r,niceMin:r[0],niceMax:r[r.length-1]}}},{key:"_adjustTicksForSmallRange",value:function(e,t,n){var r=e;if(void 0!==t&&this.w.config.yaxis[t].labels.formatter&&void 0===this.w.config.yaxis[t].tickAmount){var o=this.w.config.yaxis[t].labels.formatter(1);b.isNumber(Number(o))&&!b.isFloat(o)&&(r=Math.ceil(n))}return r<e?r:e}},{key:"setYScaleForIndex",value:function(e,t,n){var r=this.w.globals,o=this.w.config,i=r.isBarHorizontal?o.xaxis:o.yaxis[e];void 0===r.yAxisScale[e]&&(r.yAxisScale[e]=[]);var a=Math.abs(n-t);if(i.logarithmic&&a<=5&&(r.invalidLogScale=!0),i.logarithmic&&a>5)r.allSeriesCollapsed=!1,r.yAxisScale[e]=this.logarithmicScale(t,n,i.logBase);else if(n!==-Number.MAX_VALUE&&b.isNumber(n))if(r.allSeriesCollapsed=!1,void 0===i.min&&void 0===i.max||i.forceNiceScale){var s=void 0===o.yaxis[e].max&&void 0===o.yaxis[e].min||o.yaxis[e].forceNiceScale;r.yAxisScale[e]=this.niceScale(t,n,i.tickAmount?i.tickAmount:a<5&&a>1?a+1:5,e,s)}else r.yAxisScale[e]=this.linearScale(t,n,i.tickAmount,e);else r.yAxisScale[e]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(e,t){var n=this.w,r=n.globals,o=n.config.xaxis,i=Math.abs(t-e);return t!==-Number.MAX_VALUE&&b.isNumber(t)?r.xAxisScale=this.linearScale(e,t,o.tickAmount?o.tickAmount:i<5&&i>1?i+1:5,0):r.xAxisScale=this.linearScale(0,5,5),r.xAxisScale}},{key:"setMultipleYScales",value:function(){var e=this,t=this.w.globals,n=this.w.config,r=t.minYArr.concat([]),o=t.maxYArr.concat([]),i=[];n.yaxis.forEach((function(t,a){var s=a;n.series.forEach((function(e,n){e.name===t.seriesName&&(s=n,a!==n?i.push({index:n,similarIndex:a,alreadyExists:!0}):i.push({index:n}))}));var l=r[s],c=o[s];e.setYScaleForIndex(a,l,c)})),this.sameScaleInMultipleAxes(r,o,i)}},{key:"sameScaleInMultipleAxes",value:function(e,t,n){var r=this,o=this.w.config,i=this.w.globals,a=[];n.forEach((function(e){e.alreadyExists&&(void 0===a[e.index]&&(a[e.index]=[]),a[e.index].push(e.index),a[e.index].push(e.similarIndex))})),i.yAxisSameScaleIndices=a,a.forEach((function(e,t){a.forEach((function(n,r){var o,i;t!==r&&(o=e,i=n,o.filter((function(e){return-1!==i.indexOf(e)}))).length>0&&(a[t]=a[t].concat(a[r]))}))}));var s=a.map((function(e){return e.filter((function(t,n){return e.indexOf(t)===n}))})).map((function(e){return e.sort()}));a=a.filter((function(e){return!!e}));var l=s.slice(),c=l.map((function(e){return JSON.stringify(e)}));l=l.filter((function(e,t){return c.indexOf(JSON.stringify(e))===t}));var u=[],p=[];e.forEach((function(e,n){l.forEach((function(r,o){r.indexOf(n)>-1&&(void 0===u[o]&&(u[o]=[],p[o]=[]),u[o].push({key:n,value:e}),p[o].push({key:n,value:t[n]}))}))}));var d=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),h=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);u.forEach((function(e,t){e.forEach((function(e,n){d[t]=Math.min(e.value,d[t])}))})),p.forEach((function(e,t){e.forEach((function(e,n){h[t]=Math.max(e.value,h[t])}))})),e.forEach((function(e,t){p.forEach((function(e,n){var a=d[n],s=h[n];o.chart.stacked&&(s=0,e.forEach((function(e,t){e.value!==-Number.MAX_VALUE&&(s+=e.value),a!==Number.MIN_VALUE&&(a+=u[n][t].value)}))),e.forEach((function(n,l){e[l].key===t&&(void 0!==o.yaxis[t].min&&(a="function"==typeof o.yaxis[t].min?o.yaxis[t].min(i.minY):o.yaxis[t].min),void 0!==o.yaxis[t].max&&(s="function"==typeof o.yaxis[t].max?o.yaxis[t].max(i.maxY):o.yaxis[t].max),r.setYScaleForIndex(t,a,s))}))}))}))}},{key:"autoScaleY",value:function(e,t,n){e||(e=this);var r=e.w;if(r.globals.isMultipleYAxis||r.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),t;var o=r.globals.seriesX[0],i=r.config.chart.stacked;return t.forEach((function(e,a){for(var s=0,l=0;l<o.length;l++)if(o[l]>=n.xaxis.min){s=l;break}var c,u,p=r.globals.minYArr[a],d=r.globals.maxYArr[a],h=r.globals.stackedSeriesTotals;r.globals.series.forEach((function(a,l){var f=a[s];i?(f=h[s],c=u=f,h.forEach((function(e,t){o[t]<=n.xaxis.max&&o[t]>=n.xaxis.min&&(e>u&&null!==e&&(u=e),a[t]<c&&null!==a[t]&&(c=a[t]))}))):(c=u=f,a.forEach((function(e,t){if(o[t]<=n.xaxis.max&&o[t]>=n.xaxis.min){var i=e,a=e;r.globals.series.forEach((function(n,r){null!==e&&(i=Math.min(n[t],i),a=Math.max(n[t],a))})),a>u&&null!==a&&(u=a),i<c&&null!==i&&(c=i)}}))),void 0===c&&void 0===u&&(c=p,u=d),(u*=u<0?.9:1.1)<0&&u<d&&(u=d),(c*=c<0?1.1:.9)<0&&c>p&&(c=p),t.length>1?(t[l].min=void 0===e.min?c:e.min,t[l].max=void 0===e.max?u:e.max):(t[0].min=void 0===e.min?c:e.min,t[0].max=void 0===e.max?u:e.max)}))})),t}}]),e}(),Z=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.scales=new Q(t)}return c(e,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=this.w.config,i=this.w.globals,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===r&&(r=e+1);var l=i.series,c=l,u=l;"candlestick"===o.chart.type?(c=i.seriesCandleL,u=i.seriesCandleH):"boxPlot"===o.chart.type?(c=i.seriesCandleO,u=i.seriesCandleC):i.isRangeData&&(c=i.seriesRangeStart,u=i.seriesRangeEnd);for(var p=e;p<r;p++){i.dataPoints=Math.max(i.dataPoints,l[p].length),i.categoryLabels.length&&(i.dataPoints=i.categoryLabels.filter((function(e){return void 0!==e})).length);for(var d=0;d<i.series[p].length;d++){var h=l[p][d];null!==h&&b.isNumber(h)?(void 0!==u[p][d]&&(a=Math.max(a,u[p][d]),t=Math.min(t,u[p][d])),void 0!==c[p][d]&&(t=Math.min(t,c[p][d]),n=Math.max(n,c[p][d])),"candlestick"!==this.w.config.chart.type&&"boxPlot"!==this.w.config.chart.type||(void 0!==i.seriesCandleC[p][d]&&(a=Math.max(a,i.seriesCandleO[p][d]),a=Math.max(a,i.seriesCandleH[p][d]),a=Math.max(a,i.seriesCandleL[p][d]),a=Math.max(a,i.seriesCandleC[p][d]),"boxPlot"===this.w.config.chart.type&&(a=Math.max(a,i.seriesCandleM[p][d]))),!o.series[p].type||"candlestick"===o.series[p].type&&"boxPlot"===o.series[p].type||(a=Math.max(a,i.series[p][d]),t=Math.min(t,i.series[p][d])),n=a),i.seriesGoals[p]&&i.seriesGoals[p][d]&&Array.isArray(i.seriesGoals[p][d])&&i.seriesGoals[p][d].forEach((function(e){s!==Number.MIN_VALUE&&(s=Math.min(s,e.value),t=s),a=Math.max(a,e.value),n=a})),b.isFloat(h)&&(h=b.noExponents(h),i.yValueDecimal=Math.max(i.yValueDecimal,h.toString().split(".")[1].length)),s>c[p][d]&&c[p][d]<0&&(s=c[p][d])):i.hasNullValues=!0}}return"rangeBar"===o.chart.type&&i.seriesRangeStart.length&&i.isBarHorizontal&&(s=t),"bar"===o.chart.type&&(s<0&&a<0&&(a=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:a,lowestY:t,highestY:n}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var n=Number.MAX_VALUE;if(e.isMultipleYAxis)for(var r=0;r<e.series.length;r++){var o=this.getMinYMaxY(r,n,null,r+1);e.minYArr.push(o.minY),e.maxYArr.push(o.maxY),n=o.lowestY}var i=this.getMinYMaxY(0,n,null,e.series.length);if(e.minY=i.minY,e.maxY=i.maxY,n=i.lowestY,t.chart.stacked&&this._setStackedMinMax(),("line"===t.chart.type||"area"===t.chart.type||"candlestick"===t.chart.type||"boxPlot"===t.chart.type||"rangeBar"===t.chart.type&&!e.isBarHorizontal)&&e.minY===Number.MIN_VALUE&&n!==-Number.MAX_VALUE&&n!==e.maxY){var a=e.maxY-n;(n>=0&&n<=10||void 0!==t.yaxis[0].min||void 0!==t.yaxis[0].max)&&(a=0),e.minY=n-5*a/100,n>0&&e.minY<0&&(e.minY=0),e.maxY=e.maxY+5*a/100}return t.yaxis.forEach((function(t,n){void 0!==t.max&&("number"==typeof t.max?e.maxYArr[n]=t.max:"function"==typeof t.max&&(e.maxYArr[n]=t.max(e.isMultipleYAxis?e.maxYArr[n]:e.maxY)),e.maxY=e.maxYArr[n]),void 0!==t.min&&("number"==typeof t.min?e.minYArr[n]=t.min:"function"==typeof t.min&&(e.minYArr[n]=t.min(e.isMultipleYAxis?e.minYArr[n]===Number.MIN_VALUE?0:e.minYArr[n]:e.minY)),e.minY=e.minYArr[n])})),e.isBarHorizontal&&["min","max"].forEach((function(n){void 0!==t.xaxis[n]&&"number"==typeof t.xaxis[n]&&("min"===n?e.minY=t.xaxis[n]:e.maxY=t.xaxis[n])})),e.isMultipleYAxis?(this.scales.setMultipleYScales(),e.minY=n,e.yAxisScale.forEach((function(t,n){e.minYArr[n]=t.niceMin,e.maxYArr[n]=t.niceMax}))):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.yAxisScale[0].niceMin,e.maxYArr[0]=e.yAxisScale[0].niceMax),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,t=this.w.config,n="numeric"===t.xaxis.type||"datetime"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var t=0;t<e.series.length;t++)if(e.labels[t])for(var n=0;n<e.labels[t].length;n++)null!==e.labels[t][n]&&b.isNumber(e.labels[t][n])&&(e.maxX=Math.max(e.maxX,e.labels[t][n]),e.initialMaxX=Math.max(e.maxX,e.labels[t][n]),e.minX=Math.min(e.minX,e.labels[t][n]),e.initialMinX=Math.min(e.minX,e.labels[t][n]))}(),e.noLabelsProvided&&0===t.xaxis.categories.length&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var r;if(void 0===t.xaxis.tickAmount?(r=Math.round(e.svgWidth/150),"numeric"===t.xaxis.type&&e.dataPoints<30&&(r=e.dataPoints-1),r>e.dataPoints&&0!==e.dataPoints&&(r=e.dataPoints-1)):"dataPoints"===t.xaxis.tickAmount?(e.series.length>1&&(r=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric&&(r=e.maxX-e.minX-1)):r=t.xaxis.tickAmount,e.xTickAmount=r,void 0!==t.xaxis.max&&"number"==typeof t.xaxis.max&&(e.maxX=t.xaxis.max),void 0!==t.xaxis.min&&"number"==typeof t.xaxis.min&&(e.minX=t.xaxis.min),void 0!==t.xaxis.range&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var o=[],i=e.minX-1;i<e.maxX;i++)o.push(i+1);e.xAxisScale={result:o,niceMin:o[0],niceMax:o[o.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(1,r,r),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,r-1),e.seriesX=e.labels.slice());n&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ)for(var t=0;t<e.series.length;t++)if(void 0!==e.seriesZ[t])for(var n=0;n<e.seriesZ[t].length;n++)null!==e.seriesZ[t][n]&&b.isNumber(e.seriesZ[t][n])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[t][n]),e.minZ=Math.min(e.minZ,e.seriesZ[t][n]))}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){var n=new H(this.ctx);if("datetime"===t.xaxis.type){var r=n.getDate(e.minX);t.xaxis.labels.datetimeUTC?r.setUTCDate(r.getUTCDate()-2):r.setDate(r.getDate()-2),e.minX=new Date(r).getTime();var o=n.getDate(e.maxX);t.xaxis.labels.datetimeUTC?o.setUTCDate(o.getUTCDate()+2):o.setDate(o.getDate()+2),e.maxX=new Date(o).getTime()}else("numeric"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach((function(t,n){1===t.length&&t.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var r=t.slice();r.sort((function(e,t){return e-t})),r.forEach((function(t,n){if(n>0){var o=t-r[n-1];o>0&&(e.minXDiff=Math.min(o,e.minXDiff))}})),1!==e.dataPoints&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var e=this.w.globals,t=[],n=[];if(e.series.length)for(var r=0;r<e.series[e.maxValsInArrayIndex].length;r++)for(var o=0,i=0,a=0;a<e.series.length;a++)null!==e.series[a][r]&&b.isNumber(e.series[a][r])&&(e.series[a][r]>0?o=o+parseFloat(e.series[a][r])+1e-4:i+=parseFloat(e.series[a][r])),a===e.series.length-1&&(t.push(o),n.push(i));for(var s=0;s<t.length;s++)e.maxY=Math.max(e.maxY,t[s]),e.minY=Math.min(e.minY,n[s])}}]),e}(),J=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var n=this.w;this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.axisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===n.config.chart.type&&n.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===n.config.xaxis.position&&(this.xAxisoffX=n.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new X(t)}return c(e,[{key:"drawYaxis",value:function(e){var t=this,n=this.w,r=new x(this.ctx),o=n.config.yaxis[e].labels.style,i=o.fontSize,a=o.fontFamily,s=o.fontWeight,l=r.group({class:"apexcharts-yaxis",rel:e,transform:"translate("+n.globals.translateYAxisX[e]+", 0)"});if(this.axesUtils.isYAxisHidden(e))return l;var c=r.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var u=n.globals.yAxisScale[e].result.length-1,p=n.globals.gridHeight/u,d=n.globals.translateY,h=n.globals.yLabelFormatters[e],f=n.globals.yAxisScale[e].result.slice();f=this.axesUtils.checkForReversedLabels(e,f);var g="";if(n.config.yaxis[e].labels.show)for(var v=function(l){var v=f[l];v=h(v,l,n);var m=n.config.yaxis[e].labels.padding;n.config.yaxis[e].opposite&&0!==n.config.yaxis.length&&(m*=-1);var y=t.axesUtils.getYAxisForeColor(o.colors,e),b=r.drawText({x:m,y:d+u/10+n.config.yaxis[e].labels.offsetY+1,text:v,textAnchor:n.config.yaxis[e].opposite?"start":"end",fontSize:i,fontFamily:a,fontWeight:s,foreColor:Array.isArray(y)?y[l]:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+o.cssClass});l===u&&(g=b),c.add(b);var w=document.createElementNS(n.globals.SVGNS,"title");if(w.textContent=Array.isArray(v)?v.join(" "):v,b.node.appendChild(w),0!==n.config.yaxis[e].labels.rotate){var C=r.rotateAroundCenter(g.node),x=r.rotateAroundCenter(b.node);b.node.setAttribute("transform","rotate(".concat(n.config.yaxis[e].labels.rotate," ").concat(C.x," ").concat(x.y,")"))}d+=p},m=u;m>=0;m--)v(m);if(void 0!==n.config.yaxis[e].title.text){var y=r.group({class:"apexcharts-yaxis-title"}),b=0;n.config.yaxis[e].opposite&&(b=n.globals.translateYAxisX[e]);var w=r.drawText({x:b,y:n.globals.gridHeight/2+n.globals.translateY+n.config.yaxis[e].title.offsetY,text:n.config.yaxis[e].title.text,textAnchor:"end",foreColor:n.config.yaxis[e].title.style.color,fontSize:n.config.yaxis[e].title.style.fontSize,fontWeight:n.config.yaxis[e].title.style.fontWeight,fontFamily:n.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+n.config.yaxis[e].title.style.cssClass});y.add(w),l.add(y)}var C=n.config.yaxis[e].axisBorder,S=31+C.offsetX;if(n.config.yaxis[e].opposite&&(S=-31-C.offsetX),C.show){var E=r.drawLine(S,n.globals.translateY+C.offsetY-2,S,n.globals.gridHeight+n.globals.translateY+C.offsetY+2,C.color,0,C.width);l.add(E)}return n.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(S,u,C,n.config.yaxis[e].axisTicks,e,p,l),l}},{key:"drawYaxisInversed",value:function(e){var t=this.w,n=new x(this.ctx),r=n.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),o=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});r.add(o);var i=t.globals.yAxisScale[e].result.length-1,a=t.globals.gridWidth/i+.1,s=a+t.config.xaxis.labels.offsetX,l=t.globals.xLabelFormatter,c=t.globals.yAxisScale[e].result.slice(),u=t.globals.timescaleLabels;u.length>0&&(this.xaxisLabels=u.slice(),i=(c=u.slice()).length),c=this.axesUtils.checkForReversedLabels(e,c);var p=u.length;if(t.config.xaxis.labels.show)for(var d=p?0:i;p?d<p:d>=0;p?d++:d--){var h=c[d];h=l(h,d,t);var f=t.globals.gridWidth+t.globals.padHorizontal-(s-a+t.config.xaxis.labels.offsetX);if(u.length){var g=this.axesUtils.getLabel(c,u,f,d,this.drawnLabels,this.xaxisFontSize);f=g.x,h=g.text,this.drawnLabels.push(g.text),0===d&&t.globals.skipFirstTimelinelabel&&(h=""),d===c.length-1&&t.globals.skipLastTimelinelabel&&(h="")}var v=n.drawText({x:f,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-("top"===t.config.xaxis.position?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:h,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});o.add(v),v.tspan(h);var m=document.createElementNS(t.globals.SVGNS,"title");m.textContent=h,v.node.appendChild(m),s+=a}return this.inversedYAxisTitleText(r),this.inversedYAxisBorder(r),r}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,n=new x(this.ctx),r=t.config.xaxis.axisBorder;if(r.show){var o=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(o-=15);var i=n.drawLine(t.globals.padHorizontal+o+r.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,r.color,0,r.height);e.add(i)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,n=new x(this.ctx);if(void 0!==t.config.xaxis.title.text){var r=n.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),o=n.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});r.add(o),e.add(r)}}},{key:"yAxisTitleRotate",value:function(e,t){var n=this.w,r=new x(this.ctx),o={width:0,height:0},i={width:0,height:0},a=n.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));null!==a&&(o=a.getBoundingClientRect());var s=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(null!==s&&(i=s.getBoundingClientRect()),null!==s){var l=this.xPaddingForYAxisTitle(e,o,i,t);s.setAttribute("x",l.xPos-(t?10:0))}if(null!==s){var c=r.rotateAroundCenter(s);s.setAttribute("transform","rotate(".concat(t?-1*n.config.yaxis[e].title.rotate:n.config.yaxis[e].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,n,r){var o=this.w,i=0,a=0,s=10;return void 0===o.config.yaxis[e].title.text||e<0?{xPos:a,padd:0}:(r?(a=t.width+o.config.yaxis[e].title.offsetX+n.width/2+s/2,0===(i+=1)&&(a-=s/2)):(a=-1*t.width+o.config.yaxis[e].title.offsetX+s/2+n.width/2,o.globals.isBarHorizontal&&(s=25,a=-1*t.width-o.config.yaxis[e].title.offsetX-s)),{xPos:a,padd:s})}},{key:"setYAxisXPosition",value:function(e,t){var n=this.w,r=0,o=0,i=18,a=1;n.config.yaxis.length>1&&(this.multipleYs=!0),n.config.yaxis.map((function(s,l){var c=n.globals.ignoreYAxisIndexes.indexOf(l)>-1||!s.show||s.floating||0===e[l].width,u=e[l].width+t[l].width;s.opposite?n.globals.isBarHorizontal?(o=n.globals.gridWidth+n.globals.translateX-1,n.globals.translateYAxisX[l]=o-s.labels.offsetX):(o=n.globals.gridWidth+n.globals.translateX+a,c||(a=a+u+20),n.globals.translateYAxisX[l]=o-s.labels.offsetX+20):(r=n.globals.translateX-i,c||(i=i+u+20),n.globals.translateYAxisX[l]=r+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=b.listToArray(t)).forEach((function(t,n){var r=e.config.yaxis[n];if(r&&void 0!==r.labels.align){var o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(n,"'] .apexcharts-yaxis-texts-g")),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(n,"'] .apexcharts-yaxis-label"));i=b.listToArray(i);var a=o.getBoundingClientRect();"left"===r.labels.align?(i.forEach((function(e,t){e.setAttribute("text-anchor","start")})),r.opposite||o.setAttribute("transform","translate(-".concat(a.width,", 0)"))):"center"===r.labels.align?(i.forEach((function(e,t){e.setAttribute("text-anchor","middle")})),o.setAttribute("transform","translate(".concat(a.width/2*(r.opposite?1:-1),", 0)"))):"right"===r.labels.align&&(i.forEach((function(e,t){e.setAttribute("text-anchor","end")})),r.opposite&&o.setAttribute("transform","translate(".concat(a.width,", 0)")))}}))}}]),e}(),ee=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.documentEvent=b.bind(this.documentEvent,this)}return c(e,[{key:"addEventListener",value:function(e,t){var n=this.w;n.globals.events.hasOwnProperty(e)?n.globals.events[e].push(t):n.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var n=this.w;if(n.globals.events.hasOwnProperty(e)){var r=n.globals.events[e].indexOf(t);-1!==r&&n.globals.events[e].splice(r,1)}}},{key:"fireEvent",value:function(e,t){var n=this.w;if(n.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var r=n.globals.events[e],o=r.length,i=0;i<o;i++)r[i].apply(null,t)}}},{key:"setupEventHandlers",value:function(){var e=this,t=this.w,n=this.ctx,r=t.globals.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach((function(e){r.addEventListener(e,(function(e){var r=Object.assign({},t,{seriesIndex:t.globals.capturedSeriesIndex,dataPointIndex:t.globals.capturedDataPointIndex});"mousemove"===e.type||"touchmove"===e.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(e,n,r):"mouseleave"===e.type||"touchleave"===e.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(e,n,r):("mouseup"===e.type&&1===e.which||"touchend"===e.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(e,n,r),n.ctx.events.fireEvent("click",[e,n,r]))}),{capture:!1,passive:!0})})),this.ctx.eventList.forEach((function(n){t.globals.dom.baseEl.addEventListener(n,e.documentEvent,{passive:!0})})),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var t=this.w,n=e.target.className;if("click"===e.type){var r=t.globals.dom.baseEl.querySelector(".apexcharts-menu");r&&r.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==n&&r.classList.remove("apexcharts-menu-open")}t.globals.clientX="touchmove"===e.type?e.touches[0].clientX:e.clientX,t.globals.clientY="touchmove"===e.type?e.touches[0].clientY:e.clientY}}]),e}(),te=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"setCurrentLocaleValues",value:function(e){var t=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var n=t.filter((function(t){return t.name===e}))[0];if(!n)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var r=b.extend(A,n);this.w.globals.locale=r.options}}]),e}(),ne=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"drawAxis",value:function(e,t){var n,r,o=this.w.globals,i=this.w.config,a=new K(this.ctx),s=new J(this.ctx);o.axisCharts&&"radar"!==e&&(o.isBarHorizontal?(r=s.drawYaxisInversed(0),n=a.drawXaxisInversed(0),o.dom.elGraphical.add(n),o.dom.elGraphical.add(r)):(n=a.drawXaxis(),o.dom.elGraphical.add(n),i.yaxis.map((function(e,t){-1===o.ignoreYAxisIndexes.indexOf(t)&&(r=s.drawYaxis(t),o.dom.Paper.add(r))}))))}}]),e}(),re=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new x(this.ctx),n=new C(this.ctx),r=e.config.xaxis.crosshairs.fill.gradient,o=e.config.xaxis.crosshairs.dropShadow,i=e.config.xaxis.crosshairs.fill.type,a=r.colorFrom,s=r.colorTo,l=r.opacityFrom,c=r.opacityTo,u=r.stops,p=o.enabled,d=o.left,h=o.top,f=o.blur,g=o.color,v=o.opacity,m=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===i&&(m=t.drawGradient("vertical",a,s,l,c,null,u,null));var y=t.drawRect();1===e.config.xaxis.crosshairs.width&&(y=t.drawLine());var w=e.globals.gridHeight;(!b.isNumber(w)||w<0)&&(w=0);var S=e.config.xaxis.crosshairs.width;(!b.isNumber(S)||S<0)&&(S=0),y.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:w,width:S,height:w,fill:m,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),p&&(y=n.dropShadow(y,{left:d,top:h,blur:f,color:g,opacity:v})),e.globals.dom.elGraphical.add(y)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new x(this.ctx),n=e.config.yaxis[0].crosshairs,r=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var o=t.drawLine(-r,0,e.globals.gridWidth+r,0,n.stroke.color,n.stroke.dashArray,n.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(o)}var i=t.drawLine(-r,0,e.globals.gridWidth+r,0,n.stroke.color,0,0);i.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(i)}}]),e}(),oe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"checkResponsiveConfig",value:function(e){var t=this,n=this.w,r=n.config;if(0!==r.responsive.length){var o=r.responsive.slice();o.sort((function(e,t){return e.breakpoint>t.breakpoint?1:t.breakpoint>e.breakpoint?-1:0})).reverse();var i=new j({}),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=o[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>r){var s=S.extendArrayProps(i,n.globals.initialConfig,n);e=b.extend(s,e),e=b.extend(n.config,e),t.overrideResponsiveOptions(e)}else for(var l=0;l<o.length;l++)a<o[l].breakpoint&&(e=S.extendArrayProps(i,o[l].options,n),e=b.extend(n.config,e),t.overrideResponsiveOptions(e))};if(e){var s=S.extendArrayProps(i,e,n);s=b.extend(n.config,s),a(s=b.extend(s,e))}else a({})}}},{key:"overrideResponsiveOptions",value:function(e){var t=new j(e).init({responsiveOverride:!0});this.w.config=t}}]),e}(),ie=function(){function e(t){s(this,e),this.ctx=t,this.colors=[],this.w=t.w;var n=this.w;this.isColorFn=!1,this.isHeatmapDistributed="treemap"===n.config.chart.type&&n.config.plotOptions.treemap.distributed||"heatmap"===n.config.chart.type&&n.config.plotOptions.heatmap.distributed,this.isBarDistributed=n.config.plotOptions.bar.distributed&&("bar"===n.config.chart.type||"rangeBar"===n.config.chart.type)}return c(e,[{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this,t=this.w,n=new b;if(t.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(t.config.theme.mode)),void 0===t.config.colors?t.globals.colors=this.predefined():(t.globals.colors=t.config.colors,Array.isArray(t.config.colors)&&t.config.colors.length>0&&"function"==typeof t.config.colors[0]&&(t.globals.colors=t.config.series.map((function(n,r){var o=t.config.colors[r];return o||(o=t.config.colors[0]),"function"==typeof o?(e.isColorFn=!0,o({value:t.globals.axisCharts?t.globals.series[r][0]?t.globals.series[r][0]:0:t.globals.series[r],seriesIndex:r,dataPointIndex:r,w:t})):o})))),t.globals.seriesColors.map((function(e,n){e&&(t.globals.colors[n]=e)})),t.config.theme.monochrome.enabled){var r=[],o=t.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(o=t.globals.series[0].length*t.globals.series.length);for(var i=t.config.theme.monochrome.color,a=1/(o/t.config.theme.monochrome.shadeIntensity),s=t.config.theme.monochrome.shadeTo,l=0,c=0;c<o;c++){var u=void 0;"dark"===s?(u=n.shadeColor(-1*l,i),l+=a):(u=n.shadeColor(l,i),l+=a),r.push(u)}t.globals.colors=r.slice()}var p=t.globals.colors.slice();this.pushExtraColors(t.globals.colors),["fill","stroke"].forEach((function(n){void 0===t.config[n].colors?t.globals[n].colors=e.isColorFn?t.config.colors:p:t.globals[n].colors=t.config[n].colors.slice(),e.pushExtraColors(t.globals[n].colors)})),void 0===t.config.dataLabels.style.colors?t.globals.dataLabels.style.colors=p:t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50),void 0===t.config.plotOptions.radar.polygons.fill.colors?t.globals.radarPolygons.fill.colors=["dark"===t.config.theme.mode?"#424242":"none"]:t.globals.radarPolygons.fill.colors=t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20),void 0===t.config.markers.colors?t.globals.markers.colors=p:t.globals.markers.colors=t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.w,o=t||r.globals.series.length;if(null===n&&(n=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===r.config.chart.type&&r.config.plotOptions.heatmap.colorScale.inverse),n&&r.globals.series.length&&(o=r.globals.series[r.globals.maxValsInArrayIndex].length*r.globals.series.length),e.length<o)for(var i=o-e.length,a=0;a<i;a++)e.push(e[a])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var t=e.theme.mode||"light",n=e.theme.palette?e.theme.palette:"dark"===t?"palette4":"palette1",r=e.chart.foreColor?e.chart.foreColor:"dark"===t?"#f6f7f8":"#373d3f";return e.tooltip.theme=t,e.chart.foreColor=r,e.theme.palette=n,e}},{key:"predefined",value:function(){switch(this.w.config.theme.palette){case"palette1":default:this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"];break;case"palette2":this.colors=["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"];break;case"palette3":this.colors=["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"];break;case"palette4":this.colors=["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"];break;case"palette5":this.colors=["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"];break;case"palette6":this.colors=["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"];break;case"palette7":this.colors=["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"];break;case"palette8":this.colors=["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"];break;case"palette9":this.colors=["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"];break;case"palette10":this.colors=["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"]}return this.colors}}]),e}(),ae=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var t=this.w,n="title"===e?t.config.title:t.config.subtitle,r=t.globals.svgWidth/2,o=n.offsetY,i="middle";if("left"===n.align?(r=10,i="start"):"right"===n.align&&(r=t.globals.svgWidth-10,i="end"),r+=n.offsetX,o=o+parseInt(n.style.fontSize,10)+n.margin/2,void 0!==n.text){var a=new x(this.ctx).drawText({x:r,y:o,text:n.text,textAnchor:i,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,fontWeight:n.style.fontWeight,foreColor:n.style.color,opacity:1});a.node.setAttribute("class","apexcharts-".concat(e,"-text")),t.globals.dom.Paper.add(a)}}}]),e}(),se=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return c(e,[{key:"getTitleSubtitleCoords",value:function(e){var t=this.w,n=0,r=0,o="title"===e?t.config.title.floating:t.config.subtitle.floating,i=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(null!==i&&!o){var a=i.getBoundingClientRect();n=a.width,r=t.globals.axisCharts?a.height+5:a.height}return{width:n,height:r}}},{key:"getLegendsRect",value:function(){var e=this.w,t=e.globals.dom.baseEl.querySelector(".apexcharts-legend");e.config.legend.height||"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||(t.style.maxHeight=e.globals.svgHeight/2+"px");var n=Object.assign({},b.getBoundingClientRect(t));return null!==t&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:n.x,y:n.y,height:n.height,width:0===n.height?0:n.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==e.config.legend.position&&"right"!==e.config.legend.position||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(e,t){var n=e;if(this.w.globals.isMultiLineX){var r=t.map((function(e,t){return Array.isArray(e)?e.length:1})),o=Math.max.apply(Math,v(r));n=t[r.indexOf(o)]}return n}}]),e}(),le=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return c(e,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,n=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===n.length&&(n=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var r=this.getxAxisTimeScaleLabelsCoords();e={width:r.width,height:r.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;var o=t.globals.xLabelFormatter,i=b.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,n);t.globals.isBarHorizontal&&(a=i=t.globals.yAxisScale[0].result.reduce((function(e,t){return e.length>t.length?e:t}),0));var s=new Y(this.dCtx.ctx),l=i;i=s.xLabelFormat(o,i,l,{i:void 0,dateFormatter:new H(this.dCtx.ctx).formatDate,w:t}),a=s.xLabelFormat(o,a,l,{i:void 0,dateFormatter:new H(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===i||""===String(i).trim())&&(a=i="1");var c=new x(this.dCtx.ctx),u=c.getTextRects(i,t.config.xaxis.labels.style.fontSize),p=u;if(i!==a&&(p=c.getTextRects(a,t.config.xaxis.labels.style.fontSize)),(e={width:u.width>=p.width?u.width:p.width,height:u.height>=p.height?u.height:p.height}).width*n.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.globals.rotateXLabels=!0;var d=function(e){return c.getTextRects(e,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};u=d(i),i!==a&&(p=d(a)),e.height=(u.height>p.height?u.height:p.height)/1.5,e.width=u.width>p.width?u.width:p.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,t=this.w;if(!t.globals.hasGroups)return{width:0,height:0};var n,r=(null===(e=t.config.xaxis.group.style)||void 0===e?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,o=t.globals.groups.map((function(e){return e.title})),i=b.getLargestStringFromArr(o),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,o),s=new x(this.dCtx.ctx),l=s.getTextRects(i,r),c=l;return i!==a&&(c=s.getTextRects(a,r)),n={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},t.config.xaxis.labels.show||(n={width:0,height:0}),{width:n.width,height:n.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,n=0;if(void 0!==e.config.xaxis.title.text){var r=new x(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=r.width,n=r.height}return{width:t,height:n}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var n=this.dCtx.timescaleLabels.map((function(e){return e.value})),r=n.reduce((function(e,t){return void 0===e?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):e.length>t.length?e:t}),0);return 1.05*(e=new x(this.dCtx.ctx).getTextRects(r,t.config.xaxis.labels.style.fontSize)).width*n.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,n=this.w,r=n.globals,o=n.config,i=o.xaxis.type,a=e.width;r.skipLastTimelinelabel=!1,r.skipFirstTimelinelabel=!1;var s=n.config.yaxis[0].opposite&&n.globals.isBarHorizontal,l=function(e,s){(function(e){return-1!==r.collapsedSeriesIndices.indexOf(e)})(s)||function(e){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var s=t.dCtx.timescaleLabels[0],l=t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+a/1.75-t.dCtx.yAxisWidthRight,c=s.position-a/1.75+t.dCtx.yAxisWidthLeft,u="right"===n.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0;l>r.svgWidth-r.translateX-u&&(r.skipLastTimelinelabel=!0),c<-(e.show&&!e.floating||"bar"!==o.chart.type&&"candlestick"!==o.chart.type&&"rangeBar"!==o.chart.type&&"boxPlot"!==o.chart.type?10:a/1.75)&&(r.skipFirstTimelinelabel=!0)}else"datetime"===i?t.dCtx.gridPad.right<a&&!r.rotateXLabels&&(r.skipLastTimelinelabel=!0):"datetime"!==i&&t.dCtx.gridPad.right<a/2-t.dCtx.yAxisWidthRight&&!r.rotateXLabels&&!n.config.xaxis.labels.trim&&("between"!==n.config.xaxis.tickPlacement||n.globals.isBarHorizontal)&&(t.dCtx.xPadRight=a/2+1)}(e)};o.yaxis.forEach((function(e,n){s?(t.dCtx.gridPad.left<a&&(t.dCtx.xPadLeft=a/2+1),t.dCtx.xPadRight=a/2+1):l(e,n)}))}}]),e}(),ce=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return c(e,[{key:"getyAxisLabelsCoords",value:function(){var e=this,t=this.w,n=[],r=10,o=new X(this.dCtx.ctx);return t.config.yaxis.map((function(i,a){var s=t.globals.yAxisScale[a],l=0;if(!o.isYAxisHidden(a)&&i.labels.show&&void 0!==i.labels.minWidth&&(l=i.labels.minWidth),!o.isYAxisHidden(a)&&i.labels.show&&s.result.length){var c=t.globals.yLabelFormatters[a],u=s.niceMin===Number.MIN_VALUE?0:s.niceMin,p=String(u).length>String(s.niceMax).length?u:s.niceMax,d=c(p,{seriesIndex:a,dataPointIndex:-1,w:t}),h=d;if(void 0!==d&&0!==d.length||(d=p),t.globals.isBarHorizontal){r=0;var f=t.globals.labels.slice();d=c(d=b.getLargestStringFromArr(f),{seriesIndex:a,dataPointIndex:-1,w:t}),h=e.dCtx.dimHelpers.getLargestStringFromMultiArr(d,f)}var g=new x(e.dCtx.ctx),v="rotate(".concat(i.labels.rotate," 0 0)"),m=g.getTextRects(d,i.labels.style.fontSize,i.labels.style.fontFamily,v,!1),y=m;d!==h&&(y=g.getTextRects(h,i.labels.style.fontSize,i.labels.style.fontFamily,v,!1)),n.push({width:(l>y.width||l>m.width?l:y.width>m.width?y.width:m.width)+r,height:y.height>m.height?y.height:m.height})}else n.push({width:0,height:0})})),n}},{key:"getyAxisTitleCoords",value:function(){var e=this,t=this.w,n=[];return t.config.yaxis.map((function(t,r){if(t.show&&void 0!==t.title.text){var o=new x(e.dCtx.ctx),i="rotate(".concat(t.title.rotate," 0 0)"),a=o.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,i,!1);n.push({width:a.width,height:a.height})}else n.push({width:0,height:0})})),n}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,n=0,r=0,o=e.globals.yAxisScale.length>1?10:0,i=new X(this.dCtx.ctx),a=function(a,s){var l=e.config.yaxis[s].floating,c=0;a.width>0&&!l?(c=a.width+o,function(t){return e.globals.ignoreYAxisIndexes.indexOf(t)>-1}(s)&&(c=c-a.width-o)):c=l||i.isYAxisHidden(s)?0:5,e.config.yaxis[s].opposite?r+=c:n+=c,t+=c};return e.globals.yLabelsCoords.map((function(e,t){a(e,t)})),e.globals.yTitleCoords.map((function(e,t){a(e,t)})),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=n,this.dCtx.yAxisWidthRight=r,t}}]),e}(),ue=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return c(e,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w;if(t.globals.noData||t.globals.allSeriesCollapsed)return 0;var n=function(e){return"bar"===e||"rangeBar"===e||"candlestick"===e||"boxPlot"===e},r=t.config.chart.type,o=0,i=n(r)?t.config.series.length:1;if(t.globals.comboBarCount>0&&(i=t.globals.comboBarCount),t.globals.collapsedSeries.forEach((function(e){n(e.type)&&(i-=1)})),t.config.chart.stacked&&(i=1),(n(r)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&i>0){var a,s,l=Math.abs(t.globals.initialMaxX-t.globals.initialMinX);l<=3&&(l=t.globals.dataPoints),a=l/e,t.globals.minXDiff&&t.globals.minXDiff/a>0&&(s=t.globals.minXDiff/a),s>e/2&&(s/=2),(o=s/i*parseInt(t.config.plotOptions.bar.columnWidth,10)/100)<1&&(o=1),o=o/(i>1?1:1.5)+5,t.globals.barPadForNumericAxis=o}return o}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,n=t.globals,r=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach((function(n){void 0!==t.config[n].text?r+=t.config[n].margin:r+=e.dCtx.isSparkline||!t.globals.axisCharts?0:5})),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||t.globals.axisCharts||(r+=10);var o=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),i=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");n.gridHeight=n.gridHeight-o.height-i.height-r,n.translateY=n.translateY+o.height+i.height+r}},{key:"setGridXPosForDualYAxis",value:function(e,t){var n=this.w,r=new X(this.dCtx.ctx);n.config.yaxis.map((function(o,i){-1!==n.globals.ignoreYAxisIndexes.indexOf(i)||o.floating||r.isYAxisHidden(i)||(o.opposite&&(n.globals.translateX=n.globals.translateX-(t[i].width+e[i].width)-parseInt(n.config.yaxis[i].labels.style.fontSize,10)/1.2-12),n.globals.translateX<2&&(n.globals.translateX=2))}))}}]),e}(),pe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new se(this),this.dimYAxis=new ce(this),this.dimXAxis=new le(this),this.dimGrid=new ue(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return c(e,[{key:"plotCoords",value:function(){var e=this,t=this.w,n=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&(t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),r=n[0],o=n[1];e.gridPad[r]=Math.max(o,e.w.globals.markers.largestSize/1.5)})),n.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),n.gridHeight=n.gridHeight-this.gridPad.top-this.gridPad.bottom,n.gridWidth=n.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var r=this.dimGrid.gridPadForColumnsInNumericAxis(n.gridWidth);n.gridWidth=n.gridWidth-2*r,n.translateX=n.translateX+this.gridPad.left+this.xPadLeft+(r>0?r+4:0),n.translateY=n.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,n=t.globals,r=this.dimYAxis.getyAxisLabelsCoords(),o=this.dimYAxis.getyAxisTitleCoords();t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map((function(e,n){t.globals.yLabelsCoords.push({width:r[n].width,index:n}),t.globals.yTitleCoords.push({width:o[n].width,index:n})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var i=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(i,s,a),n.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,n.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(n.rotateXLabels=!1,n.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),n.translateXAxisY=n.translateXAxisY+t.config.xaxis.labels.offsetY,n.translateXAxisX=n.translateXAxisX+t.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;n.xAxisLabelsHeight=this.xAxisHeight-s.height,n.xAxisGroupLabelsHeight=n.xAxisLabelsHeight-i.height,n.xAxisLabelsWidth=this.xAxisWidth,n.xAxisHeight=this.xAxisHeight;var u=10;("radar"===t.config.chart.type||this.isSparkline)&&(l=0,c=n.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(l=0,c=0,u=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(i);var p=function(){n.translateX=l,n.gridHeight=n.svgHeight-e.lgRect.height-c-(e.isSparkline||"treemap"===t.config.chart.type?0:t.globals.rotateXLabels?10:15),n.gridWidth=n.svgWidth-l};switch("top"===t.config.xaxis.position&&(u=n.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":n.translateY=u,p();break;case"top":n.translateY=this.lgRect.height+u,p();break;case"left":n.translateY=u,n.translateX=this.lgRect.width+l,n.gridHeight=n.svgHeight-c-12,n.gridWidth=n.svgWidth-this.lgRect.width-l;break;case"right":n.translateY=u,n.translateX=l,n.gridHeight=n.svgHeight-c-12,n.gridWidth=n.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(o,r),new J(this.ctx).setYAxisXPosition(r,o)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,n=e.config,r=0;e.config.legend.show&&!e.config.legend.floating&&(r=20);var o="pie"===n.chart.type||"polarArea"===n.chart.type||"donut"===n.chart.type?"pie":"radialBar",i=n.plotOptions[o].offsetY,a=n.plotOptions[o].offsetX;if(!n.legend.show||n.legend.floating)return t.gridHeight=t.svgHeight-n.grid.padding.left+n.grid.padding.right,t.gridWidth=t.gridHeight,t.translateY=i,void(t.translateX=a+(t.svgWidth-t.gridWidth)/2);switch(n.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=i-10,t.translateX=a+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+i+10,t.translateX=a+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-r,t.gridHeight="auto"!==n.chart.height?t.svgHeight:t.gridWidth,t.translateY=i,t.translateX=a+this.lgRect.width+r;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-r-5,t.gridHeight="auto"!==n.chart.height?t.svgHeight:t.gridWidth,t.translateY=i,t.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,n){var r=this.w,o=r.globals.hasGroups?2:1,i=n.height+e.height+t.height,a=r.globals.isMultiLineX?1.2:r.globals.LINE_HEIGHT_RATIO,s=r.globals.rotateXLabels?22:10,l=r.globals.rotateXLabels&&"bottom"===r.config.legend.position?10:0;this.xAxisHeight=i*a+o*s+l,this.xAxisWidth=e.width,this.xAxisHeight-t.height>r.config.xaxis.labels.maxHeight&&(this.xAxisHeight=r.config.xaxis.labels.maxHeight),r.config.xaxis.labels.minHeight&&this.xAxisHeight<r.config.xaxis.labels.minHeight&&(this.xAxisHeight=r.config.xaxis.labels.minHeight),r.config.xaxis.floating&&(this.xAxisHeight=0);var c=0,u=0;r.config.yaxis.forEach((function(e){c+=e.labels.minWidth,u+=e.labels.maxWidth})),this.yAxisWidth<c&&(this.yAxisWidth=c),this.yAxisWidth>u&&(this.yAxisWidth=u)}}]),e}(),de=function(){function e(t){s(this,e),this.w=t.w,this.lgCtx=t}return c(e,[{key:"getLegendStyles",value:function(){var e=document.createElement("style");e.setAttribute("type","text/css");var t=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return e.appendChild(t),e}},{key:"getLegendBBox",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),t=e.width;return{clwh:e.height,clww:t}}},{key:"appendToForeignObject",value:function(){var e=this.w.globals;e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject");var t=e.dom.elLegendForeign;t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("width",e.svgWidth),t.setAttribute("height",e.svgHeight),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.appendChild(e.dom.elLegendWrap),t.appendChild(this.getLegendStyles()),e.dom.Paper.node.insertBefore(t,e.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(e,t){var n=this,r=this.w;if(r.globals.axisCharts||"radialBar"===r.config.chart.type){r.globals.resized=!0;var o=null,i=null;r.globals.risingSeries=[],r.globals.axisCharts?(o=r.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),i=parseInt(o.getAttribute("data:realIndex"),10)):(o=r.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),i=parseInt(o.getAttribute("rel"),10)-1),t?[{cs:r.globals.collapsedSeries,csi:r.globals.collapsedSeriesIndices},{cs:r.globals.ancillaryCollapsedSeries,csi:r.globals.ancillaryCollapsedSeriesIndices}].forEach((function(e){n.riseCollapsedSeries(e.cs,e.csi,i)})):this.hideSeries({seriesEl:o,realIndex:i})}else{var a=r.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),s=r.config.chart.type;if("pie"===s||"polarArea"===s||"donut"===s){var l=r.config.plotOptions.pie.donut.labels;new x(this.lgCtx.ctx).pathMouseDown(a.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(a.members[0].node,l)}a.fire("click")}}},{key:"hideSeries",value:function(e){var t=e.seriesEl,n=e.realIndex,r=this.w,o=b.clone(r.config.series);if(r.globals.axisCharts){var i=!1;if(r.config.yaxis[n]&&r.config.yaxis[n].show&&r.config.yaxis[n].showAlways&&(i=!0,r.globals.ancillaryCollapsedSeriesIndices.indexOf(n)<0&&(r.globals.ancillaryCollapsedSeries.push({index:n,data:o[n].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.globals.ancillaryCollapsedSeriesIndices.push(n))),!i){r.globals.collapsedSeries.push({index:n,data:o[n].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.globals.collapsedSeriesIndices.push(n);var a=r.globals.risingSeries.indexOf(n);r.globals.risingSeries.splice(a,1)}}else r.globals.collapsedSeries.push({index:n,data:o[n]}),r.globals.collapsedSeriesIndices.push(n);for(var s=t.childNodes,l=0;l<s.length;l++)s[l].classList.contains("apexcharts-series-markers-wrap")&&(s[l].classList.contains("apexcharts-hide")?s[l].classList.remove("apexcharts-hide"):s[l].classList.add("apexcharts-hide"));r.globals.allSeriesCollapsed=r.globals.collapsedSeries.length===r.config.series.length,o=this._getSeriesBasedOnCollapsedState(o),this.lgCtx.ctx.updateHelpers._updateSeries(o,r.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,t,n){var r=this.w,o=b.clone(r.config.series);if(e.length>0){for(var i=0;i<e.length;i++)e[i].index===n&&(r.globals.axisCharts?(o[n].data=e[i].data.slice(),e.splice(i,1),t.splice(i,1),r.globals.risingSeries.push(n)):(o[n]=e[i].data,e.splice(i,1),t.splice(i,1),r.globals.risingSeries.push(n)));o=this._getSeriesBasedOnCollapsedState(o),this.lgCtx.ctx.updateHelpers._updateSeries(o,r.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var t=this.w;return t.globals.axisCharts?e.forEach((function(n,r){t.globals.collapsedSeriesIndices.indexOf(r)>-1&&(e[r].data=[])})):e.forEach((function(n,r){t.globals.collapsedSeriesIndices.indexOf(r)>-1&&(e[r]=0)})),e}}]),e}(),he=function(){function e(t,n){s(this,e),this.ctx=t,this.w=t.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new de(this)}return c(e,[{key:"init",value:function(){var e=this.w,t=e.globals,n=e.config;if((n.legend.showForSingleSeries&&1===t.series.length||this.isBarsDistributed||t.series.length>1||!t.axisCharts)&&n.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),b.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===n.legend.position||"top"===n.legend.position?this.legendAlignHorizontal():"right"!==n.legend.position&&"left"!==n.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var e=this,t=this.w,n=t.config.legend.fontFamily,r=t.globals.seriesNames,o=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var i=t.config.plotOptions.heatmap.colorScale.ranges;r=i.map((function(e){return e.name?e.name:e.from+" - "+e.to})),o=i.map((function(e){return e.color}))}else this.isBarsDistributed&&(r=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(r=t.config.legend.customLegendItems);for(var a=t.globals.legendFormatter,s=t.config.legend.inverseOrder,l=s?r.length-1:0;s?l>=0:l<=r.length-1;s?l--:l++){var c=a(r[l],{seriesIndex:l,w:t}),u=!1,p=!1;if(t.globals.collapsedSeries.length>0)for(var d=0;d<t.globals.collapsedSeries.length;d++)t.globals.collapsedSeries[d].index===l&&(u=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(var h=0;h<t.globals.ancillaryCollapsedSeriesIndices.length;h++)t.globals.ancillaryCollapsedSeriesIndices[h]===l&&(p=!0);var f=document.createElement("span");f.classList.add("apexcharts-legend-marker");var g=t.config.legend.markers.offsetX,v=t.config.legend.markers.offsetY,m=t.config.legend.markers.height,y=t.config.legend.markers.width,w=t.config.legend.markers.strokeWidth,C=t.config.legend.markers.strokeColor,E=t.config.legend.markers.radius,_=f.style;_.background=o[l],_.color=o[l],_.setProperty("background",o[l],"important"),t.config.legend.markers.fillColors&&t.config.legend.markers.fillColors[l]&&(_.background=t.config.legend.markers.fillColors[l]),void 0!==t.globals.seriesColors[l]&&(_.background=t.globals.seriesColors[l],_.color=t.globals.seriesColors[l]),_.height=Array.isArray(m)?parseFloat(m[l])+"px":parseFloat(m)+"px",_.width=Array.isArray(y)?parseFloat(y[l])+"px":parseFloat(y)+"px",_.left=(Array.isArray(g)?parseFloat(g[l]):parseFloat(g))+"px",_.top=(Array.isArray(v)?parseFloat(v[l]):parseFloat(v))+"px",_.borderWidth=Array.isArray(w)?w[l]:w,_.borderColor=Array.isArray(C)?C[l]:C,_.borderRadius=Array.isArray(E)?parseFloat(E[l])+"px":parseFloat(E)+"px",t.config.legend.markers.customHTML&&(Array.isArray(t.config.legend.markers.customHTML)?t.config.legend.markers.customHTML[l]&&(f.innerHTML=t.config.legend.markers.customHTML[l]()):f.innerHTML=t.config.legend.markers.customHTML()),x.setAttrs(f,{rel:l+1,"data:collapsed":u||p}),(u||p)&&f.classList.add("apexcharts-inactive-legend");var R=document.createElement("div"),O=document.createElement("span");O.classList.add("apexcharts-legend-text"),O.innerHTML=Array.isArray(c)?c.join(" "):c;var A=t.config.legend.labels.useSeriesColors?t.globals.colors[l]:t.config.legend.labels.colors;A||(A=t.config.chart.foreColor),O.style.color=A,O.style.fontSize=parseFloat(t.config.legend.fontSize)+"px",O.style.fontWeight=t.config.legend.fontWeight,O.style.fontFamily=n||t.config.chart.fontFamily,x.setAttrs(O,{rel:l+1,i:l,"data:default-text":encodeURIComponent(c),"data:collapsed":u||p}),R.appendChild(f),R.appendChild(O);var P=new S(this.ctx);t.config.legend.showForZeroSeries||0===P.getSeriesTotalByIndex(l)&&P.seriesHaveSameValues(l)&&!P.isSeriesNull(l)&&-1===t.globals.collapsedSeriesIndices.indexOf(l)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&R.classList.add("apexcharts-hidden-zero-series"),t.config.legend.showForNullSeries||P.isSeriesNull(l)&&-1===t.globals.collapsedSeriesIndices.indexOf(l)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&R.classList.add("apexcharts-hidden-null-series"),t.globals.dom.elLegendWrap.appendChild(R),t.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(t.config.legend.horizontalAlign)),t.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+t.config.legend.position),R.classList.add("apexcharts-legend-series"),R.style.margin="".concat(t.config.legend.itemMargin.vertical,"px ").concat(t.config.legend.itemMargin.horizontal,"px"),t.globals.dom.elLegendWrap.style.width=t.config.legend.width?t.config.legend.width+"px":"",t.globals.dom.elLegendWrap.style.height=t.config.legend.height?t.config.legend.height+"px":"",x.setAttrs(R,{rel:l+1,seriesName:b.escapeString(r[l]),"data:collapsed":u||p}),(u||p)&&R.classList.add("apexcharts-inactive-legend"),t.config.legend.onItemClick.toggleDataSeries||R.classList.add("apexcharts-no-click")}t.globals.dom.elWrap.addEventListener("click",e.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&0===t.config.legend.customLegendItems.length&&(t.globals.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),t.globals.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,t){var n=this.w,r=n.globals.dom.baseEl.querySelector(".apexcharts-legend"),o=r.getBoundingClientRect(),i=0,a=0;if("bottom"===n.config.legend.position)a+=n.globals.svgHeight-o.height/2;else if("top"===n.config.legend.position){var s=new pe(this.ctx),l=s.dimHelpers.getTitleSubtitleCoords("title").height,c=s.dimHelpers.getTitleSubtitleCoords("subtitle").height;a=a+(l>0?l-10:0)+(c>0?c-10:0)}r.style.position="absolute",i=i+e+n.config.legend.offsetX,a=a+t+n.config.legend.offsetY,r.style.left=i+"px",r.style.top=a+"px","bottom"===n.config.legend.position?(r.style.top="auto",r.style.bottom=5-n.config.legend.offsetY+"px"):"right"===n.config.legend.position&&(r.style.left="auto",r.style.right=25+n.config.legend.offsetX+"px"),["width","height"].forEach((function(e){r.style[e]&&(r.style[e]=parseInt(n.config.legend[e],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var t=this.legendHelpers.getLegendBBox(),n=new pe(this.ctx),r=n.dimHelpers.getTitleSubtitleCoords("title"),o=n.dimHelpers.getTitleSubtitleCoords("subtitle"),i=0;"bottom"===e.config.legend.position?i=-t.clwh/1.8:"top"===e.config.legend.position&&(i=r.height+o.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,i)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendBBox(),n=0;"left"===e.config.legend.position&&(n=20),"right"===e.config.legend.position&&(n=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(n,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,n=e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if("heatmap"===t.config.chart.type||this.isBarsDistributed){if(n){var r=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,r,this.w]),new L(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&n&&new L(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var n=parseInt(e.target.getAttribute("rel"),10)-1,r="true"===e.target.getAttribute("data:collapsed"),o=this.w.config.chart.events.legendClick;"function"==typeof o&&o(this.ctx,n,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,n,this.w]);var i=this.w.config.legend.markers.onClick;"function"==typeof i&&e.target.classList.contains("apexcharts-legend-marker")&&(i(this.ctx,n,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,n,this.w])),"treemap"!==t.config.chart.type&&"heatmap"!==t.config.chart.type&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(n,r)}}}]),e}(),fe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var n=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=n.globals.minX,this.maxX=n.globals.maxX}return c(e,[{key:"createToolbar",value:function(){var e=this,t=this.w,n=function(){return document.createElement("div")},r=n();if(r.setAttribute("class","apexcharts-toolbar"),r.style.top=t.config.chart.toolbar.offsetY+"px",r.style.right=3-t.config.chart.toolbar.offsetX+"px",t.globals.dom.elWrap.appendChild(r),this.elZoom=n(),this.elZoomIn=n(),this.elZoomOut=n(),this.elPan=n(),this.elSelection=n(),this.elZoomReset=n(),this.elMenuIcon=n(),this.elMenu=n(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var o=0;o<this.t.customIcons.length;o++)this.elCustomIcons.push(n());var i=[],a=function(n,r,o){var a=n.toLowerCase();e.t[a]&&t.config.chart.zoom.enabled&&i.push({el:r,icon:"string"==typeof e.t[a]?e.t[a]:o,title:e.localeValues[n],class:"apexcharts-".concat(a,"-icon")})};a("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n'),a("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n');var s=function(n){e.t[n]&&t.config.chart[n].enabled&&i.push({el:"zoom"===n?e.elZoom:e.elSelection,icon:"string"==typeof e.t[n]?e.t[n]:"zoom"===n?'<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>\n <path d="M0 0h24v24H0V0z" fill="none"/>\n <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>\n</svg>':'<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>\n</svg>',title:e.localeValues["zoom"===n?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(n,"-icon")})};s("zoom"),s("selection"),this.t.pan&&t.config.chart.zoom.enabled&&i.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <defs>\n <path d="M0 0h24v24H0z" id="a"/>\n </defs>\n <clipPath id="b">\n <use overflow="visible" xlink:href="#a"/>\n </clipPath>\n <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>\n</svg>',title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),a("reset",this.elZoomReset,'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n</svg>'),this.t.download&&i.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l<this.elCustomIcons.length;l++)i.push({el:this.elCustomIcons[l],icon:this.t.customIcons[l].icon,title:this.t.customIcons[l].title,index:this.t.customIcons[l].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[l].class});i.forEach((function(e,t){e.index&&b.moveIndexInArray(i,t,e.index)}));for(var c=0;c<i.length;c++)x.setAttrs(i[c].el,{class:i[c].class,title:i[c].title}),i[c].el.innerHTML=i[c].icon,r.appendChild(i[c].el);this._createHamburgerMenu(r),t.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):t.globals.panEnabled?this.elPan.classList.add(this.selectedClass):t.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),x.setAttrs(this.elMenu,{class:"apexcharts-menu"});var t=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];this.w.globals.allSeriesHasEqualX||t.splice(2,1);for(var n=0;n<t.length;n++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[n].innerHTML=t[n].title,x.setAttrs(this.elMenuItems[n],{class:"apexcharts-menu-item ".concat(t[n].name),title:t[n].title}),this.elMenu.appendChild(this.elMenuItems[n])}},{key:"addToolbarEventListeners",value:function(){var e=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach((function(t){t.classList.contains("exportSVG")?t.addEventListener("click",e.handleDownload.bind(e,"svg")):t.classList.contains("exportPNG")?t.addEventListener("click",e.handleDownload.bind(e,"png")):t.classList.contains("exportCSV")&&t.addEventListener("click",e.handleDownload.bind(e,"csv"))}));for(var t=0;t<this.t.customIcons.length;t++)this.elCustomIcons[t].addEventListener("click",this.t.customIcons[t].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach((function(t){t.ctx.toolbar.toggleOtherControls();var n="selection"===e?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,r="selection"===e?"selectionEnabled":"zoomEnabled";t.w.globals[r]=!t.w.globals[r],n.classList.contains(t.ctx.toolbar.selectedClass)?n.classList.remove(t.ctx.toolbar.selectedClass):n.classList.add(t.ctx.toolbar.selectedClass)}))}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),"pan"===e?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var t="pan"===e?this.elPan:this.elZoom,n="pan"===e?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),n&&n.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach((function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)}))}},{key:"toggleOtherControls",value:function(){var e=this,t=this.w;t.globals.panEnabled=!1,t.globals.zoomEnabled=!1,t.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach((function(t){t&&t.classList.remove(e.selectedClass)}))}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var t=(this.minX+this.maxX)/2,n=(this.minX+t)/2,r=(this.maxX+t)/2,o=this._getNewMinXMaxX(n,r);e.globals.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!("datetime"===e.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)){var t=(this.minX+this.maxX)/2,n=this.minX-(t-this.minX),r=this.maxX-(t-this.maxX),o=this._getNewMinXMaxX(n,r);e.globals.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,t){var n=this.w.config.xaxis.convertedCatToNumeric;return{minX:n?Math.floor(e):e,maxX:n?Math.floor(t):t}}},{key:"zoomUpdateOptions",value:function(e,t){var n=this.w;if(void 0!==e||void 0!==t){if(!(n.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=n.globals.dataPoints),t-e<2))){var r={min:e,max:t},o=this.getBeforeZoomRange(r);o&&(r=o.xaxis);var i={xaxis:r},a=b.clone(n.globals.initialConfig.yaxis);n.config.chart.zoom.autoScaleYaxis&&(a=new Q(this.ctx).autoScaleY(this.ctx,a,{xaxis:r})),n.config.chart.group||(i.yaxis=a),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(i,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(r,a)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,t){"function"==typeof this.ev.zoomed&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t})}},{key:"getBeforeZoomRange",value:function(e,t){var n=null;return"function"==typeof this.ev.beforeZoom&&(n=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),n}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout((function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")}),0)}},{key:"handleDownload",value:function(e){var t=this.w,n=new q(this.ctx);switch(e){case"svg":n.exportToSVG(this.ctx);break;case"png":n.exportToPng(this.ctx);break;case"csv":n.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach((function(e){var t=e.w;if(t.globals.lastXAxis.min=void 0,t.globals.lastXAxis.max=void 0,e.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof t.config.chart.events.beforeResetZoom){var n=t.config.chart.events.beforeResetZoom(e,t);n&&e.updateHelpers.revertDefaultAxisMinMax(n)}"function"==typeof t.config.chart.events.zoomed&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max}),t.globals.zoomed=!1;var r=e.ctx.series.emptyCollapsedSeries(b.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(r,t.config.chart.animations.dynamicAnimation.enabled)}))}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),e}(),ge=function(e){p(n,fe);var t=g(n);function n(e){var r;return s(this,n),(r=t.call(this,e)).ctx=e,r.w=e.w,r.dragged=!1,r.graphics=new x(r.ctx),r.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],r.clientX=0,r.clientY=0,r.startX=0,r.endX=0,r.dragX=0,r.startY=0,r.endY=0,r.dragY=0,r.moveDirection="none",r}return c(n,[{key:"init",value:function(e){var t=this,n=e.xyRatios,r=this.w,o=this;this.xyRatios=n,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=r.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),r.globals.dom.elGraphical.add(this.zoomRect),r.globals.dom.elGraphical.add(this.selectionRect),"x"===r.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:r.globals.gridWidth,maxY:r.globals.gridHeight}).on("dragmove",this.selectionDragging.bind(this,"dragging")):"y"===r.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:r.globals.gridWidth}).on("dragmove",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=r.globals.dom.baseEl.querySelector("".concat(r.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach((function(e){t.hoverArea.addEventListener(e,o.svgMouseEvents.bind(o,n),{capture:!1,passive:!0})}))}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(e,t){var n=this.w,r=this,o=this.ctx.toolbar,i=n.globals.zoomEnabled?n.config.chart.zoom.type:n.config.chart.selection.type,a=n.config.chart.toolbar.autoSelected;if(t.shiftKey?(this.shiftWasPressed=!0,o.enableZoomPanFromToolbar("pan"===a?"zoom":"pan")):this.shiftWasPressed&&(o.enableZoomPanFromToolbar(a),this.shiftWasPressed=!1),t.target){var s,l=t.target.classList;if(t.target.parentNode&&null!==t.target.parentNode&&(s=t.target.parentNode.classList),!(l.contains("apexcharts-selection-rect")||l.contains("apexcharts-legend-marker")||l.contains("apexcharts-legend-text")||s&&s.contains("apexcharts-toolbar"))){if(r.clientX="touchmove"===t.type||"touchstart"===t.type?t.touches[0].clientX:"touchend"===t.type?t.changedTouches[0].clientX:t.clientX,r.clientY="touchmove"===t.type||"touchstart"===t.type?t.touches[0].clientY:"touchend"===t.type?t.changedTouches[0].clientY:t.clientY,"mousedown"===t.type&&1===t.which){var c=r.gridRect.getBoundingClientRect();r.startX=r.clientX-c.left,r.startY=r.clientY-c.top,r.dragged=!1,r.w.globals.mousedown=!0}if(("mousemove"===t.type&&1===t.which||"touchmove"===t.type)&&(r.dragged=!0,n.globals.panEnabled?(n.globals.selection=null,r.w.globals.mousedown&&r.panDragging({context:r,zoomtype:i,xyRatios:e})):(r.w.globals.mousedown&&n.globals.zoomEnabled||r.w.globals.mousedown&&n.globals.selectionEnabled)&&(r.selection=r.selectionDrawing({context:r,zoomtype:i}))),"mouseup"===t.type||"touchend"===t.type||"mouseleave"===t.type){var u=r.gridRect.getBoundingClientRect();r.w.globals.mousedown&&(r.endX=r.clientX-u.left,r.endY=r.clientY-u.top,r.dragX=Math.abs(r.endX-r.startX),r.dragY=Math.abs(r.endY-r.startY),(n.globals.zoomEnabled||n.globals.selectionEnabled)&&r.selectionDrawn({context:r,zoomtype:i}),n.globals.panEnabled&&n.config.xaxis.convertedCatToNumeric&&r.delayedPanScrolled()),n.globals.zoomEnabled&&r.hideSelectionRect(this.selectionRect),r.dragged=!1,r.w.globals.mousedown=!1}this.makeSelectionRectDraggable()}}}},{key:"makeSelectionRectDraggable",value:function(){var e=this.w;if(this.selectionRect){var t=this.selectionRect.node.getBoundingClientRect();t.width>0&&t.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:e.globals.gridWidth,maxY:e.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var e=this.w,t=this.xyRatios;if(!e.globals.zoomEnabled)if(void 0!==e.globals.selection&&null!==e.globals.selection)this.drawSelectionRect(e.globals.selection);else if(void 0!==e.config.chart.selection.xaxis.min&&void 0!==e.config.chart.selection.xaxis.max){var n=(e.config.chart.selection.xaxis.min-e.globals.minX)/t.xRatio,r={x:n,y:0,width:e.globals.gridWidth-(e.globals.maxX-e.config.chart.selection.xaxis.max)/t.xRatio-n,height:e.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(r),this.makeSelectionRectDraggable(),"function"==typeof e.config.chart.events.selection&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=e.translateX,a=void 0===i?0:i,s=e.translateY,l=void 0===s?0:s,c=this.w,u=this.zoomRect,p=this.selectionRect;if(this.dragged||null!==c.globals.selection){var d={transform:"translate("+a+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),u.attr({x:t,y:n,width:r,height:o,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),x.setAttrs(u.node,d)),c.globals.selectionEnabled&&(p.attr({x:t,y:n,width:r>0?r:0,height:o>0?o:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),x.setAttrs(p.node,d))}}},{key:"hideSelectionRect",value:function(e){e&&e.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(e){var t,n=e.context,r=e.zoomtype,o=this.w,i=n,a=this.gridRect.getBoundingClientRect(),s=i.startX-1,l=i.startY,c=!1,u=!1,p=i.clientX-a.left-s,d=i.clientY-a.top-l;return Math.abs(p+s)>o.globals.gridWidth?p=o.globals.gridWidth-s:i.clientX-a.left<0&&(p=s),s>i.clientX-a.left&&(c=!0,p=Math.abs(p)),l>i.clientY-a.top&&(u=!0,d=Math.abs(d)),t="x"===r?{x:c?s-p:s,y:0,width:p,height:o.globals.gridHeight}:"y"===r?{x:0,y:u?l-d:l,width:o.globals.gridWidth,height:d}:{x:c?s-p:s,y:u?l-d:l,width:p,height:d},i.drawSelectionRect(t),i.selectionDragging("resizing"),t}},{key:"selectionDragging",value:function(e,t){var n=this,r=this.w,o=this.xyRatios,i=this.selectionRect,a=0;"resizing"===e&&(a=30);var s=function(e){return parseFloat(i.node.getAttribute(e))},l={x:s("x"),y:s("y"),width:s("width"),height:s("height")};r.globals.selection=l,"function"==typeof r.config.chart.events.selection&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var e=n.gridRect.getBoundingClientRect(),t=i.node.getBoundingClientRect(),a={xaxis:{min:r.globals.xAxisScale.niceMin+(t.left-e.left)*o.xRatio,max:r.globals.xAxisScale.niceMin+(t.right-e.left)*o.xRatio},yaxis:{min:r.globals.yAxisScale[0].niceMin+(e.bottom-t.bottom)*o.yRatio[0],max:r.globals.yAxisScale[0].niceMax-(t.top-e.top)*o.yRatio[0]}};r.config.chart.events.selection(n.ctx,a),r.config.chart.brush.enabled&&void 0!==r.config.chart.events.brushScrolled&&r.config.chart.events.brushScrolled(n.ctx,a)}),a))}},{key:"selectionDrawn",value:function(e){var t=e.context,n=e.zoomtype,r=this.w,o=t,i=this.xyRatios,a=this.ctx.toolbar;if(o.startX>o.endX){var s=o.startX;o.startX=o.endX,o.endX=s}if(o.startY>o.endY){var l=o.startY;o.startY=o.endY,o.endY=l}var c=void 0,u=void 0;r.globals.isRangeBar?(c=r.globals.yAxisScale[0].niceMin+o.startX*i.invertedYRatio,u=r.globals.yAxisScale[0].niceMin+o.endX*i.invertedYRatio):(c=r.globals.xAxisScale.niceMin+o.startX*i.xRatio,u=r.globals.xAxisScale.niceMin+o.endX*i.xRatio);var p=[],d=[];if(r.config.yaxis.forEach((function(e,t){p.push(r.globals.yAxisScale[t].niceMax-i.yRatio[t]*o.startY),d.push(r.globals.yAxisScale[t].niceMax-i.yRatio[t]*o.endY)})),o.dragged&&(o.dragX>10||o.dragY>10)&&c!==u)if(r.globals.zoomEnabled){var h=b.clone(r.globals.initialConfig.yaxis),f=b.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),u=Math.floor(u),c<1&&(c=1,u=r.globals.dataPoints),u-c<2&&(u=c+1)),"xy"!==n&&"x"!==n||(f={min:c,max:u}),"xy"!==n&&"y"!==n||h.forEach((function(e,t){h[t].min=d[t],h[t].max=p[t]})),r.config.chart.zoom.autoScaleYaxis){var g=new Q(o.ctx);h=g.autoScaleY(o.ctx,h,{xaxis:f})}if(a){var v=a.getBeforeZoomRange(f,h);v&&(f=v.xaxis?v.xaxis:f,h=v.yaxis?v.yaxis:h)}var m={xaxis:f};r.config.chart.group||(m.yaxis=h),o.ctx.updateHelpers._updateOptions(m,!1,o.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof r.config.chart.events.zoomed&&a.zoomCallback(f,h)}else if(r.globals.selectionEnabled){var y,w=null;y={min:c,max:u},"xy"!==n&&"y"!==n||(w=b.clone(r.config.yaxis)).forEach((function(e,t){w[t].min=d[t],w[t].max=p[t]})),r.globals.selection=o.selection,"function"==typeof r.config.chart.events.selection&&r.config.chart.events.selection(o.ctx,{xaxis:y,yaxis:w})}}},{key:"panDragging",value:function(e){var t=e.context,n=this.w,r=t;if(void 0!==n.globals.lastClientPosition.x){var o=n.globals.lastClientPosition.x-r.clientX,i=n.globals.lastClientPosition.y-r.clientY;Math.abs(o)>Math.abs(i)&&o>0?this.moveDirection="left":Math.abs(o)>Math.abs(i)&&o<0?this.moveDirection="right":Math.abs(i)>Math.abs(o)&&i>0?this.moveDirection="up":Math.abs(i)>Math.abs(o)&&i<0&&(this.moveDirection="down")}n.globals.lastClientPosition={x:r.clientX,y:r.clientY};var a=n.globals.isRangeBar?n.globals.minY:n.globals.minX,s=n.globals.isRangeBar?n.globals.maxY:n.globals.maxX;n.config.xaxis.convertedCatToNumeric||r.panScrolled(a,s)}},{key:"delayedPanScrolled",value:function(){var e=this.w,t=e.globals.minX,n=e.globals.maxX,r=(e.globals.maxX-e.globals.minX)/2;"left"===this.moveDirection?(t=e.globals.minX+r,n=e.globals.maxX+r):"right"===this.moveDirection&&(t=e.globals.minX-r,n=e.globals.maxX-r),t=Math.floor(t),n=Math.floor(n),this.updateScrolledChart({xaxis:{min:t,max:n}},t,n)}},{key:"panScrolled",value:function(e,t){var n=this.w,r=this.xyRatios,o=b.clone(n.globals.initialConfig.yaxis),i=r.xRatio,a=n.globals.minX,s=n.globals.maxX;n.globals.isRangeBar&&(i=r.invertedYRatio,a=n.globals.minY,s=n.globals.maxY),"left"===this.moveDirection?(e=a+n.globals.gridWidth/15*i,t=s+n.globals.gridWidth/15*i):"right"===this.moveDirection&&(e=a-n.globals.gridWidth/15*i,t=s-n.globals.gridWidth/15*i),n.globals.isRangeBar||(e<n.globals.initialMinX||t>n.globals.initialMaxX)&&(e=a,t=s);var l={min:e,max:t};n.config.chart.zoom.autoScaleYaxis&&(o=new Q(this.ctx).autoScaleY(this.ctx,o,{xaxis:l}));var c={xaxis:{min:e,max:t}};n.config.chart.group||(c.yaxis=o),this.updateScrolledChart(c,e,t)}},{key:"updateScrolledChart",value:function(e,t,n){var r=this.w;this.ctx.updateHelpers._updateOptions(e,!1,!1),"function"==typeof r.config.chart.events.scrolled&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:t,max:n}})}}]),n}(),ve=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx}return c(e,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,n=e.elGrid,r=e.clientX,o=e.clientY,i=this.w,a=n.getBoundingClientRect(),s=a.width,l=a.height,c=s/(i.globals.dataPoints-1),u=l/i.globals.dataPoints,p=this.hasBars();!i.globals.comboCharts&&!p||i.config.xaxis.convertedCatToNumeric||(c=s/i.globals.dataPoints);var d=r-a.left-i.globals.barPadForNumericAxis,h=o-a.top;d<0||h<0||d>s||h>l?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):i.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):i.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var f=Math.round(d/c),g=Math.floor(h/u);p&&!i.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(d/c),f-=1);var v=null,m=null,y=[],w=[];if(i.globals.seriesXvalues.forEach((function(e){y.push([e[0]+1e-6].concat(e))})),i.globals.seriesYvalues.forEach((function(e){w.push([e[0]+1e-6].concat(e))})),y=y.map((function(e){return e.filter((function(e){return b.isNumber(e)}))})),w=w.map((function(e){return e.filter((function(e){return b.isNumber(e)}))})),i.globals.isXNumeric){var C=this.ttCtx.getElGrid().getBoundingClientRect(),x=d*(C.width/s),S=h*(C.height/l);v=(m=this.closestInMultiArray(x,S,y,w)).index,f=m.j,null!==v&&(y=i.globals.seriesXvalues[v],f=(m=this.closestInArray(x,y)).index)}return i.globals.capturedSeriesIndex=null===v?-1:v,(!f||f<1)&&(f=0),i.globals.isBarHorizontal?i.globals.capturedDataPointIndex=g:i.globals.capturedDataPointIndex=f,{capturedSeries:v,j:i.globals.isBarHorizontal?g:f,hoverX:d,hoverY:h}}},{key:"closestInMultiArray",value:function(e,t,n,r){var o=this.w,i=0,a=null,s=-1;o.globals.series.length>1?i=this.getFirstActiveXArray(n):a=0;var l=n[i][0],c=Math.abs(e-l);if(n.forEach((function(t){t.forEach((function(t,n){var r=Math.abs(e-t);r<c&&(c=r,s=n)}))})),-1!==s){var u=r[i][s],p=Math.abs(t-u);a=i,r.forEach((function(e,n){var r=Math.abs(t-e[s]);r<p&&(p=r,a=n)}))}return{index:a,j:s}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,n=0,r=e.map((function(e,t){return e.length>0?t:-1})),o=0;o<r.length;o++)if(-1!==r[o]&&-1===t.globals.collapsedSeriesIndices.indexOf(o)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(o)){n=r[o];break}return n}},{key:"closestInArray",value:function(e,t){for(var n=t[0],r=null,o=Math.abs(e-n),i=0;i<t.length;i++){var a=Math.abs(e-t[i]);a<o&&(o=a,r=i)}return{index:r}}},{key:"isXoverlap",value:function(e){var t=[],n=this.w.globals.seriesX.filter((function(e){return void 0!==e[0]}));if(n.length>0)for(var r=0;r<n.length-1;r++)void 0!==n[r][e]&&void 0!==n[r+1][e]&&n[r][e]!==n[r+1][e]&&t.push("unEqual");return 0===t.length}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,t=this.w.globals.initialSeries,n=0;n<t.length-1;n++)if(t[n].data.length!==t[n+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return v(e).reduce((function(e,t){return e+t.getBBox().height}),0)}},{key:"getElMarkers",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(" .apexcharts-series-markers")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=v(e)).sort((function(e,t){return Number(t.getAttribute("data:realIndex"))<Number(e.getAttribute("data:realIndex"))?0:-1}));var t=[];return e.forEach((function(e){t.push(e.querySelector(".apexcharts-marker"))})),t}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,n=t.config.markers.hover.size;return void 0===n&&(n=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),n}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,n=this.ttCtx;0===n.allTooltipSeriesGroups.length&&(n.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var r=n.allTooltipSeriesGroups,o=0;o<r.length;o++)"enable"===e?(r[o].classList.add("apexcharts-active"),r[o].style.display=t.config.tooltip.items.display):(r[o].classList.remove("apexcharts-active"),r[o].style.display="none")}}]),e}(),me=function(){function e(t){s(this,e),this.w=t.w,this.ctx=t.ctx,this.ttCtx=t,this.tooltipUtil=new ve(t)}return c(e,[{key:"drawSeriesTexts",value:function(e){var t=e.shared,n=void 0===t||t,r=e.ttItems,o=e.i,i=void 0===o?0:o,a=e.j,s=void 0===a?null:a,l=e.y1,c=e.y2,u=e.e,p=this.w;void 0!==p.config.tooltip.custom?this.handleCustomTooltip({i:i,j:s,y1:l,y2:c,w:p}):this.toggleActiveInactiveSeries(n);var d=this.getValuesToPrint({i:i,j:s});this.printLabels({i:i,j:s,values:d,ttItems:r,shared:n,e:u});var h=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=h.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=h.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var t,n=this,r=e.i,o=e.j,a=e.values,s=e.ttItems,l=e.shared,c=e.e,u=this.w,p=[],d=function(e){return u.globals.seriesGoals[e]&&u.globals.seriesGoals[e][o]&&Array.isArray(u.globals.seriesGoals[e][o])},h=a.xVal,f=a.zVal,g=a.xAxisTTVal,v="",m=u.globals.colors[r];null!==o&&u.config.plotOptions.bar.distributed&&(m=u.globals.colors[o]);for(var y=function(e,a){var y=n.getFormatters(r);v=n.getSeriesName({fn:y.yLbTitleFormatter,index:r,seriesIndex:r,j:o}),"treemap"===u.config.chart.type&&(v=y.yLbTitleFormatter(String(u.config.series[r].data[o].x),{series:u.globals.series,seriesIndex:r,dataPointIndex:o,w:u}));var b=u.config.tooltip.inverseOrder?a:e;if(u.globals.axisCharts){var w=function(e){return y.yLbFormatter(u.globals.series[e][o],{series:u.globals.series,seriesIndex:e,dataPointIndex:o,w:u})};if(l)y=n.getFormatters(b),v=n.getSeriesName({fn:y.yLbTitleFormatter,index:b,seriesIndex:r,j:o}),m=u.globals.colors[b],t=w(b),d(b)&&(p=u.globals.seriesGoals[b][o].map((function(e){return{attrs:e,val:y.yLbFormatter(e.value,{seriesIndex:b,dataPointIndex:o,w:u})}})));else{var C,x=null==c||null===(C=c.target)||void 0===C?void 0:C.getAttribute("fill");x&&(m=-1!==x.indexOf("url")?document.querySelector(x.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke"):x),t=w(r),d(r)&&Array.isArray(u.globals.seriesGoals[r][o])&&(p=u.globals.seriesGoals[r][o].map((function(e){return{attrs:e,val:y.yLbFormatter(e.value,{seriesIndex:r,dataPointIndex:o,w:u})}})))}}null===o&&(t=y.yLbFormatter(u.globals.series[r],i(i({},u),{},{seriesIndex:r,dataPointIndex:r}))),n.DOMHandling({i:r,t:b,j:o,ttItems:s,values:{val:t,goalVals:p,xVal:h,xAxisTTVal:g,zVal:f},seriesName:v,shared:l,pColor:m})},b=0,w=u.globals.series.length-1;b<u.globals.series.length;b++,w--)y(b,w)}},{key:"getFormatters",value:function(e){var t,n=this.w,r=n.globals.yLabelFormatters[e];return void 0!==n.globals.ttVal?Array.isArray(n.globals.ttVal)?(r=n.globals.ttVal[e]&&n.globals.ttVal[e].formatter,t=n.globals.ttVal[e]&&n.globals.ttVal[e].title&&n.globals.ttVal[e].title.formatter):(r=n.globals.ttVal.formatter,"function"==typeof n.globals.ttVal.title.formatter&&(t=n.globals.ttVal.title.formatter)):t=n.config.tooltip.y.title.formatter,"function"!=typeof r&&(r=n.globals.yLabelFormatters[0]?n.globals.yLabelFormatters[0]:function(e){return e}),"function"!=typeof t&&(t=function(e){return e}),{yLbFormatter:r,yLbTitleFormatter:t}}},{key:"getSeriesName",value:function(e){var t=e.fn,n=e.index,r=e.seriesIndex,o=e.j,i=this.w;return t(String(i.globals.seriesNames[n]),{series:i.globals.series,seriesIndex:r,dataPointIndex:o,w:i})}},{key:"DOMHandling",value:function(e){e.i;var t=e.t,n=e.j,r=e.ttItems,o=e.values,i=e.seriesName,a=e.shared,s=e.pColor,l=this.w,c=this.ttCtx,u=o.val,p=o.goalVals,d=o.xVal,h=o.xAxisTTVal,f=o.zVal,g=null;g=r[t].children,l.config.tooltip.fillSeriesColor&&(r[t].style.backgroundColor=s,g[0].style.display="none"),c.showTooltipTitle&&(null===c.tooltipTitle&&(c.tooltipTitle=l.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle.innerHTML=d),c.isXAxisTooltipEnabled&&(c.xaxisTooltipText.innerHTML=""!==h?h:d);var v=r[t].querySelector(".apexcharts-tooltip-text-y-label");v&&(v.innerHTML=i||"");var m=r[t].querySelector(".apexcharts-tooltip-text-y-value");m&&(m.innerHTML=void 0!==u?u:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(s=l.config.tooltip.marker.fillColors[t]),g[0].style.backgroundColor=s),l.config.tooltip.marker.show||(g[0].style.display="none");var y=r[t].querySelector(".apexcharts-tooltip-text-goals-label"),b=r[t].querySelector(".apexcharts-tooltip-text-goals-value");if(p.length&&l.globals.seriesGoals[t]){var w=function(){var e="<div >",t="<div>";p.forEach((function(n,r){e+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(n.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(n.attrs.name,"</div>"),t+="<div>".concat(n.val,"</div>")})),y.innerHTML=e+"</div>",b.innerHTML=t+"</div>"};a?l.globals.seriesGoals[t][n]&&Array.isArray(l.globals.seriesGoals[t][n])?w():(y.innerHTML="",b.innerHTML=""):w()}else y.innerHTML="",b.innerHTML="";null!==f&&(r[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,r[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==f?f:""),a&&g[0]&&(null==u||l.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||l.globals.collapsedSeriesIndices.indexOf(t)>-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(e){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var n=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");n&&(n.classList.add("apexcharts-active"),n.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,n=e.j,r=this.w,o=this.ctx.series.filteredSeriesX(),i="",a="",s=null,l=null,c={series:r.globals.series,seriesIndex:t,dataPointIndex:n,w:r},u=r.globals.ttZFormatter;null===n?l=r.globals.series[t]:r.globals.isXNumeric&&"treemap"!==r.config.chart.type?(i=o[t][n],0===o[t].length&&(i=o[this.tooltipUtil.getFirstActiveXArray(o)][n])):i=void 0!==r.globals.labels[n]?r.globals.labels[n]:"";var p=i;return i=r.globals.isXNumeric&&"datetime"===r.config.xaxis.type?new Y(this.ctx).xLabelFormat(r.globals.ttKeyFormatter,p,p,{i:void 0,dateFormatter:new H(this.ctx).formatDate,w:this.w}):r.globals.isBarHorizontal?r.globals.yLabelFormatters[0](p,c):r.globals.xLabelFormatter(p,c),void 0!==r.config.tooltip.x.formatter&&(i=r.globals.ttKeyFormatter(p,c)),r.globals.seriesZ.length>0&&r.globals.seriesZ[t].length>0&&(s=u(r.globals.seriesZ[t][n],r)),a="function"==typeof r.config.xaxis.tooltip.formatter?r.globals.xaxisTooltipFormatter(p,c):i,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(i)?i.join(" "):i,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:s}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,n=e.j,r=e.y1,o=e.y2,i=e.w,a=this.ttCtx.getElTooltip(),s=i.config.tooltip.custom;Array.isArray(s)&&s[t]&&(s=s[t]),a.innerHTML=s({ctx:this.ctx,series:i.globals.series,seriesIndex:t,dataPointIndex:n,y1:r,y2:o,w:i})}}]),e}(),ye=function(){function e(t){s(this,e),this.ttCtx=t,this.ctx=t.ctx,this.w=t.w}return c(e,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.ttCtx,r=this.w,o=n.getElXCrosshairs(),i=e-n.xcrosshairsWidth/2,a=r.globals.labels.slice().length;if(null!==t&&(i=r.globals.gridWidth/a*t),null===o||r.globals.isBarHorizontal||(o.setAttribute("x",i),o.setAttribute("x1",i),o.setAttribute("x2",i),o.setAttribute("y2",r.globals.gridHeight),o.classList.add("apexcharts-active")),i<0&&(i=0),i>r.globals.gridWidth&&(i=r.globals.gridWidth),n.isXAxisTooltipEnabled){var s=i;"tickWidth"!==r.config.xaxis.crosshairs.width&&"barWidth"!==r.config.xaxis.crosshairs.width||(s=i+n.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&x.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&x.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,n=this.ttCtx;if(null!==n.xaxisTooltip&&0!==n.xcrosshairsWidth){n.xaxisTooltip.classList.add("apexcharts-active");var r,o=n.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;if(e-=n.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e))e+=t.globals.translateX,r=new x(this.ctx).getTextRects(n.xaxisTooltipText.innerHTML),n.xaxisTooltipText.style.minWidth=r.width+"px",n.xaxisTooltip.style.left=e+"px",n.xaxisTooltip.style.top=o+"px"}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,n=this.ttCtx;null===n.yaxisTTEls&&(n.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var r=parseInt(n.ycrosshairsHidden.getAttribute("y1"),10),o=t.globals.translateY+r,i=n.yaxisTTEls[e].getBoundingClientRect().height,a=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(a-=26),o-=i/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(n.yaxisTTEls[e].classList.add("apexcharts-active"),n.yaxisTTEls[e].style.top=o+"px",n.yaxisTTEls[e].style.left=a+t.config.yaxis[e].tooltip.offsetX+"px"):n.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.w,o=this.ttCtx,i=o.getElTooltip(),a=o.tooltipRect,s=null!==n?parseFloat(n):1,l=parseFloat(e)+s+5,c=parseFloat(t)+s/2;if(l>r.globals.gridWidth/2&&(l=l-a.ttWidth-s-10),l>r.globals.gridWidth-a.ttWidth-10&&(l=r.globals.gridWidth-a.ttWidth),l<-20&&(l=-20),r.config.tooltip.followCursor){var u=o.getElGrid(),p=u.getBoundingClientRect();c=o.e.clientY+r.globals.translateY-p.top-a.ttHeight/2}else r.globals.isBarHorizontal||(a.ttHeight/2+c>r.globals.gridHeight&&(c=r.globals.gridHeight-a.ttHeight+r.globals.translateY),c<0&&(c=0));isNaN(l)||(l+=r.globals.translateX,i.style.left=l+"px",i.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var n=this.w,r=this.ttCtx;if(n.globals.markers.size[e]>0)for(var o=n.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),i=0;i<o.length;i++)parseInt(o[i].getAttribute("rel"),10)===t&&(r.marker.resetPointsSize(),r.marker.enlargeCurrentPoint(t,o[i]));else r.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}},{key:"moveDynamicPointOnHover",value:function(e,t){var n,r,o=this.w,i=this.ttCtx,a=o.globals.pointsArray,s=i.tooltipUtil.getHoverMarkerSize(t),l=o.config.series[t].type;if(!l||"column"!==l&&"candlestick"!==l&&"boxPlot"!==l){n=a[t][e][0],r=a[t][e][1]?a[t][e][1]:0;var c=o.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-series-markers circle"));c&&r<o.globals.gridHeight&&r>0&&(c.setAttribute("r",s),c.setAttribute("cx",n),c.setAttribute("cy",r)),this.moveXCrosshairs(n),i.fixedTooltip||this.moveTooltip(n,r,s)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,n=this.ttCtx,r=n.w,o=0,i=0,a=r.globals.pointsArray;t=new L(this.ctx).getActiveConfigSeriesIndex(!0);var s=n.tooltipUtil.getHoverMarkerSize(t);a[t]&&(o=a[t][e][0],i=a[t][e][1]);var l=n.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c<r.globals.series.length;c++){var u=a[c];if(r.globals.comboCharts&&void 0===u&&l.splice(c,0,null),u&&u.length){var p=a[c][e][1];l[c].setAttribute("cx",o),null!==p&&!isNaN(p)&&p<r.globals.gridHeight+s&&p+s>0?(l[c]&&l[c].setAttribute("r",s),l[c]&&l[c].setAttribute("cy",p)):l[c]&&l[c].setAttribute("r",0)}}if(this.moveXCrosshairs(o),!n.fixedTooltip){var d=i||r.globals.gridHeight;this.moveTooltip(o,d,s)}}},{key:"moveStickyTooltipOverBars",value:function(e){var t=this.w,n=this.ttCtx,r=t.globals.columnSeries?t.globals.columnSeries.length:t.globals.series.length,o=r>=2&&r%2==0?Math.floor(r/2):Math.floor(r/2)+1;t.globals.isBarHorizontal&&(o=new L(this.ctx).getActiveConfigSeriesIndex(!1,"desc")+1);var i=t.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(o,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(e,"']")),a=i?parseFloat(i.getAttribute("cx")):0,s=i?parseFloat(i.getAttribute("cy")):0,l=i?parseFloat(i.getAttribute("barWidth")):0,c=i?parseFloat(i.getAttribute("barHeight")):0,u=n.getElGrid().getBoundingClientRect(),p=i.classList.contains("apexcharts-candlestick-area")||i.classList.contains("apexcharts-boxPlot-area");if(t.globals.isXNumeric?(i&&!p&&(a-=r%2!=0?l/2:0),i&&p&&t.globals.comboCharts&&(a-=l/2)):t.globals.isBarHorizontal||(a=n.xAxisTicksPositions[e-1]+n.dataPointsDividedWidth/2,isNaN(a)&&(a=n.xAxisTicksPositions[e]-n.dataPointsDividedWidth/2)),t.globals.isBarHorizontal?(s>t.globals.gridHeight/2&&(s-=n.tooltipRect.ttHeight),(s=s+t.config.grid.padding.top+c/3)+c>t.globals.gridHeight&&(s=t.globals.gridHeight-c)):t.config.tooltip.followCursor?s=n.e.clientY-u.top-n.tooltipRect.ttHeight/2:s+n.tooltipRect.ttHeight+15>t.globals.gridHeight&&(s=t.globals.gridHeight),s<-10&&(s=-10),t.globals.isBarHorizontal||this.moveXCrosshairs(a),!n.fixedTooltip){var d=s||t.globals.gridHeight;this.moveTooltip(a,d)}}}]),e}(),be=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new ye(t)}return c(e,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new x(this.ctx),n=new k(this.ctx),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");r=v(r),e.config.chart.stacked&&r.sort((function(e,t){return parseFloat(e.getAttribute("data:realIndex"))-parseFloat(t.getAttribute("data:realIndex"))}));for(var o=0;o<r.length;o++){var i=r[o].querySelector(".apexcharts-series-markers-wrap");if(null!==i){var a=void 0,s="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));"line"!==e.config.chart.type&&"area"!==e.config.chart.type||e.globals.comboCharts||e.config.tooltip.intersect||(s+=" no-pointer-events");var l=n.getMarkerConfig({cssClass:s,seriesIndex:Number(i.getAttribute("data:realIndex"))});(a=t.drawMarker(0,0,l)).node.setAttribute("default-marker-size",0);var c=document.createElementNS(e.globals.SVGNS,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(a.node),i.appendChild(c)}}}},{key:"enlargeCurrentPoint",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=this.w;"bubble"!==o.config.chart.type&&this.newPointSize(e,t);var i=t.getAttribute("cx"),a=t.getAttribute("cy");if(null!==n&&null!==r&&(i=n,a=r),this.tooltipPosition.moveXCrosshairs(i),!this.fixedTooltip){if("radar"===o.config.chart.type){var s=this.ttCtx.getElGrid(),l=s.getBoundingClientRect();i=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(i,a,o.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,n=this,r=this.ttCtx,o=e,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=t.config.markers.hover.size,s=0;s<i.length;s++){var l=i[s].getAttribute("rel"),c=i[s].getAttribute("index");if(void 0===a&&(a=t.globals.markers.size[c]+t.config.markers.hover.sizeOffset),o===parseInt(l,10)){n.newPointSize(o,i[s]);var u=i[s].getAttribute("cx"),p=i[s].getAttribute("cy");n.tooltipPosition.moveXCrosshairs(u),r.fixedTooltip||n.tooltipPosition.moveTooltip(u,p,a)}else n.oldPointSize(i[s])}}},{key:"newPointSize",value:function(e,t){var n=this.w,r=n.config.markers.hover.size,o=0===e?t.parentNode.firstChild:t.parentNode.lastChild;if("0"!==o.getAttribute("default-marker-size")){var i=parseInt(o.getAttribute("index"),10);void 0===r&&(r=n.globals.markers.size[i]+n.config.markers.hover.sizeOffset),r<0&&(r=0),o.setAttribute("r",r)}}},{key:"oldPointSize",value:function(e){var t=parseFloat(e.getAttribute("default-marker-size"));e.setAttribute("r",t)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),t=0;t<e.length;t++){var n=parseFloat(e[t].getAttribute("default-marker-size"));b.isNumber(n)&&n>=0?e[t].setAttribute("r",n):e[t].setAttribute("r",0)}}}]),e}(),we=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t}return c(e,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,n=e.opt,r=e.x,o=e.y,i=e.type,a=this.ttCtx,s=this.w;if(t.target.classList.contains("apexcharts-".concat(i,"-rect"))){var l=this.getAttr(t,"i"),c=this.getAttr(t,"j"),u=this.getAttr(t,"cx"),p=this.getAttr(t,"cy"),d=this.getAttr(t,"width"),h=this.getAttr(t,"height");if(a.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:l,j:c,shared:!1,e:t}),s.globals.capturedSeriesIndex=l,s.globals.capturedDataPointIndex=c,r=u+a.tooltipRect.ttWidth/2+d,o=p+a.tooltipRect.ttHeight/2-h/2,a.tooltipPosition.moveXCrosshairs(u+d/2),r>s.globals.gridWidth/2&&(r=u-a.tooltipRect.ttWidth/2+d),a.w.config.tooltip.followCursor){var f=s.globals.dom.elWrap.getBoundingClientRect();r=s.globals.clientX-f.left-(r>s.globals.gridWidth/2?a.tooltipRect.ttWidth:0),o=s.globals.clientY-f.top-(o>s.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:r,y:o}}},{key:"handleMarkerTooltip",value:function(e){var t,n,r=e.e,o=e.opt,i=e.x,a=e.y,s=this.w,l=this.ttCtx;if(r.target.classList.contains("apexcharts-marker")){var c=parseInt(o.paths.getAttribute("cx"),10),u=parseInt(o.paths.getAttribute("cy"),10),p=parseFloat(o.paths.getAttribute("val"));if(n=parseInt(o.paths.getAttribute("rel"),10),t=parseInt(o.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var d=b.findAncestor(o.paths,"apexcharts-series");d&&(t=parseInt(d.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:o.ttItems,i:t,j:n,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:r}),"mouseup"===r.type&&l.markerClick(r,t,n),s.globals.capturedSeriesIndex=t,s.globals.capturedDataPointIndex=n,i=c,a=u+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var h=l.getElGrid().getBoundingClientRect();a=l.e.clientY+s.globals.translateY-h.top}p<0&&(a=u),l.marker.enlargeCurrentPoint(n,o.paths,i,a)}return{x:i,y:a}}},{key:"handleBarTooltip",value:function(e){var t,n,r=e.e,o=e.opt,i=this.w,a=this.ttCtx,s=a.getElTooltip(),l=0,c=0,u=0,p=this.getBarTooltipXY({e:r,opt:o});t=p.i;var d=p.barHeight,h=p.j;i.globals.capturedSeriesIndex=t,i.globals.capturedDataPointIndex=h,i.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!i.config.tooltip.shared?(c=p.x,u=p.y,n=Array.isArray(i.config.stroke.width)?i.config.stroke.width[t]:i.config.stroke.width,l=c):i.globals.comboCharts||i.config.tooltip.shared||(l/=2),isNaN(u)?u=i.globals.svgHeight-a.tooltipRect.ttHeight:u<0&&(u=0);var f=parseInt(o.paths.parentNode.getAttribute("data:realIndex"),10),g=i.globals.isMultipleYAxis?i.config.yaxis[f]&&i.config.yaxis[f].reversed:i.config.yaxis[0].reversed;if(c+a.tooltipRect.ttWidth>i.globals.gridWidth&&!g?c-=a.tooltipRect.ttWidth:c<0&&(c=0),a.w.config.tooltip.followCursor){var v=a.getElGrid().getBoundingClientRect();u=a.e.clientY-v.top}null===a.tooltip&&(a.tooltip=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),i.config.tooltip.shared||(i.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(l+n/2):a.tooltipPosition.moveXCrosshairs(l)),!a.fixedTooltip&&(!i.config.tooltip.shared||i.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(g&&(c-=a.tooltipRect.ttWidth)<0&&(c=0),!g||i.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||(u=u+d-2*(i.globals.series[t][h]<0?d:0)),a.tooltipRect.ttHeight+u>i.globals.gridHeight?u=i.globals.gridHeight-a.tooltipRect.ttHeight+i.globals.translateY:(u=u+i.globals.translateY-a.tooltipRect.ttHeight/2)<0&&(u=0),s.style.left=c+i.globals.translateX+"px",s.style.top=u+"px")}},{key:"getBarTooltipXY",value:function(e){var t=e.e,n=e.opt,r=this.w,o=null,i=this.ttCtx,a=0,s=0,l=0,c=0,u=0,p=t.target.classList;if(p.contains("apexcharts-bar-area")||p.contains("apexcharts-candlestick-area")||p.contains("apexcharts-boxPlot-area")||p.contains("apexcharts-rangebar-area")){var d=t.target,h=d.getBoundingClientRect(),f=n.elGrid.getBoundingClientRect(),g=h.height;u=h.height;var v=h.width,m=parseInt(d.getAttribute("cx"),10),y=parseInt(d.getAttribute("cy"),10);c=parseFloat(d.getAttribute("barWidth"));var b="touchmove"===t.type?t.touches[0].clientX:t.clientX;o=parseInt(d.getAttribute("j"),10),a=parseInt(d.parentNode.getAttribute("rel"),10)-1;var w=d.getAttribute("data-range-y1"),C=d.getAttribute("data-range-y2");r.globals.comboCharts&&(a=parseInt(d.parentNode.getAttribute("data:realIndex"),10)),i.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:a,j:o,y1:w?parseInt(w,10):null,y2:C?parseInt(C,10):null,shared:!i.showOnIntersect&&r.config.tooltip.shared,e:t}),r.config.tooltip.followCursor?r.globals.isBarHorizontal?(s=b-f.left+15,l=y-i.dataPointsDividedHeight+g/2-i.tooltipRect.ttHeight/2):(s=r.globals.isXNumeric?m-v/2:m-i.dataPointsDividedWidth+v/2,l=t.clientY-f.top-i.tooltipRect.ttHeight/2-15):r.globals.isBarHorizontal?((s=m)<i.xyRatios.baseLineInvertedY&&(s=m-i.tooltipRect.ttWidth),l=y-i.dataPointsDividedHeight+g/2-i.tooltipRect.ttHeight/2):(s=r.globals.isXNumeric?m-v/2:m-i.dataPointsDividedWidth+v/2,l=y)}return{x:s,y:l,barHeight:u,barWidth:c,i:a,j:o}}}]),e}(),Ce=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t}return c(e,[{key:"drawXaxisTooltip",value:function(){var e=this.w,t=this.ttCtx,n="bottom"===e.config.xaxis.position;t.xaxisOffY=n?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var r=n?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",o=e.globals.dom.elWrap;t.isXAxisTooltipEnabled&&null===e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(t.xaxisTooltip=document.createElement("div"),t.xaxisTooltip.setAttribute("class",r+" apexcharts-theme-"+e.config.tooltip.theme),o.appendChild(t.xaxisTooltip),t.xaxisTooltipText=document.createElement("div"),t.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,t=this.ttCtx,n=function(n){var r=e.config.yaxis[n].opposite||e.config.yaxis[n].crosshairs.opposite;t.yaxisOffX=r?e.globals.gridWidth+1:1;var o="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(n,r?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left");e.globals.yAxisSameScaleIndices.map((function(t,r){t.map((function(t,r){r===n&&(o+=e.config.yaxis[r].show?" ":" apexcharts-yaxistooltip-hidden")}))}));var i=e.globals.dom.elWrap;null===e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(n))&&(t.yaxisTooltip=document.createElement("div"),t.yaxisTooltip.setAttribute("class",o+" apexcharts-theme-"+e.config.tooltip.theme),i.appendChild(t.yaxisTooltip),0===n&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[n]=document.createElement("div"),t.yaxisTooltipText[n].classList.add("apexcharts-yaxistooltip-text"),t.yaxisTooltip.appendChild(t.yaxisTooltipText[n]))},r=0;r<e.config.yaxis.length;r++)n(r)}},{key:"setXCrosshairWidth",value:function(){var e=this.w,t=this.ttCtx,n=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var r=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==r&&"barWidth"===e.config.xaxis.crosshairs.width){var o=parseFloat(r.getAttribute("barWidth"));t.xcrosshairsWidth=o}else if("tickWidth"===e.config.xaxis.crosshairs.width){var i=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/i}}else if("tickWidth"===e.config.xaxis.crosshairs.width){var a=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/a}else if("barWidth"===e.config.xaxis.crosshairs.width){var s=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==s){var l=parseFloat(s.getAttribute("barWidth"));t.xcrosshairsWidth=l}else t.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),null!==n&&t.xcrosshairsWidth>0&&n.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,n){var r=this.ttCtx,o=this.w,i=o.globals.yLabelFormatters[e];if(r.yaxisTooltips[e]){var a=r.getElGrid().getBoundingClientRect(),s=(t-a.top)*n.yRatio[e],l=o.globals.maxYArr[e]-o.globals.minYArr[e],c=o.globals.minYArr[e]+(l-s);r.tooltipPosition.moveYCrosshairs(t-a.top),r.yaxisTooltipText[e].innerHTML=i(c),r.tooltipPosition.moveYAxisTooltip(e)}}}]),e}(),xe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new ve(this),this.tooltipLabels=new me(this),this.tooltipPosition=new ye(this),this.marker=new be(this),this.intersect=new we(this),this.axesTooltip=new Ce(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!n.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return c(e,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map((function(e,n){return!!(e.show&&e.tooltip.enabled&&t.globals.axisCharts)})),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var n=document.createElement("div");if(n.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&n.classList.add(t.config.tooltip.cssClass),n.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(n),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var r=new K(this.ctx);this.xAxisTicksPositions=r.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==t.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==t.config.markers.size&&0!==t.globals.markers.largestSize||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,n.appendChild(this.tooltipTitle));var o=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(o=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(o),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,n=this.w,r=[],o=this.getElTooltip(),i=function(i){var a=document.createElement("div");a.classList.add("apexcharts-tooltip-series-group"),a.style.order=n.config.tooltip.inverseOrder?e-i:i+1,t.tConfig.shared&&t.tConfig.enabledOnSeries&&Array.isArray(t.tConfig.enabledOnSeries)&&t.tConfig.enabledOnSeries.indexOf(i)<0&&a.classList.add("apexcharts-tooltip-series-group-hidden");var s=document.createElement("span");s.classList.add("apexcharts-tooltip-marker"),s.style.backgroundColor=n.globals.colors[i],a.appendChild(s);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=t.tConfig.style.fontFamily||n.config.chart.fontFamily,l.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach((function(e){var t=document.createElement("div");t.classList.add("apexcharts-tooltip-".concat(e,"-group"));var n=document.createElement("span");n.classList.add("apexcharts-tooltip-text-".concat(e,"-label")),t.appendChild(n);var r=document.createElement("span");r.classList.add("apexcharts-tooltip-text-".concat(e,"-value")),t.appendChild(r),l.appendChild(t)})),a.appendChild(l),o.appendChild(a),r.push(a)},a=0;a<e;a++)i(a);return r}},{key:"addSVGEvents",value:function(){var e=this.w,t=e.config.chart.type,n=this.getElTooltip(),r=!("bar"!==t&&"candlestick"!==t&&"boxPlot"!==t&&"rangeBar"!==t),o="area"===t||"line"===t||"scatter"===t||"bubble"===t||"radar"===t,i=e.globals.dom.Paper.node,a=this.getElGrid();a&&(this.seriesBound=a.getBoundingClientRect());var s,l=[],c=[],u={hoverArea:i,elGrid:a,tooltipEl:n,tooltipY:l,tooltipX:c,ttItems:this.ttItems};if(e.globals.axisCharts&&(o?s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):r?s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"!==t&&"treemap"!==t||(s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),s&&s.length))for(var p=0;p<s.length;p++)l.push(s[p].getAttribute("cy")),c.push(s[p].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||r&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([i],u);else if(r&&!e.globals.comboCharts||o&&this.showOnIntersect)this.addDatapointEventsListeners(u);else if(!e.globals.axisCharts||"heatmap"===t||"treemap"===t){var d=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(d,u)}if(this.showOnIntersect){var h=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");h.length>0&&this.addPathsEventListeners(h,u),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(u)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),n=t.getBoundingClientRect(),r=n.width+10,o=n.height+10,i=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(i=i+e.globals.svgWidth-r+10),s.indexOf("bottom")>-1&&(a=a+e.globals.svgHeight-o-10),t.style.left=i+"px",t.style.top=a+"px",{x:i,y:a,ttWidth:r,ttHeight:o}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var n=this,r=function(r){var o={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(t){return e[r].addEventListener(t,n.onSeriesHover.bind(n,o),{capture:!1,passive:!0})}))},o=0;o<e.length;o++)r(o)}},{key:"onSeriesHover",value:function(e,t){var n=this,r=Date.now()-this.lastHoverTime;r>=100?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){n.seriesHover(e,t)}),100-r))}},{key:"seriesHover",value:function(e,t){var n=this;this.lastHoverTime=Date.now();var r=[],o=this.w;o.config.chart.group&&(r=this.ctx.getGroupedCharts()),o.globals.axisCharts&&(o.globals.minX===-1/0&&o.globals.maxX===1/0||0===o.globals.dataPoints)||(r.length?r.forEach((function(r){var o=n.getElTooltip(r),i={paths:e.paths,tooltipEl:o,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===n.w.globals.minX&&r.w.globals.maxX===n.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:i,e:t})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,n=e.ttCtx,r=e.opt,o=e.e,i=t.w,a=this.getElTooltip();a&&(n.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},n.e=o,!n.tooltipUtil.hasBars()||i.globals.comboCharts||n.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new L(t).toggleSeriesOnHover(o,o.target.parentNode),n.fixedTooltip&&n.drawFixedTooltipRect(),i.globals.axisCharts?n.axisChartsTooltips({e:o,opt:r,tooltipRect:n.tooltipRect}):n.nonAxisChartsTooltips({e:o,opt:r,tooltipRect:n.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,n,r=e.e,o=e.opt,i=this.w,a=o.elGrid.getBoundingClientRect(),s="touchmove"===r.type?r.touches[0].clientX:r.clientX,l="touchmove"===r.type?r.touches[0].clientY:r.clientY;if(this.clientY=l,this.clientX=s,i.globals.capturedSeriesIndex=-1,i.globals.capturedDataPointIndex=-1,l<a.top||l>a.top+a.height)this.handleMouseOut(o);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){var c=parseInt(o.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(o)}var u=this.getElTooltip(),p=this.getElXCrosshairs(),d=i.globals.xyCharts||"bar"===i.config.chart.type&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===r.type||"touchmove"===r.type||"mouseup"===r.type){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.globals.series.length)return;null!==p&&p.classList.add("apexcharts-active");var h=this.yaxisTooltips.filter((function(e){return!0===e}));if(null!==this.ycrosshairs&&h.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect)this.handleStickyTooltip(r,s,l,o);else if("heatmap"===i.config.chart.type||"treemap"===i.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:r,opt:o,x:t,y:n,type:i.config.chart.type});t=f.x,n=f.y,u.style.left=t+"px",u.style.top=n+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:r,opt:o}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:r,opt:o,x:t,y:n});if(this.yaxisTooltips.length)for(var g=0;g<i.config.yaxis.length;g++)this.axesTooltip.drawYaxisTooltipText(g,l,this.xyRatios);o.tooltipEl.classList.add("apexcharts-active")}else"mouseout"!==r.type&&"touchend"!==r.type||this.handleMouseOut(o)}}},{key:"nonAxisChartsTooltips",value:function(e){var t=e.e,n=e.opt,r=e.tooltipRect,o=this.w,i=n.paths.getAttribute("rel"),a=this.getElTooltip(),s=o.globals.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){a.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:parseInt(i,10)-1,shared:!1});var l=o.globals.clientX-s.left-r.ttWidth/2,c=o.globals.clientY-s.top-r.ttHeight-10;if(a.style.left=l+"px",a.style.top=c+"px",o.config.legend.tooltipHoverFormatter){var u=i-1,p=(0,o.config.legend.tooltipHoverFormatter)(this.legendLabels[u].getAttribute("data:default-text"),{seriesIndex:u,dataPointIndex:u,w:o});this.legendLabels[u].innerHTML=p}}else"mouseout"!==t.type&&"touchend"!==t.type||(a.classList.remove("apexcharts-active"),o.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)})))}},{key:"handleStickyTooltip",value:function(e,t,n,r){var o=this.w,i=this.tooltipUtil.getNearestValues({context:this,hoverArea:r.hoverArea,elGrid:r.elGrid,clientX:t,clientY:n}),a=i.j,s=i.capturedSeries,l=r.elGrid.getBoundingClientRect();i.hoverX<0||i.hoverX>l.width?this.handleMouseOut(r):null!==s?this.handleStickyCapturedSeries(e,s,r,a):(this.tooltipUtil.isXoverlap(a)||o.globals.isBarHorizontal)&&this.create(e,this,0,a,r.ttItems)}},{key:"handleStickyCapturedSeries",value:function(e,t,n,r){var o=this.w;this.tConfig.shared||null!==o.globals.series[t][r]?void 0!==o.globals.series[t][r]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(r)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,r,n.ttItems):this.create(e,this,t,r,n.ttItems,!1):this.tooltipUtil.isXoverlap(r)&&this.create(e,this,0,r,n.ttItems):this.handleMouseOut(n)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new x(this.ctx),n=e.globals.dom.Paper.select(".apexcharts-bar-area"),r=0;r<n.length;r++)t.pathMouseLeave(n[r])}},{key:"handleMouseOut",value:function(e){var t=this.w,n=this.getElXCrosshairs();if(e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),"bubble"!==t.config.chart.type&&this.marker.resetPointsSize(),null!==n&&n.classList.remove("apexcharts-active"),null!==this.ycrosshairs&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var r=0;r<this.yaxisTTEls.length;r++)this.yaxisTTEls[r].classList.remove("apexcharts-active")}t.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)}))}},{key:"markerClick",value:function(e,t,n){var r=this.w;"function"==typeof r.config.chart.events.markerClick&&r.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:n,w:r}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:t,dataPointIndex:n,w:r}])}},{key:"create",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=this.w,s=t;"mouseup"===e.type&&this.markerClick(e,n,r),null===i&&(i=this.tConfig.shared);var l=this.tooltipUtil.hasMarkers(),c=this.tooltipUtil.getElBars();if(a.config.legend.tooltipHoverFormatter){var u=a.config.legend.tooltipHoverFormatter,p=Array.from(this.legendLabels);p.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)}));for(var d=0;d<p.length;d++){var h=p[d],f=parseInt(h.getAttribute("i"),10),g=decodeURIComponent(h.getAttribute("data:default-text")),v=u(g,{seriesIndex:i?f:n,dataPointIndex:r,w:a});if(i)h.innerHTML=a.globals.collapsedSeriesIndices.indexOf(f)<0?v:g;else if(h.innerHTML=f===n?v:g,n===f)break}}if(i){if(s.tooltipLabels.drawSeriesTexts({ttItems:o,i:n,j:r,shared:!this.showOnIntersect&&this.tConfig.shared}),l&&(a.globals.markers.largestSize>0?s.marker.enlargePoints(r):s.tooltipPosition.moveDynamicPointsOnHover(r)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(c),this.barSeriesHeight>0)){var m=new x(this.ctx),y=a.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(r,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(r);for(var b=0;b<y.length;b++)m.pathMouseEnter(y[b])}}else s.tooltipLabels.drawSeriesTexts({shared:!1,ttItems:o,i:n,j:r}),this.tooltipUtil.hasBars()&&s.tooltipPosition.moveStickyTooltipOverBars(r),l&&s.tooltipPosition.moveMarkers(n,r)}}]),e}(),Se=function(e){p(n,G);var t=g(n);function n(){return s(this,n),t.apply(this,arguments)}return c(n,[{key:"draw",value:function(e,t){var n=this,r=this.w;this.graphics=new x(this.ctx),this.bar=new G(this.ctx,this.xyRatios);var o=new S(this.ctx,r);e=o.getLogSeries(e),this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e),"100%"===r.config.chart.stackType&&(e=r.globals.seriesPercent.slice()),this.series=e,this.totalItems=0,this.prevY=[],this.prevX=[],this.prevYF=[],this.prevXF=[],this.prevYVal=[],this.prevXVal=[],this.xArrj=[],this.xArrjF=[],this.xArrjVal=[],this.yArrj=[],this.yArrjF=[],this.yArrjVal=[];for(var a=0;a<e.length;a++)e[a].length>0&&(this.totalItems+=e[a].length);for(var s=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),l=0,c=0,u=function(o,a){var u=void 0,p=void 0,d=void 0,h=void 0,f=[],g=[],v=r.globals.comboCharts?t[o]:o;n.yRatio.length>1&&(n.yaxisIndex=v),n.isReversed=r.config.yaxis[n.yaxisIndex]&&r.config.yaxis[n.yaxisIndex].reversed;var m=n.graphics.group({class:"apexcharts-series",seriesName:b.escapeString(r.globals.seriesNames[v]),rel:o+1,"data:realIndex":v});n.ctx.series.addCollapsedClassToSeries(m,v);var y=n.graphics.group({class:"apexcharts-datalabels","data:realIndex":v}),w=0,C=0,x=n.initialPositions(l,c,u,p,d,h);c=x.y,w=x.barHeight,p=x.yDivision,h=x.zeroW,l=x.x,C=x.barWidth,u=x.xDivision,d=x.zeroH,n.yArrj=[],n.yArrjF=[],n.yArrjVal=[],n.xArrj=[],n.xArrjF=[],n.xArrjVal=[],1===n.prevY.length&&n.prevY[0].every((function(e){return isNaN(e)}))&&(n.prevY[0]=n.prevY[0].map((function(e){return d})),n.prevYF[0]=n.prevYF[0].map((function(e){return 0})));for(var S=0;S<r.globals.dataPoints;S++){var E=n.barHelpers.getStrokeWidth(o,S,v),_={indexes:{i:o,j:S,realIndex:v,bc:a},strokeWidth:E,x:l,y:c,elSeries:m},R=null;n.isHorizontal?(R=n.drawStackedBarPaths(i(i({},_),{},{zeroW:h,barHeight:w,yDivision:p})),C=n.series[o][S]/n.invertedYRatio):(R=n.drawStackedColumnPaths(i(i({},_),{},{xDivision:u,barWidth:C,zeroH:d})),w=n.series[o][S]/n.yRatio[n.yaxisIndex]),c=R.y,l=R.x,f.push(l),g.push(c);var O=n.barHelpers.getPathFillColor(e,o,S,v);m=n.renderSeries({realIndex:v,pathFill:O,j:S,i:o,pathFrom:R.pathFrom,pathTo:R.pathTo,strokeWidth:E,elSeries:m,x:l,y:c,series:e,barHeight:w,barWidth:C,elDataLabelsWrap:y,type:"bar",visibleSeries:0})}r.globals.seriesXvalues[v]=f,r.globals.seriesYvalues[v]=g,n.prevY.push(n.yArrj),n.prevYF.push(n.yArrjF),n.prevYVal.push(n.yArrjVal),n.prevX.push(n.xArrj),n.prevXF.push(n.xArrjF),n.prevXVal.push(n.xArrjVal),s.add(m)},p=0,d=0;p<e.length;p++,d++)u(p,d);return s}},{key:"initialPositions",value:function(e,t,n,r,o,i){var a,s,l=this.w;return this.isHorizontal?(a=(a=r=l.globals.gridHeight/l.globals.dataPoints)*parseInt(l.config.plotOptions.bar.barHeight,10)/100,i=this.baseLineInvertedY+l.globals.padHorizontal+(this.isReversed?l.globals.gridWidth:0)-(this.isReversed?2*this.baseLineInvertedY:0),t=(r-a)/2):(s=n=l.globals.gridWidth/l.globals.dataPoints,s=l.globals.isXNumeric&&l.globals.dataPoints>1?(n=l.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:s*parseInt(l.config.plotOptions.bar.columnWidth,10)/100,o=this.baseLineY[this.yaxisIndex]+(this.isReversed?l.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),e=l.globals.padHorizontal+(n-s)/2),{x:e,y:t,yDivision:r,xDivision:n,barHeight:a,barWidth:s,zeroH:o,zeroW:i}}},{key:"drawStackedBarPaths",value:function(e){for(var t,n=e.indexes,r=e.barHeight,o=e.strokeWidth,i=e.zeroW,a=e.x,s=e.y,l=e.yDivision,c=e.elSeries,u=this.w,p=s,d=n.i,h=n.j,f=0,g=0;g<this.prevXF.length;g++)f+=this.prevXF[g][h];if(d>0){var v=i;this.prevXVal[d-1][h]<0?v=this.series[d][h]>=0?this.prevX[d-1][h]+f-2*(this.isReversed?f:0):this.prevX[d-1][h]:this.prevXVal[d-1][h]>=0&&(v=this.series[d][h]>=0?this.prevX[d-1][h]:this.prevX[d-1][h]-f+2*(this.isReversed?f:0)),t=v}else t=i;a=null===this.series[d][h]?t:t+this.series[d][h]/this.invertedYRatio-2*(this.isReversed?this.series[d][h]/this.invertedYRatio:0);var m=this.barHelpers.getBarpaths({barYPosition:p,barHeight:r,x1:t,x2:a,strokeWidth:o,series:this.series,realIndex:n.realIndex,i:d,j:h,w:u});return this.barHelpers.barBackground({j:h,i:d,y1:p,y2:r,elSeries:c}),s+=l,{pathTo:m.pathTo,pathFrom:m.pathFrom,x:a,y:s}}},{key:"drawStackedColumnPaths",value:function(e){var t=e.indexes,n=e.x,r=e.y,o=e.xDivision,i=e.barWidth,a=e.zeroH;e.strokeWidth;var s=e.elSeries,l=this.w,c=t.i,u=t.j,p=t.bc;if(l.globals.isXNumeric){var d=l.globals.seriesX[c][u];d||(d=0),n=(d-l.globals.minX)/this.xRatio-i/2}for(var h,f=n,g=0,v=0;v<this.prevYF.length;v++)g+=isNaN(this.prevYF[v][u])?0:this.prevYF[v][u];if(c>0&&!l.globals.isXNumeric||c>0&&l.globals.isXNumeric&&l.globals.seriesX[c-1][u]===l.globals.seriesX[c][u]){var m,y,b=Math.min(this.yRatio.length+1,c+1);if(void 0!==this.prevY[c-1])for(var w=1;w<b;w++)if(!isNaN(this.prevY[c-w][u])){y=this.prevY[c-w][u];break}for(var C=1;C<b;C++){if(this.prevYVal[c-C][u]<0){m=this.series[c][u]>=0?y-g+2*(this.isReversed?g:0):y;break}if(this.prevYVal[c-C][u]>=0){m=this.series[c][u]>=0?y:y+g-2*(this.isReversed?g:0);break}}void 0===m&&(m=l.globals.gridHeight),h=this.prevYF[0].every((function(e){return 0===e}))&&this.prevYF.slice(1,c).every((function(e){return e.every((function(e){return isNaN(e)}))}))?l.globals.gridHeight-a:m}else h=l.globals.gridHeight-a;r=h-this.series[c][u]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[c][u]/this.yRatio[this.yaxisIndex]:0);var x=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:i,y1:h,y2:r,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:t.realIndex,i:c,j:u,w:l});return this.barHelpers.barBackground({bc:p,j:u,i:c,x1:f,x2:i,elSeries:s}),n+=o,{pathTo:x.pathTo,pathFrom:x.pathFrom,x:l.globals.isXNumeric?n-o:n,y:r}}}]),n}(),Ee=function(e){p(n,G);var t=g(n);function n(){return s(this,n),t.apply(this,arguments)}return c(n,[{key:"draw",value:function(e,t){var n=this,r=this.w,o=new x(this.ctx),a=new D(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=r.config.plotOptions.bar.horizontal;var s=new S(this.ctx,r);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);for(var l=o.group({class:"apexcharts-".concat(r.config.chart.type,"-series apexcharts-plot-series")}),c=function(s){n.isBoxPlot="boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[s].type;var c,u,p,d,h,f,g=void 0,v=void 0,m=[],y=[],w=r.globals.comboCharts?t[s]:s,C=o.group({class:"apexcharts-series",seriesName:b.escapeString(r.globals.seriesNames[w]),rel:s+1,"data:realIndex":w});n.ctx.series.addCollapsedClassToSeries(C,w),e[s].length>0&&(n.visibleI=n.visibleI+1),n.yRatio.length>1&&(n.yaxisIndex=w);var x=n.barHelpers.initialPositions();v=x.y,h=x.barHeight,u=x.yDivision,d=x.zeroW,g=x.x,f=x.barWidth,c=x.xDivision,p=x.zeroH,y.push(g+f/2);for(var S=o.group({class:"apexcharts-datalabels","data:realIndex":w}),E=function(t){var o=n.barHelpers.getStrokeWidth(s,t,w),l=null,b={indexes:{i:s,j:t,realIndex:w},x:g,y:v,strokeWidth:o,elSeries:C};l=n.isHorizontal?n.drawHorizontalBoxPaths(i(i({},b),{},{yDivision:u,barHeight:h,zeroW:d})):n.drawVerticalBoxPaths(i(i({},b),{},{xDivision:c,barWidth:f,zeroH:p})),v=l.y,g=l.x,t>0&&y.push(g+f/2),m.push(v),l.pathTo.forEach((function(i,c){var u=!n.isBoxPlot&&n.candlestickOptions.wick.useFillColor?l.color[c]:r.globals.stroke.colors[s],p=a.fillPath({seriesNumber:w,dataPointIndex:t,color:l.color[c],value:e[s][t]});n.renderSeries({realIndex:w,pathFill:p,lineFill:u,j:t,i:s,pathFrom:l.pathFrom,pathTo:i,strokeWidth:o,elSeries:C,x:g,y:v,series:e,barHeight:h,barWidth:f,elDataLabelsWrap:S,visibleSeries:n.visibleI,type:r.config.chart.type})}))},_=0;_<r.globals.dataPoints;_++)E(_);r.globals.seriesXvalues[w]=y,r.globals.seriesYvalues[w]=m,l.add(C)},u=0;u<e.length;u++)c(u);return l}},{key:"drawVerticalBoxPaths",value:function(e){var t=e.indexes,n=e.x;e.y;var r=e.xDivision,o=e.barWidth,i=e.zeroH,a=e.strokeWidth,s=this.w,l=new x(this.ctx),c=t.i,u=t.j,p=!0,d=s.config.plotOptions.candlestick.colors.upward,h=s.config.plotOptions.candlestick.colors.downward,f="";this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var g=this.yRatio[this.yaxisIndex],v=t.realIndex,m=this.getOHLCValue(v,u),y=i,b=i;m.o>m.c&&(p=!1);var w=Math.min(m.o,m.c),C=Math.max(m.o,m.c),S=m.m;s.globals.isXNumeric&&(n=(s.globals.seriesX[v][u]-s.globals.minX)/this.xRatio-o/2);var E=n+o*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(w=i,C=i):(w=i-w/g,C=i-C/g,y=i-m.h/g,b=i-m.l/g,S=i-m.m/g);var _=l.move(E,i),R=l.move(E+o/2,w);return s.globals.previousPaths.length>0&&(R=this.getPreviousPath(v,u,!0)),_=this.isBoxPlot?[l.move(E,w)+l.line(E+o/2,w)+l.line(E+o/2,y)+l.line(E+o/4,y)+l.line(E+o-o/4,y)+l.line(E+o/2,y)+l.line(E+o/2,w)+l.line(E+o,w)+l.line(E+o,S)+l.line(E,S)+l.line(E,w+a/2),l.move(E,S)+l.line(E+o,S)+l.line(E+o,C)+l.line(E+o/2,C)+l.line(E+o/2,b)+l.line(E+o-o/4,b)+l.line(E+o/4,b)+l.line(E+o/2,b)+l.line(E+o/2,C)+l.line(E,C)+l.line(E,S)+"z"]:[l.move(E,C)+l.line(E+o/2,C)+l.line(E+o/2,y)+l.line(E+o/2,C)+l.line(E+o,C)+l.line(E+o,w)+l.line(E+o/2,w)+l.line(E+o/2,b)+l.line(E+o/2,w)+l.line(E,w)+l.line(E,C-a/2)],R+=l.move(E,w),s.globals.isXNumeric||(n+=r),{pathTo:_,pathFrom:R,x:n,y:C,barXPosition:E,color:this.isBoxPlot?f:p?[d]:[h]}}},{key:"drawHorizontalBoxPaths",value:function(e){var t=e.indexes;e.x;var n=e.y,r=e.yDivision,o=e.barHeight,i=e.zeroW,a=e.strokeWidth,s=this.w,l=new x(this.ctx),c=t.i,u=t.j,p=this.boxOptions.colors.lower;this.isBoxPlot&&(p=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var d=this.invertedYRatio,h=t.realIndex,f=this.getOHLCValue(h,u),g=i,v=i,m=Math.min(f.o,f.c),y=Math.max(f.o,f.c),b=f.m;s.globals.isXNumeric&&(n=(s.globals.seriesX[h][u]-s.globals.minX)/this.invertedXRatio-o/2);var w=n+o*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(m=i,y=i):(m=i+m/d,y=i+y/d,g=i+f.h/d,v=i+f.l/d,b=i+f.m/d);var C=l.move(i,w),S=l.move(m,w+o/2);return s.globals.previousPaths.length>0&&(S=this.getPreviousPath(h,u,!0)),C=[l.move(m,w)+l.line(m,w+o/2)+l.line(g,w+o/2)+l.line(g,w+o/2-o/4)+l.line(g,w+o/2+o/4)+l.line(g,w+o/2)+l.line(m,w+o/2)+l.line(m,w+o)+l.line(b,w+o)+l.line(b,w)+l.line(m+a/2,w),l.move(b,w)+l.line(b,w+o)+l.line(y,w+o)+l.line(y,w+o/2)+l.line(v,w+o/2)+l.line(v,w+o-o/4)+l.line(v,w+o/4)+l.line(v,w+o/2)+l.line(y,w+o/2)+l.line(y,w)+l.line(b,w)+"z"],S+=l.move(m,w),s.globals.isXNumeric||(n+=r),{pathTo:C,pathFrom:S,x:y,y:n,barYPosition:w,color:p}}},{key:"getOHLCValue",value:function(e,t){var n=this.w;return{o:this.isBoxPlot?n.globals.seriesCandleH[e][t]:n.globals.seriesCandleO[e][t],h:this.isBoxPlot?n.globals.seriesCandleO[e][t]:n.globals.seriesCandleH[e][t],m:n.globals.seriesCandleM[e][t],l:this.isBoxPlot?n.globals.seriesCandleC[e][t]:n.globals.seriesCandleL[e][t],c:this.isBoxPlot?n.globals.seriesCandleL[e][t]:n.globals.seriesCandleC[e][t]}}}]),n}(),_e=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,n=e.config.plotOptions[e.config.chart.type];return n.colorScale.ranges.length>0&&n.colorScale.ranges.map((function(e,n){e.from<=0&&(t=!0)})),t}},{key:"getShadeColor",value:function(e,t,n,r){var o=this.w,i=1,a=o.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,n);o.globals.hasNegs||r?i=o.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*a):(1-s.percent/100)*(1.25*a):s.percent<=0?1-(1+s.percent/100)*a:(1-s.percent/100)*a:(i=1-s.percent/100,"treemap"===e&&(i=(1-s.percent/100)*(1.25*a)));var l=s.color,c=new b;return o.config.plotOptions[e].enableShades&&(l="dark"===this.w.config.theme.mode?b.hexToRgba(c.shadeColor(-1*i,s.color),o.config.fill.opacity):b.hexToRgba(c.shadeColor(i,s.color),o.config.fill.opacity)),{color:l,colorProps:s}}},{key:"determineColor",value:function(e,t,n){var r=this.w,o=r.globals.series[t][n],i=r.config.plotOptions[e],a=i.colorScale.inverse?n:t;i.distributed&&"treemap"===r.config.chart.type&&(a=n);var s=r.globals.colors[a],l=null,c=Math.min.apply(Math,v(r.globals.series[t])),u=Math.max.apply(Math,v(r.globals.series[t]));i.distributed||"heatmap"!==e||(c=r.globals.minY,u=r.globals.maxY),void 0!==i.colorScale.min&&(c=i.colorScale.min<r.globals.minY?i.colorScale.min:r.globals.minY,u=i.colorScale.max>r.globals.maxY?i.colorScale.max:r.globals.maxY);var p=Math.abs(u)+Math.abs(c),d=100*o/(0===p?p-1e-6:p);return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(e,t){if(o>=e.from&&o<=e.to){s=e.color,l=e.foreColor?e.foreColor:null,c=e.from,u=e.to;var n=Math.abs(u)+Math.abs(c);d=100*o/(0===n?n-1e-6:n)}})),{color:s,foreColor:l,percent:d}}},{key:"calculateDataLabels",value:function(e){var t=e.text,n=e.x,r=e.y,o=e.i,i=e.j,a=e.colorProps,s=e.fontSize,l=this.w.config.dataLabels,c=new x(this.ctx),u=new M(this.ctx),p=null;if(l.enabled){p=c.group({class:"apexcharts-data-labels"});var d=l.offsetX,h=l.offsetY,f=n+d,g=r+parseFloat(l.style.fontSize)/3+h;u.plotDataLabelsText({x:f,y:g,text:t,i:o,j:i,color:a.foreColor,parent:p,fontSize:s,dataLabelsConfig:l})}return p}},{key:"addListeners",value:function(e){var t=new x(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),e}(),Re=function(){function e(t,n){s(this,e),this.ctx=t,this.w=t.w,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new _e(t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return c(e,[{key:"draw",value:function(e){var t=this.w,n=new x(this.ctx),r=n.group({class:"apexcharts-heatmap"});r.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var o=t.globals.gridWidth/t.globals.dataPoints,i=t.globals.gridHeight/t.globals.series.length,a=0,s=!1;this.negRange=this.helpers.checkColorRange();var l=e.slice();t.config.yaxis[0].reversed&&(s=!0,l.reverse());for(var c=s?0:l.length-1;s?c<l.length:c>=0;s?c++:c--){var u=n.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:b.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(u,c),t.config.chart.dropShadow.enabled){var p=t.config.chart.dropShadow;new C(this.ctx).dropShadow(u,p,c)}for(var d=0,h=t.config.plotOptions.heatmap.shadeIntensity,f=0;f<l[c].length;f++){var g=this.helpers.getShadeColor(t.config.chart.type,c,f,this.negRange),v=g.color,m=g.colorProps;"image"===t.config.fill.type&&(v=new D(this.ctx).fillPath({seriesNumber:c,dataPointIndex:f,opacity:t.globals.hasNegs?m.percent<0?1-(1+m.percent/100):h+m.percent/100:m.percent/100,patternID:b.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:o,height:t.config.fill.image.height?t.config.fill.image.height:i}));var y=this.rectRadius,w=n.drawRect(d,a,o,i,y);if(w.attr({cx:d,cy:a}),w.node.classList.add("apexcharts-heatmap-rect"),u.add(w),w.attr({fill:v,i:c,index:c,j:f,val:l[c][f],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?v:t.globals.stroke.colors[0],color:v}),this.helpers.addListeners(w),t.config.chart.animations.enabled&&!t.globals.dataChanged){var S=1;t.globals.resized||(S=t.config.chart.animations.speed),this.animateHeatMap(w,d,a,o,i,S)}if(t.globals.dataChanged){var E=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){E=this.dynamicAnim.speed;var _=t.globals.previousPaths[c]&&t.globals.previousPaths[c][f]&&t.globals.previousPaths[c][f].color;_||(_="rgba(255, 255, 255, 0)"),this.animateHeatColor(w,b.isColorHex(_)?_:b.rgb2hex(_),b.isColorHex(v)?v:b.rgb2hex(v),E)}}var R=(0,t.config.dataLabels.formatter)(t.globals.series[c][f],{value:t.globals.series[c][f],seriesIndex:c,dataPointIndex:f,w:t}),O=this.helpers.calculateDataLabels({text:R,x:d+o/2,y:a+i/2,i:c,j:f,colorProps:m,series:l});null!==O&&u.add(O),d+=o}a+=i,r.add(u)}var A=t.globals.yAxisScale[0].result.slice();t.config.yaxis[0].reversed?A.unshift(""):A.push(""),t.globals.yAxisScale[0].result=A;var P=t.globals.gridHeight/t.globals.series.length;return t.config.yaxis[0].labels.offsetY=-P/2,r}},{key:"animateHeatMap",value:function(e,t,n,r,o,i){var a=new w(this.ctx);a.animateRect(e,{x:t+r/2,y:n+o/2,width:0,height:0},{x:t,y:n,width:r,height:o},i,(function(){a.animationCompleted(e)}))}},{key:"animateHeatColor",value:function(e,t,n,r){e.attr({fill:t}).animate(r).attr({fill:n})}}]),e}(),Oe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"drawYAxisTexts",value:function(e,t,n,r){var o=this.w,i=o.config.yaxis[0],a=o.globals.yLabelFormatters[0];return new x(this.ctx).drawText({x:e+i.labels.offsetX,y:t+i.labels.offsetY,text:a(r,n),textAnchor:"middle",fontSize:i.labels.style.fontSize,fontFamily:i.labels.style.fontFamily,foreColor:Array.isArray(i.labels.style.colors)?i.labels.style.colors[n]:i.labels.style.colors})}}]),e}(),Ae=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var n=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==n.globals.stroke.colors?n.globals.stroke.colors:n.globals.colors,this.defaultSize=Math.min(n.globals.gridWidth,n.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=n.globals.gridWidth/2,"radialBar"===n.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(n.config.plotOptions.pie.endAngle-n.config.plotOptions.pie.startAngle),this.initialAngle=n.config.plotOptions.pie.startAngle%this.fullAngle,n.globals.radialSize=this.defaultSize/2.05-n.config.stroke.width-(n.config.chart.sparkline.enabled?0:n.config.chart.dropShadow.blur),this.donutSize=n.globals.radialSize*parseInt(n.config.plotOptions.pie.donut.size,10)/100,this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return c(e,[{key:"draw",value:function(e){var t=this,n=this.w,r=new x(this.ctx);if(this.ret=r.group({class:"apexcharts-pie"}),n.globals.noData)return this.ret;for(var o=0,i=0;i<e.length;i++)o+=b.negToZero(e[i]);var a=[],s=r.group();0===o&&(o=1e-5),e.forEach((function(e){t.maxY=Math.max(t.maxY,e)})),n.config.yaxis[0].max&&(this.maxY=n.config.yaxis[0].max),"back"===n.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret);for(var l=0;l<e.length;l++){var c=this.fullAngle*b.negToZero(e[l])/o;a.push(c),"polarArea"===this.chartType?(a[l]=this.fullAngle/e.length,this.sliceSizes.push(n.globals.radialSize*e[l]/this.maxY)):this.sliceSizes.push(n.globals.radialSize)}if(n.globals.dataChanged){for(var u,p=0,d=0;d<n.globals.previousPaths.length;d++)p+=b.negToZero(n.globals.previousPaths[d]);for(var h=0;h<n.globals.previousPaths.length;h++)u=this.fullAngle*b.negToZero(n.globals.previousPaths[h])/p,this.prevSectorAngleArr.push(u)}this.donutSize<0&&(this.donutSize=0);var f=n.config.plotOptions.pie.customScale,g=n.globals.gridWidth/2,v=n.globals.gridHeight/2,m=g-n.globals.gridWidth/2*f,y=v-n.globals.gridHeight/2*f;if("donut"===this.chartType){var w=r.drawCircle(this.donutSize);w.attr({cx:this.centerX,cy:this.centerY,fill:n.config.plotOptions.pie.donut.background?n.config.plotOptions.pie.donut.background:"transparent"}),s.add(w)}var C=this.drawArcs(a,e);if(this.sliceLabels.forEach((function(e){C.add(e)})),s.attr({transform:"translate(".concat(m,", ").concat(y,") scale(").concat(f,")")}),s.add(C),this.ret.add(s),this.donutDataLabels.show){var S=this.renderInnerDataLabels(this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show,translateX:m,translateY:y});this.ret.add(S)}return"front"===n.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret),this.ret}},{key:"drawArcs",value:function(e,t){var n=this.w,r=new C(this.ctx),o=new x(this.ctx),i=new D(this.ctx),a=o.group({class:"apexcharts-slices"}),s=this.initialAngle,l=this.initialAngle,c=this.initialAngle,u=this.initialAngle;this.strokeWidth=n.config.stroke.show?n.config.stroke.width:0;for(var p=0;p<e.length;p++){var d=o.group({class:"apexcharts-series apexcharts-pie-series",seriesName:b.escapeString(n.globals.seriesNames[p]),rel:p+1,"data:realIndex":p});a.add(d),l=u,c=(s=c)+e[p],u=l+this.prevSectorAngleArr[p];var h=c<s?this.fullAngle+c-s:c-s,f=i.fillPath({seriesNumber:p,size:this.sliceSizes[p],value:t[p]}),g=this.getChangedPath(l,u),v=o.drawPath({d:g,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[p]:this.lineColorArr,strokeWidth:0,fill:f,fillOpacity:n.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(p)});if(v.attr({index:0,j:p}),r.setSelectionFilter(v,0,p),n.config.chart.dropShadow.enabled){var m=n.config.chart.dropShadow;r.dropShadow(v,m,p)}this.addListeners(v,this.donutDataLabels),x.setAttrs(v.node,{"data:angle":h,"data:startAngle":s,"data:strokeWidth":this.strokeWidth,"data:value":t[p]});var y={x:0,y:0};"pie"===this.chartType||"polarArea"===this.chartType?y=b.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize/1.25+n.config.plotOptions.pie.dataLabels.offset,(s+h/2)%this.fullAngle):"donut"===this.chartType&&(y=b.polarToCartesian(this.centerX,this.centerY,(n.globals.radialSize+this.donutSize)/2+n.config.plotOptions.pie.dataLabels.offset,(s+h/2)%this.fullAngle)),d.add(v);var w=0;if(!this.initialAnim||n.globals.resized||n.globals.dataChanged?this.animBeginArr.push(0):(0===(w=h/this.fullAngle*n.config.chart.animations.speed)&&(w=1),this.animDur=w+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&n.globals.dataChanged?this.animatePaths(v,{size:this.sliceSizes[p],endAngle:c,startAngle:s,prevStartAngle:l,prevEndAngle:u,animateStartingPos:!0,i:p,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:n.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(v,{size:this.sliceSizes[p],endAngle:c,startAngle:s,i:p,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:w}),n.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&v.click(this.pieClicked.bind(this,p)),void 0!==n.globals.selectedDataPoints[0]&&n.globals.selectedDataPoints[0].indexOf(p)>-1&&this.pieClicked(p),n.config.dataLabels.enabled){var S=y.x,E=y.y,_=100*h/this.fullAngle+"%";if(0!==h&&n.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[p]){var R=n.config.dataLabels.formatter;void 0!==R&&(_=R(n.globals.seriesPercent[p][0],{seriesIndex:p,w:n}));var O=n.globals.dataLabels.style.colors[p],A=o.group({class:"apexcharts-datalabels"}),P=o.drawText({x:S,y:E,text:_,textAnchor:"middle",fontSize:n.config.dataLabels.style.fontSize,fontFamily:n.config.dataLabels.style.fontFamily,fontWeight:n.config.dataLabels.style.fontWeight,foreColor:O});if(A.add(P),n.config.dataLabels.dropShadow.enabled){var T=n.config.dataLabels.dropShadow;r.dropShadow(P,T)}P.node.classList.add("apexcharts-pie-label"),n.config.chart.animations.animate&&!1===n.globals.resized&&(P.node.classList.add("apexcharts-pie-label-delay"),P.node.style.animationDelay=n.config.chart.animations.speed/940+"s"),this.sliceLabels.push(A)}}}return a}},{key:"addListeners",value:function(e,t){var n=new x(this.ctx);e.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",n.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}},{key:"animatePaths",value:function(e,t){var n=this.w,r=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,o=r,i=t.startAngle,a=t.startAngle;void 0!==t.prevStartAngle&&void 0!==t.prevEndAngle&&(i=t.prevEndAngle,o=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===n.config.series.length-1&&(r+a>this.fullAngle?t.endAngle=t.endAngle-(r+a):r+a<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(r+a)))),r===this.fullAngle&&(r=this.fullAngle-.01),this.animateArc(e,i,a,r,o,t)}},{key:"animateArc",value:function(e,t,n,r,o,i){var a,s=this,l=this.w,c=new w(this.ctx),u=i.size;(isNaN(t)||isNaN(o))&&(t=n,o=r,i.dur=0);var p=r,d=n,h=t<n?this.fullAngle+t-n:t-n;l.globals.dataChanged&&i.shouldSetPrevPaths&&i.prevEndAngle&&(a=s.getPiePath({me:s,startAngle:i.prevStartAngle,angle:i.prevEndAngle<i.prevStartAngle?this.fullAngle+i.prevEndAngle-i.prevStartAngle:i.prevEndAngle-i.prevStartAngle,size:u}),e.attr({d:a})),0!==i.dur?e.animate(i.dur,l.globals.easing,i.animBeginArr[i.i]).afterAll((function(){"pie"!==s.chartType&&"donut"!==s.chartType&&"polarArea"!==s.chartType||this.animate(l.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":s.strokeWidth}),i.i===l.config.series.length-1&&c.animationCompleted(e)})).during((function(l){p=h+(r-h)*l,i.animateStartingPos&&(p=o+(r-o)*l,d=t-o+(n-(t-o))*l),a=s.getPiePath({me:s,startAngle:d,angle:p,size:u}),e.node.setAttribute("data:pathOrig",a),e.attr({d:a})})):(a=s.getPiePath({me:s,startAngle:d,angle:r,size:u}),i.isTrack||(l.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",a),e.attr({d:a,"stroke-width":s.strokeWidth}))}},{key:"pieClicked",value:function(e){var t,n=this.w,r=this,o=r.sliceSizes[e]+(n.config.plotOptions.pie.expandOnClick?4:0),i=n.globals.dom.Paper.select(".apexcharts-".concat(r.chartType.toLowerCase(),"-slice-").concat(e)).members[0];if("true"!==i.attr("data:pieClicked")){var a=n.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(a,(function(e){e.setAttribute("data:pieClicked","false");var t=e.getAttribute("data:pathOrig");e.setAttribute("d",t)})),i.attr("data:pieClicked","true");var s=parseInt(i.attr("data:startAngle"),10),l=parseInt(i.attr("data:angle"),10);t=r.getPiePath({me:r,startAngle:s,angle:l,size:o}),360!==l&&i.plot(t)}else{i.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(i.node,this.donutDataLabels);var c=i.attr("data:pathOrig");i.attr({d:c})}}},{key:"getChangedPath",value:function(e,t){var n="";return this.dynamicAnim&&this.w.globals.dataChanged&&(n=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),n}},{key:"getPiePath",value:function(e){var t=e.me,n=e.startAngle,r=e.angle,o=e.size,i=n,a=Math.PI*(i-90)/180,s=r+n;Math.ceil(s)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(s=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(s)>this.fullAngle&&(s-=this.fullAngle);var l=Math.PI*(s-90)/180,c=t.centerX+o*Math.cos(a),u=t.centerY+o*Math.sin(a),p=t.centerX+o*Math.cos(l),d=t.centerY+o*Math.sin(l),h=b.polarToCartesian(t.centerX,t.centerY,t.donutSize,s),f=b.polarToCartesian(t.centerX,t.centerY,t.donutSize,i),g=r>180?1:0,v=["M",c,u,"A",o,o,0,g,1,p,d];return"donut"===t.chartType?[].concat(v,["L",h.x,h.y,"A",t.donutSize,t.donutSize,0,g,0,f.x,f.y,"L",c,u,"z"]).join(" "):"pie"===t.chartType||"polarArea"===t.chartType?[].concat(v,["L",t.centerX,t.centerY,"L",c,u]).join(" "):[].concat(v).join(" ")}},{key:"drawPolarElements",value:function(e){var t=this.w,n=new Q(this.ctx),r=new x(this.ctx),o=new Oe(this.ctx),i=r.group(),a=r.group(),s=n.niceScale(0,Math.ceil(this.maxY),t.config.yaxis[0].tickAmount,0,!0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var u=t.globals.radialSize,p=u/(c-1),d=0;d<c-1;d++){var h=r.drawCircle(u);if(h.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){var f=o.drawYAxisTexts(this.centerX,this.centerY-u+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,d,l[d]);a.add(f)}i.add(h),u-=p}this.drawSpokes(e),e.add(i),e.add(a)}},{key:"renderInnerDataLabels",value:function(e,t){var n=this.w,r=new x(this.ctx),o=r.group({class:"apexcharts-datalabels-group",transform:"translate(".concat(t.translateX?t.translateX:0,", ").concat(t.translateY?t.translateY:0,") scale(").concat(n.config.plotOptions.pie.customScale,")")}),i=e.total.show;o.node.style.opacity=t.opacity;var a,s,l=t.centerX,c=t.centerY;a=void 0===e.name.color?n.globals.colors[0]:e.name.color;var u=e.name.fontSize,p=e.name.fontFamily,d=e.name.fontWeight;s=void 0===e.value.color?n.config.chart.foreColor:e.value.color;var h=e.value.formatter,f="",g="";if(i?(a=e.total.color,u=e.total.fontSize,p=e.total.fontFamily,d=e.total.fontWeight,g=e.total.label,f=e.total.formatter(n)):1===n.globals.series.length&&(f=h(n.globals.series[0],n),g=n.globals.seriesNames[0]),g&&(g=e.name.formatter(g,e.total.show,n)),e.name.show){var v=r.drawText({x:l,y:c+parseFloat(e.name.offsetY),text:g,textAnchor:"middle",foreColor:a,fontSize:u,fontWeight:d,fontFamily:p});v.node.classList.add("apexcharts-datalabel-label"),o.add(v)}if(e.value.show){var m=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,y=r.drawText({x:l,y:c+m,text:f,textAnchor:"middle",foreColor:s,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});y.node.classList.add("apexcharts-datalabel-value"),o.add(y)}return o}},{key:"printInnerLabels",value:function(e,t,n,r){var o,i=this.w;r?o=void 0===e.name.color?i.globals.colors[parseInt(r.parentNode.getAttribute("rel"),10)-1]:e.name.color:i.globals.series.length>1&&e.total.show&&(o=e.total.color);var a=i.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");n=(0,e.value.formatter)(n,i),r||"function"!=typeof e.total.formatter||(n=e.total.formatter(i));var l=t===e.total.label;t=e.name.formatter(t,l,i),null!==a&&(a.textContent=t),null!==s&&(s.textContent=n),null!==a&&(a.style.fill=o)}},{key:"printDataLabelsInner",value:function(e,t){var n=this.w,r=e.getAttribute("data:value"),o=n.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];n.globals.series.length>1&&this.printInnerLabels(t,o,r,e);var i=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==i&&(i.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,n=this.w,r=new x(this.ctx),o=n.config.plotOptions.polarArea.spokes;if(0!==o.strokeWidth){for(var i=[],a=360/n.globals.series.length,s=0;s<n.globals.series.length;s++)i.push(b.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize,n.config.plotOptions.pie.startAngle+a*s));i.forEach((function(n,i){var a=r.drawLine(n.x,n.y,t.centerX,t.centerY,Array.isArray(o.connectorColors)?o.connectorColors[i]:o.connectorColors);e.add(a)}))}}},{key:"revertDataLabelsInner",value:function(e,t,n){var r=this,o=this.w,i=o.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group"),a=!1,s=o.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area"),l=function(e){var n=e.makeSliceOut,o=e.printLabel;Array.prototype.forEach.call(s,(function(e){"true"===e.getAttribute("data:pieClicked")&&(n&&(a=!0),o&&r.printDataLabelsInner(e,t))}))};if(l({makeSliceOut:!0,printLabel:!1}),t.total.show&&o.globals.series.length>1)a&&!t.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(t,t.total.label,t.total.formatter(o));else if(l({makeSliceOut:!1,printLabel:!0}),!a)if(o.globals.selectedDataPoints.length&&o.globals.series.length>1)if(o.globals.selectedDataPoints[0].length>0){var c=o.globals.selectedDataPoints[0],u=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(u,t)}else i&&o.globals.selectedDataPoints.length&&0===o.globals.selectedDataPoints[0].length&&(i.style.opacity=0);else i&&o.globals.series.length>1&&(i.style.opacity=0)}}]),e}(),Pe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new x(this.ctx),this.lineColorArr=void 0!==n.globals.stroke.colors?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight<n.globals.svgWidth?n.globals.gridHeight+1.5*n.globals.goldenPadding:n.globals.gridWidth,this.isLog=n.config.yaxis[0].logarithmic,this.coreUtils=new S(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(n.globals.maxY,0):n.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.w.globals.minY,0):n.globals.minY,this.polygons=n.config.plotOptions.radar.polygons,this.strokeWidth=n.config.stroke.show?n.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-n.config.chart.dropShadow.blur,n.config.xaxis.labels.show&&(this.size=this.size-n.globals.xAxisLabelsWidth/1.75),void 0!==n.config.plotOptions.radar.size&&(this.size=n.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return c(e,[{key:"draw",value:function(e){var t=this,n=this.w,r=new D(this.ctx),o=[],a=new M(this.ctx);e.length&&(this.dataPointsLen=e[n.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var s=n.globals.gridWidth/2,l=n.globals.gridHeight/2,c=s+n.config.plotOptions.radar.offsetX,u=l+n.config.plotOptions.radar.offsetY,p=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(c||0,", ").concat(u||0,")")}),d=[],h=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach((function(e,s){var l=e.length===n.globals.dataPoints,c=t.graphics.group().attr({class:"apexcharts-series","data:longestSeries":l,seriesName:b.escapeString(n.globals.seriesNames[s]),rel:s+1,"data:realIndex":s});t.dataRadiusOfPercent[s]=[],t.dataRadius[s]=[],t.angleArr[s]=[],e.forEach((function(e,n){var r=Math.abs(t.maxValue-t.minValue);e+=Math.abs(t.minValue),t.isLog&&(e=t.coreUtils.getLogVal(e,0)),t.dataRadiusOfPercent[s][n]=e/r,t.dataRadius[s][n]=t.dataRadiusOfPercent[s][n]*t.size,t.angleArr[s][n]=n*t.disAngle})),d=t.getDataPointsPos(t.dataRadius[s],t.angleArr[s]);var u=t.createPaths(d,{x:0,y:0});h=t.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=t.graphics.group({class:"apexcharts-datalabels","data:realIndex":s}),n.globals.delayedElements.push({el:h.node,index:s});var p={i:s,realIndex:s,animationDelay:s,initialSpeed:n.config.chart.animations.speed,dataChangeSpeed:n.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:n.globals.stroke.colors[s],strokeLineCap:n.config.stroke.lineCap},g=null;n.globals.previousPaths.length>0&&(g=t.getPreviousPath(s));for(var v=0;v<u.linePathsTo.length;v++){var m=t.graphics.renderPaths(i(i({},p),{},{pathFrom:null===g?u.linePathsFrom[v]:g,pathTo:u.linePathsTo[v],strokeWidth:Array.isArray(t.strokeWidth)?t.strokeWidth[s]:t.strokeWidth,fill:"none",drawShadow:!1}));c.add(m);var y=r.fillPath({seriesNumber:s}),w=t.graphics.renderPaths(i(i({},p),{},{pathFrom:null===g?u.areaPathsFrom[v]:g,pathTo:u.areaPathsTo[v],strokeWidth:0,fill:y,drawShadow:!1}));if(n.config.chart.dropShadow.enabled){var x=new C(t.ctx),S=n.config.chart.dropShadow;x.dropShadow(w,Object.assign({},S,{noUserSpaceOnUse:!0}),s)}c.add(w)}e.forEach((function(e,r){var o=new k(t.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:s,dataPointIndex:r}),l=t.graphics.drawMarker(d[r].x,d[r].y,o);l.attr("rel",r),l.attr("j",r),l.attr("index",s),l.node.setAttribute("default-marker-size",o.pSize);var u=t.graphics.group({class:"apexcharts-series-markers"});u&&u.add(l),h.add(u),c.add(h);var p=n.config.dataLabels;if(p.enabled){var g=p.formatter(n.globals.series[s][r],{seriesIndex:s,dataPointIndex:r,w:n});a.plotDataLabelsText({x:d[r].x,y:d[r].y,text:g,textAnchor:"middle",i:s,j:s,parent:f,offsetCorrection:!1,dataLabelsConfig:i({},p)})}c.add(f)})),o.push(c)})),this.drawPolygons({parent:p}),n.config.xaxis.labels.show){var g=this.drawXAxisTexts();p.add(g)}return o.forEach((function(e){p.add(e)})),p.add(this.yaxisLabels),p}},{key:"drawPolygons",value:function(e){for(var t=this,n=this.w,r=e.parent,o=new Oe(this.ctx),i=n.globals.yAxisScale[0].result.reverse(),a=i.length,s=[],l=this.size/(a-1),c=0;c<a;c++)s[c]=l*c;s.reverse();var u=[],p=[];s.forEach((function(e,n){var r=b.getPolygonPos(e,t.dataPointsLen),o="";r.forEach((function(e,r){if(0===n){var i=t.graphics.drawLine(e.x,e.y,0,0,Array.isArray(t.polygons.connectorColors)?t.polygons.connectorColors[r]:t.polygons.connectorColors);p.push(i)}0===r&&t.yaxisLabelsTextsPos.push({x:e.x,y:e.y}),o+=e.x+","+e.y+" "})),u.push(o)})),u.forEach((function(e,o){var i=t.polygons.strokeColors,a=t.polygons.strokeWidth,s=t.graphics.drawPolygon(e,Array.isArray(i)?i[o]:i,Array.isArray(a)?a[o]:a,n.globals.radarPolygons.fill.colors[o]);r.add(s)})),p.forEach((function(e){r.add(e)})),n.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((function(e,n){var r=o.drawYAxisTexts(e.x,e.y,n,i[n]);t.yaxisLabels.add(r)}))}},{key:"drawXAxisTexts",value:function(){var e=this,t=this.w,n=t.config.xaxis.labels,r=this.graphics.group({class:"apexcharts-xaxis"}),o=b.getPolygonPos(this.size,this.dataPointsLen);return t.globals.labels.forEach((function(a,s){var l=t.config.xaxis.labels.formatter,c=new M(e.ctx);if(o[s]){var u=e.getTextPos(o[s],e.size),p=l(a,{seriesIndex:-1,dataPointIndex:s,w:t});c.plotDataLabelsText({x:u.newX,y:u.newY,text:p,textAnchor:u.textAnchor,i:s,j:s,parent:r,color:Array.isArray(n.style.colors)&&n.style.colors[s]?n.style.colors[s]:"#a8a8a8",dataLabelsConfig:i({textAnchor:u.textAnchor,dropShadow:{enabled:!1}},n),offsetCorrection:!1})}})),r}},{key:"createPaths",value:function(e,t){var n=this,r=[],o=[],i=[],a=[];if(e.length){o=[this.graphics.move(t.x,t.y)],a=[this.graphics.move(t.x,t.y)];var s=this.graphics.move(e[0].x,e[0].y),l=this.graphics.move(e[0].x,e[0].y);e.forEach((function(t,r){s+=n.graphics.line(t.x,t.y),l+=n.graphics.line(t.x,t.y),r===e.length-1&&(s+="Z",l+="Z")})),r.push(s),i.push(l)}return{linePathsFrom:o,linePathsTo:r,areaPathsFrom:a,areaPathsTo:i}}},{key:"getTextPos",value:function(e,t){var n="middle",r=e.x,o=e.y;return Math.abs(e.x)>=10?e.x>0?(n="start",r+=10):e.x<0&&(n="end",r-=10):n="middle",Math.abs(e.y)>=t-10&&(e.y<0?o-=10:e.y>0&&(o+=10)),{textAnchor:n,newX:r,newY:o}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,n=null,r=0;r<t.globals.previousPaths.length;r++){var o=t.globals.previousPaths[r];o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(e,10)&&void 0!==t.globals.previousPaths[r].paths[0]&&(n=t.globals.previousPaths[r].paths[0].d)}return n}},{key:"getDataPointsPos",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var r=[],o=0;o<n;o++){var i={};i.x=e[o]*Math.sin(t[o]),i.y=-e[o]*Math.cos(t[o]),r.push(i)}return r}}]),e}(),Te=function(e){p(n,Ae);var t=g(n);function n(e){var r;s(this,n),(r=t.call(this,e)).ctx=e,r.w=e.w,r.animBeginArr=[0],r.animDur=0;var o=r.w;return r.startAngle=o.config.plotOptions.radialBar.startAngle,r.endAngle=o.config.plotOptions.radialBar.endAngle,r.totalAngle=Math.abs(o.config.plotOptions.radialBar.endAngle-o.config.plotOptions.radialBar.startAngle),r.trackStartAngle=o.config.plotOptions.radialBar.track.startAngle,r.trackEndAngle=o.config.plotOptions.radialBar.track.endAngle,r.donutDataLabels=r.w.config.plotOptions.radialBar.dataLabels,r.radialDataLabels=r.donutDataLabels,r.trackStartAngle||(r.trackStartAngle=r.startAngle),r.trackEndAngle||(r.trackEndAngle=r.endAngle),360===r.endAngle&&(r.endAngle=359.99),r.margin=parseInt(o.config.plotOptions.radialBar.track.margin,10),r}return c(n,[{key:"draw",value:function(e){var t=this.w,n=new x(this.ctx),r=n.group({class:"apexcharts-radialbar"});if(t.globals.noData)return r;var o=n.group(),i=this.defaultSize/2,a=t.globals.gridWidth/2,s=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(s=s-t.config.stroke.width-t.config.chart.dropShadow.blur);var l=t.globals.fill.colors;if(t.config.plotOptions.radialBar.track.show){var c=this.drawTracks({size:s,centerX:a,centerY:i,colorArr:l,series:e});o.add(c)}var u=this.drawArcs({size:s,centerX:a,centerY:i,colorArr:l,series:e}),p=360;t.config.plotOptions.radialBar.startAngle<0&&(p=this.totalAngle);var d=(360-p)/360;if(t.globals.radialSize=s-s*d,this.radialDataLabels.value.show){var h=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=h*d}return o.add(u.g),"front"===t.config.plotOptions.radialBar.hollow.position&&(u.g.add(u.elHollow),u.dataLabels&&u.g.add(u.dataLabels)),r.add(o),r}},{key:"drawTracks",value:function(e){var t=this.w,n=new x(this.ctx),r=n.group({class:"apexcharts-tracks"}),o=new C(this.ctx),i=new D(this.ctx),a=this.getStrokeWidth(e);e.size=e.size-a/2;for(var s=0;s<e.series.length;s++){var l=n.group({class:"apexcharts-radialbar-track apexcharts-track"});r.add(l),l.attr({rel:s+1}),e.size=e.size-a-this.margin;var c=t.config.plotOptions.radialBar.track,u=i.fillPath({seriesNumber:0,size:e.size,fillColors:Array.isArray(c.background)?c.background[s]:c.background,solid:!0}),p=this.trackStartAngle,d=this.trackEndAngle;Math.abs(d)+Math.abs(p)>=360&&(d=360-Math.abs(this.startAngle)-.1);var h=n.drawPath({d:"",stroke:u,strokeWidth:a*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var f=c.dropShadow;o.dropShadow(h,f)}l.add(h),h.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(h,{centerX:e.centerX,centerY:e.centerY,endAngle:d,startAngle:p,size:e.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:t.globals.easing})}return r}},{key:"drawArcs",value:function(e){var t=this.w,n=new x(this.ctx),r=new D(this.ctx),o=new C(this.ctx),i=n.group(),a=this.getStrokeWidth(e);e.size=e.size-a/2;var s=t.config.plotOptions.radialBar.hollow.background,l=e.size-a*e.series.length-this.margin*e.series.length-a*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-t.config.plotOptions.radialBar.hollow.margin;void 0!==t.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(e,i,l,s));var u=this.drawHollow({size:c,centerX:e.centerX,centerY:e.centerY,fill:s||"transparent"});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){var p=t.config.plotOptions.radialBar.hollow.dropShadow;o.dropShadow(u,p)}var d=1;!this.radialDataLabels.total.show&&t.globals.series.length>1&&(d=0);var h=null;this.radialDataLabels.show&&(h=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:e.centerX,centerY:e.centerY,opacity:d})),"back"===t.config.plotOptions.radialBar.hollow.position&&(i.add(u),h&&i.add(h));var f=!1;t.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var g=f?e.series.length-1:0;f?g>=0:g<e.series.length;f?g--:g++){var v=n.group({class:"apexcharts-series apexcharts-radial-series",seriesName:b.escapeString(t.globals.seriesNames[g])});i.add(v),v.attr({rel:g+1,"data:realIndex":g}),this.ctx.series.addCollapsedClassToSeries(v,g),e.size=e.size-a-this.margin;var m=r.fillPath({seriesNumber:g,size:e.size,value:e.series[g]}),y=this.startAngle,w=void 0,S=b.negToZero(e.series[g]>100?100:e.series[g])/100,E=Math.round(this.totalAngle*S)+this.startAngle,_=void 0;t.globals.dataChanged&&(w=this.startAngle,_=Math.round(this.totalAngle*b.negToZero(t.globals.previousPaths[g])/100)+w),Math.abs(E)+Math.abs(y)>=360&&(E-=.01),Math.abs(_)+Math.abs(w)>=360&&(_-=.01);var R=E-y,O=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[g]:t.config.stroke.dashArray,A=n.drawPath({d:"",stroke:m,strokeWidth:a,fill:"none",fillOpacity:t.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+g,strokeDashArray:O});if(x.setAttrs(A.node,{"data:angle":R,"data:value":e.series[g]}),t.config.chart.dropShadow.enabled){var P=t.config.chart.dropShadow;o.dropShadow(A,P,g)}o.setSelectionFilter(A,0,g),this.addListeners(A,this.radialDataLabels),v.add(A),A.attr({index:0,j:g});var T=0;!this.initialAnim||t.globals.resized||t.globals.dataChanged||(T=t.config.chart.animations.speed),t.globals.dataChanged&&(T=t.config.chart.animations.dynamicAnimation.speed),this.animDur=T/(1.2*e.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(A,{centerX:e.centerX,centerY:e.centerY,endAngle:E,startAngle:y,prevEndAngle:_,prevStartAngle:w,size:e.size,i:g,totalItems:2,animBeginArr:this.animBeginArr,dur:T,shouldSetPrevPaths:!0,easing:t.globals.easing})}return{g:i,elHollow:u,dataLabels:h}}},{key:"drawHollow",value:function(e){var t=new x(this.ctx).drawCircle(2*e.size);return t.attr({class:"apexcharts-radialbar-hollow",cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill}),t}},{key:"drawHollowImage",value:function(e,t,n,r){var o=this.w,i=new D(this.ctx),a=b.randomId(),s=o.config.plotOptions.radialBar.hollow.image;if(o.config.plotOptions.radialBar.hollow.imageClipped)i.clippedImgArea({width:n,height:n,image:s,patternID:"pattern".concat(o.globals.cuid).concat(a)}),r="url(#pattern".concat(o.globals.cuid).concat(a,")");else{var l=o.config.plotOptions.radialBar.hollow.imageWidth,c=o.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var u=o.globals.dom.Paper.image(s).loaded((function(t){this.move(e.centerX-t.width/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-t.height/2+o.config.plotOptions.radialBar.hollow.imageOffsetY)}));t.add(u)}else{var p=o.globals.dom.Paper.image(s).loaded((function(t){this.move(e.centerX-l/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-c/2+o.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));t.add(p)}}return r}},{key:"getStrokeWidth",value:function(e){var t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}}]),n}(),De=function(){function e(t){s(this,e),this.w=t.w,this.lineCtx=t}return c(e,[{key:"sameValueSeriesFix",value:function(e,t){var n=this.w;if("line"===n.config.chart.type&&("gradient"===n.config.fill.type||"gradient"===n.config.fill.type[e])&&new S(this.lineCtx.ctx,n).seriesHaveSameValues(e)){var r=t[e].slice();r[r.length-1]=r[r.length-1]+1e-6,t[e]=r}return t}},{key:"calculatePoints",value:function(e){var t=e.series,n=e.realIndex,r=e.x,o=e.y,i=e.i,a=e.j,s=e.prevY,l=this.w,c=[],u=[];if(0===a){var p=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(p=(l.globals.seriesX[n][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(p),u.push(b.isNumber(t[i][0])?s+l.config.markers.offsetY:null),c.push(r+l.config.markers.offsetX),u.push(b.isNumber(t[i][a+1])?o+l.config.markers.offsetY:null)}else c.push(r+l.config.markers.offsetX),u.push(b.isNumber(t[i][a+1])?o+l.config.markers.offsetY:null);return{x:c,y:u}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,n=e.pathFromArea,r=e.realIndex,o=this.w,i=0;i<o.globals.previousPaths.length;i++){var a=o.globals.previousPaths[i];("line"===a.type||"area"===a.type)&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(r,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,t=o.globals.previousPaths[i].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,n=o.globals.previousPaths[i].paths[0].d,o.config.stroke.show&&o.globals.previousPaths[i].paths[1]&&(t=o.globals.previousPaths[i].paths[1].d)))}return{pathFromLine:t,pathFromArea:n}}},{key:"determineFirstPrevY",value:function(e){var t=e.i,n=e.series,r=e.prevY,o=e.lineYPosition,i=this.w;if(void 0!==n[t][0])r=(o=i.config.chart.stacked&&t>0?this.lineCtx.prevSeriesY[t-1][0]:this.lineCtx.zeroY)-n[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?n[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(i.config.chart.stacked&&t>0&&void 0===n[t][0])for(var a=t-1;a>=0;a--)if(null!==n[a][0]&&void 0!==n[a][0]){r=o=this.lineCtx.prevSeriesY[a][0];break}return{prevY:r,lineYPosition:o}}}]),e}(),ke=function(){function e(t,n,r){s(this,e),this.ctx=t,this.w=t.w,this.xyRatios=n,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||r,this.scatter=new N(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new De(this),this.markers=new k(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return c(e,[{key:"draw",value:function(e,t,n){var r=this.w,o=new x(this.ctx),i=r.globals.comboCharts?t:r.config.chart.type,a=o.group({class:"apexcharts-".concat(i,"-series apexcharts-plot-series")}),s=new S(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=s.getLogSeries(e),this.yRatio=s.getLogYRatios(this.yRatio);for(var l=[],c=0;c<e.length;c++){e=this.lineHelpers.sameValueSeriesFix(c,e);var u=r.globals.comboCharts?n[c]:c;this._initSerieVariables(e,c,u);var p=[],d=[],h=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,u),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(h=(r.globals.seriesX[u][0]-r.globals.minX)/this.xRatio),d.push(h);var f,g=h,v=g,m=this.zeroY;m=this.lineHelpers.determineFirstPrevY({i:c,series:e,prevY:m,lineYPosition:0}).prevY,p.push(m),f=m;var y=this._calculatePathsFrom({series:e,i:c,realIndex:u,prevX:v,prevY:m}),b=this._iterateOverDataPoints({series:e,realIndex:u,i:c,x:h,y:1,pX:g,pY:f,pathsFrom:y,linePaths:[],areaPaths:[],seriesIndex:n,lineYPosition:0,xArrj:d,yArrj:p});this._handlePaths({type:i,realIndex:u,i:c,paths:b}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(r.config.chart.stacked)for(var w=l.length;w>0;w--)a.add(l[w-1]);else for(var C=0;C<l.length;C++)a.add(l[C]);return a}},{key:"_initSerieVariables",value:function(e,t,n){var r=this.w,o=new x(this.ctx);this.xDivision=r.globals.gridWidth/(r.globals.dataPoints-("on"===r.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(r.config.stroke.width)?r.config.stroke.width[n]:r.config.stroke.width,this.yRatio.length>1&&(this.yaxisIndex=n),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?r.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>r.globals.gridHeight||"end"===r.config.plotOptions.area.fillTo)&&(this.areaBottomY=r.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=o.group({class:"apexcharts-series",seriesName:b.escapeString(r.globals.seriesNames[n])}),this.elPointsMain=o.group({class:"apexcharts-series-markers-wrap","data:realIndex":n}),this.elDataLabelsWrap=o.group({class:"apexcharts-datalabels","data:realIndex":n});var i=e[t].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":i,rel:t+1,"data:realIndex":n}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,n,r,o,i=e.series,a=e.i,s=e.realIndex,l=e.prevX,c=e.prevY,u=this.w,p=new x(this.ctx);if(null===i[a][0]){for(var d=0;d<i[a].length;d++)if(null!==i[a][d]){l=this.xDivision*d,c=this.zeroY-i[a][d]/this.yRatio[this.yaxisIndex],t=p.move(l,c),n=p.move(l,this.areaBottomY);break}}else t=p.move(l,c),n=p.move(l,this.areaBottomY)+p.line(l,c);if(r=p.move(-1,this.zeroY)+p.line(-1,this.zeroY),o=p.move(-1,this.zeroY)+p.line(-1,this.zeroY),u.globals.previousPaths.length>0){var h=this.lineHelpers.checkPreviousPaths({pathFromLine:r,pathFromArea:o,realIndex:s});r=h.pathFromLine,o=h.pathFromArea}return{prevX:l,prevY:c,linePath:t,areaPath:n,pathFromLine:r,pathFromArea:o}}},{key:"_handlePaths",value:function(e){var t=e.type,n=e.realIndex,r=e.i,o=e.paths,a=this.w,s=new x(this.ctx),l=new D(this.ctx);this.prevSeriesY.push(o.yArrj),a.globals.seriesXvalues[n]=o.xArrj,a.globals.seriesYvalues[n]=o.yArrj;var c=a.config.forecastDataPoints;if(c.count>0){var u=a.globals.seriesXvalues[n][a.globals.seriesXvalues[n].length-c.count-1],p=s.drawRect(u,0,a.globals.gridWidth,a.globals.gridHeight,0);a.globals.dom.elForecastMask.appendChild(p.node);var d=s.drawRect(0,0,u,a.globals.gridHeight,0);a.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||a.globals.delayedElements.push({el:this.elPointsMain.node,index:n});var h={i:r,realIndex:n,animationDelay:r,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if("area"===t)for(var f=l.fillPath({seriesNumber:n}),g=0;g<o.areaPaths.length;g++){var v=s.renderPaths(i(i({},h),{},{pathFrom:o.pathFromArea,pathTo:o.areaPaths[g],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:f}));this.elSeries.add(v)}if(a.config.stroke.show&&!this.pointsChart){var m;m="line"===t?l.fillPath({seriesNumber:n,i:r}):a.globals.stroke.colors[n];for(var y=0;y<o.linePaths.length;y++){var b=i(i({},h),{},{pathFrom:o.pathFromLine,pathTo:o.linePaths[y],stroke:m,strokeWidth:this.strokeWidth,strokeLineCap:a.config.stroke.lineCap,fill:"none"}),w=s.renderPaths(b);if(this.elSeries.add(w),c.count>0){var C=s.renderPaths(b);C.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&C.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(C),C.attr("clip-path","url(#forecastMask".concat(a.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(a.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){for(var t=e.series,n=e.realIndex,r=e.i,o=e.x,i=e.y,a=e.pX,s=e.pY,l=e.pathsFrom,c=e.linePaths,u=e.areaPaths,p=e.seriesIndex,d=e.lineYPosition,h=e.xArrj,f=e.yArrj,g=this.w,v=new x(this.ctx),m=this.yRatio,y=l.prevY,w=l.linePath,C=l.areaPath,S=l.pathFromLine,E=l.pathFromArea,_=b.isNumber(g.globals.minYArr[n])?g.globals.minYArr[n]:g.globals.minY,R=g.globals.dataPoints>1?g.globals.dataPoints-1:g.globals.dataPoints,O=0;O<R;O++){var A=void 0===t[r][O+1]||null===t[r][O+1];if(g.globals.isXNumeric){var P=g.globals.seriesX[n][O+1];void 0===g.globals.seriesX[n][O+1]&&(P=g.globals.seriesX[n][R-1]),o=(P-g.globals.minX)/this.xRatio}else o+=this.xDivision;d=g.config.chart.stacked&&r>0&&g.globals.collapsedSeries.length<g.config.series.length-1?this.prevSeriesY[function(e){for(var t=e,n=0;n<g.globals.series.length;n++)if(g.globals.collapsedSeriesIndices.indexOf(e)>-1){t--;break}return t>=0?t:0}(r-1)][O+1]:this.zeroY,i=A?d-_/m[this.yaxisIndex]+2*(this.isReversed?_/m[this.yaxisIndex]:0):d-t[r][O+1]/m[this.yaxisIndex]+2*(this.isReversed?t[r][O+1]/m[this.yaxisIndex]:0),h.push(o),f.push(i);var T=this.lineHelpers.calculatePoints({series:t,x:o,y:i,realIndex:n,i:r,j:O,prevY:y}),D=this._createPaths({series:t,i:r,realIndex:n,j:O,x:o,y:i,pX:a,pY:s,linePath:w,areaPath:C,linePaths:c,areaPaths:u,seriesIndex:p});u=D.areaPaths,c=D.linePaths,a=D.pX,s=D.pY,C=D.areaPath,w=D.linePath,this.appendPathFrom&&(S+=v.line(o,this.zeroY),E+=v.line(o,this.zeroY)),this.handleNullDataPoints(t,T,r,O,n),this._handleMarkersAndLabels({pointsPos:T,series:t,x:o,y:i,prevY:y,i:r,j:O,realIndex:n})}return{yArrj:f,xArrj:h,pathFromArea:E,areaPaths:u,pathFromLine:S,linePaths:c}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.pointsPos;e.series,e.x,e.y,e.prevY;var n=e.i,r=e.j,o=e.realIndex,i=this.w,a=new M(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:o,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{i.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var s=this.markers.plotChartMarkers(t,o,r+1);null!==s&&this.elPointsMain.add(s)}var l=a.drawDataLabel(t,o,r+1,null);null!==l&&this.elDataLabelsWrap.add(l)}},{key:"_createPaths",value:function(e){var t=e.series,n=e.i,r=e.realIndex,o=e.j,i=e.x,a=e.y,s=e.pX,l=e.pY,c=e.linePath,u=e.areaPath,p=e.linePaths,d=e.areaPaths,h=e.seriesIndex,f=this.w,g=new x(this.ctx),v=f.config.stroke.curve,m=this.areaBottomY;if(Array.isArray(f.config.stroke.curve)&&(v=Array.isArray(h)?f.config.stroke.curve[h[n]]:f.config.stroke.curve[n]),"smooth"===v){var y=.35*(i-s);f.globals.hasNullValues?(null!==t[n][o]&&(null!==t[n][o+1]?(c=g.move(s,l)+g.curve(s+y,l,i-y,a,i+1,a),u=g.move(s+1,l)+g.curve(s+y,l,i-y,a,i+1,a)+g.line(i,m)+g.line(s,m)+"z"):(c=g.move(s,l),u=g.move(s,l)+"z")),p.push(c),d.push(u)):(c+=g.curve(s+y,l,i-y,a,i,a),u+=g.curve(s+y,l,i-y,a,i,a)),s=i,l=a,o===t[n].length-2&&(u=u+g.curve(s,l,i,a,i,m)+g.move(i,a)+"z",f.globals.hasNullValues||(p.push(c),d.push(u)))}else{if(null===t[n][o+1]){c+=g.move(i,a);var b=f.globals.isXNumeric?(f.globals.seriesX[r][o]-f.globals.minX)/this.xRatio:i-this.xDivision;u=u+g.line(b,m)+g.move(i,a)+"z"}null===t[n][o]&&(c+=g.move(i,a),u+=g.move(i,m)),"stepline"===v?(c=c+g.line(i,null,"H")+g.line(null,a,"V"),u=u+g.line(i,null,"H")+g.line(null,a,"V")):"straight"===v&&(c+=g.line(i,a),u+=g.line(i,a)),o===t[n].length-2&&(u=u+g.line(i,m)+g.move(i,a)+"z",p.push(c),d.push(u))}return{linePaths:p,areaPaths:d,pX:s,pY:l,linePath:c,areaPath:u}}},{key:"handleNullDataPoints",value:function(e,t,n,r,o){var i=this.w;if(null===e[n][r]&&i.config.markers.showNullDataPoints||1===e[n].length){var a=this.markers.plotChartMarkers(t,o,r+1,this.strokeWidth-i.config.markers.strokeWidth/2,!0);null!==a&&this.elPointsMain.add(a)}}}]),e}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function e(t,n,r,o){this.xoffset=t,this.yoffset=n,this.height=o,this.width=r,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(e){var t,n=[],r=this.xoffset,o=this.yoffset,a=i(e)/this.height,s=i(e)/this.width;if(this.width>=this.height)for(t=0;t<e.length;t++)n.push([r,o,r+a,o+e[t]/a]),o+=e[t]/a;else for(t=0;t<e.length;t++)n.push([r,o,r+e[t]/s,o+s]),r+=e[t]/s;return n},this.cutArea=function(t){var n;if(this.width>=this.height){var r=t/this.height,o=this.width-r;n=new e(this.xoffset+r,this.yoffset,o,this.height)}else{var i=t/this.width,a=this.height-i;n=new e(this.xoffset,this.yoffset+i,this.width,a)}return n}}function t(t,r,o,a,s){return a=void 0===a?0:a,s=void 0===s?0:s,function(e){var t,n,r=[];for(t=0;t<e.length;t++)for(n=0;n<e[t].length;n++)r.push(e[t][n]);return r}(n(function(e,t){var n,r=[],o=t/i(e);for(n=0;n<e.length;n++)r[n]=e[n]*o;return r}(t,r*o),[],new e(a,s,r,o),[]))}function n(e,t,o,a){var s,l,c;if(0!==e.length)return s=o.shortestEdge(),function(e,t,n){var o;return 0===e.length||((o=e.slice()).push(t),r(e,n)>=r(o,n))}(t,l=e[0],s)?(t.push(l),n(e.slice(1),t,o,a)):(c=o.cutArea(i(t),a),a.push(o.getCoordinates(t)),n(e,[],c,a)),a;a.push(o.getCoordinates(t))}function r(e,t){var n=Math.min.apply(Math,e),r=Math.max.apply(Math,e),o=i(e);return Math.max(Math.pow(t,2)*r/Math.pow(o,2),Math.pow(o,2)/(Math.pow(t,2)*n))}function o(e){return e&&e.constructor===Array}function i(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t];return n}function a(e){var t,n=0;if(o(e[0]))for(t=0;t<e.length;t++)n+=a(e[t]);else n=i(e);return n}return function e(n,r,i,s,l){s=void 0===s?0:s,l=void 0===l?0:l;var c,u,p=[],d=[];if(o(n[0])){for(u=0;u<n.length;u++)p[u]=a(n[u]);for(c=t(p,r,i,s,l),u=0;u<n.length;u++)d.push(e(n[u],c[u][2]-c[u][0],c[u][3]-c[u][1],c[u][0],c[u][1]))}else d=t(n,r,i,s,l);return d}}();var Ne,Me,Ie=function(){function e(t,n){s(this,e),this.ctx=t,this.w=t.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new _e(t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return c(e,[{key:"draw",value:function(e){var t=this,n=this.w,r=new x(this.ctx),o=new D(this.ctx),i=r.group({class:"apexcharts-treemap"});if(n.globals.noData)return i;var a=[];return e.forEach((function(e){var t=e.map((function(e){return Math.abs(e)}));a.push(t)})),this.negRange=this.helpers.checkColorRange(),n.config.series.forEach((function(e,n){e.data.forEach((function(e){Array.isArray(t.labels[n])||(t.labels[n]=[]),t.labels[n].push(e.x)}))})),window.TreemapSquared.generate(a,n.globals.gridWidth,n.globals.gridHeight).forEach((function(a,s){var l=r.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:b.escapeString(n.globals.seriesNames[s]),rel:s+1,"data:realIndex":s});if(n.config.chart.dropShadow.enabled){var c=n.config.chart.dropShadow;new C(t.ctx).dropShadow(i,c,s)}var u=r.group({class:"apexcharts-data-labels"});a.forEach((function(i,a){var c=i[0],u=i[1],p=i[2],d=i[3],h=r.drawRect(c,u,p-c,d-u,0,"#fff",1,t.strokeWidth,n.config.plotOptions.treemap.useFillColorAsStroke?g:n.globals.stroke.colors[s]);h.attr({cx:c,cy:u,index:s,i:s,j:a,width:p-c,height:d-u});var f=t.helpers.getShadeColor(n.config.chart.type,s,a,t.negRange),g=f.color;void 0!==n.config.series[s].data[a]&&n.config.series[s].data[a].fillColor&&(g=n.config.series[s].data[a].fillColor);var v=o.fillPath({color:g,seriesNumber:s,dataPointIndex:a});h.node.classList.add("apexcharts-treemap-rect"),h.attr({fill:v}),t.helpers.addListeners(h);var m={x:c+(p-c)/2,y:u+(d-u)/2,width:0,height:0},y={x:c,y:u,width:p-c,height:d-u};if(n.config.chart.animations.enabled&&!n.globals.dataChanged){var b=1;n.globals.resized||(b=n.config.chart.animations.speed),t.animateTreemap(h,m,y,b)}if(n.globals.dataChanged){var w=1;t.dynamicAnim.enabled&&n.globals.shouldAnimate&&(w=t.dynamicAnim.speed,n.globals.previousPaths[s]&&n.globals.previousPaths[s][a]&&n.globals.previousPaths[s][a].rect&&(m=n.globals.previousPaths[s][a].rect),t.animateTreemap(h,m,y,w))}var C=t.getFontSize(i),x=n.config.dataLabels.formatter(t.labels[s][a],{value:n.globals.series[s][a],seriesIndex:s,dataPointIndex:a,w:n}),S=t.helpers.calculateDataLabels({text:x,x:(c+p)/2,y:(u+d)/2+t.strokeWidth/2+C/3,i:s,j:a,colorProps:f,fontSize:C,series:e});n.config.dataLabels.enabled&&S&&t.rotateToFitLabel(S,x,c,u,p,d),l.add(h),null!==S&&l.add(S)})),l.add(u),i.add(l)})),i}},{key:"getFontSize",value:function(e){var t,n,r=this.w,o=function e(t){var n,r=0;if(Array.isArray(t[0]))for(n=0;n<t.length;n++)r+=e(t[n]);else for(n=0;n<t.length;n++)r+=t[n].length;return r}(this.labels)/function e(t){var n,r=0;if(Array.isArray(t[0]))for(n=0;n<t.length;n++)r+=e(t[n]);else for(n=0;n<t.length;n++)r+=1;return r}(this.labels);return t=(e[2]-e[0])*(e[3]-e[1]),n=Math.pow(t,.5),Math.min(n/o,parseInt(r.config.dataLabels.style.fontSize,10))}},{key:"rotateToFitLabel",value:function(e,t,n,r,o,i){var a=new x(this.ctx),s=a.getTextRects(t);if(s.width+5>o-n&&s.width<=i-r){var l=a.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(l.x," ").concat(l.y,")"))}}},{key:"animateTreemap",value:function(e,t,n,r){var o=new w(this.ctx);o.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:n.x,y:n.y,width:n.width,height:n.height},r,(function(){o.animationCompleted(e)}))}}]),e}(),Le=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return c(e,[{key:"calculateTimeScaleTicks",value:function(e,t){var n=this,r=this.w;if(r.globals.allSeriesCollapsed)return r.globals.labels=[],r.globals.timescaleLabels=[],[];var o=new H(this.ctx),a=(t-e)/864e5;this.determineInterval(a),r.globals.disableZoomIn=!1,r.globals.disableZoomOut=!1,a<.00011574074074074075?r.globals.disableZoomIn=!0:a>5e4&&(r.globals.disableZoomOut=!0);var s=o.getTimeUnitsfromTimestamp(e,t,this.utc),l=r.globals.gridWidth/a,c=l/24,u=c/60,p=u/60,d=Math.floor(24*a),h=Math.floor(1440*a),f=Math.floor(86400*a),g=Math.floor(a),v=Math.floor(a/30),m=Math.floor(a/365),y={minMillisecond:s.minMillisecond,minSecond:s.minSecond,minMinute:s.minMinute,minHour:s.minHour,minDate:s.minDate,minMonth:s.minMonth,minYear:s.minYear},b={firstVal:y,currentMillisecond:y.minMillisecond,currentSecond:y.minSecond,currentMinute:y.minMinute,currentHour:y.minHour,currentMonthDate:y.minDate,currentDate:y.minDate,currentMonth:y.minMonth,currentYear:y.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:u,secondsWidthOnXAxis:p,numberOfSeconds:f,numberOfMinutes:h,numberOfHours:d,numberOfDays:g,numberOfMonths:v,numberOfYears:m};switch(this.tickInterval){case"years":this.generateYearScale(b);break;case"months":case"half_year":this.generateMonthScale(b);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(b);break;case"hours":this.generateHourScale(b);break;case"minutes_fives":case"minutes":this.generateMinuteScale(b);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(b)}var w=this.timeScaleArray.map((function(e){var t={position:e.position,unit:e.unit,year:e.year,day:e.day?e.day:1,hour:e.hour?e.hour:0,month:e.month+1};return"month"===e.unit?i(i({},t),{},{day:1,value:e.value+1}):"day"===e.unit||"hour"===e.unit?i(i({},t),{},{value:e.value}):"minute"===e.unit?i(i({},t),{},{value:e.value,minute:e.value}):"second"===e.unit?i(i({},t),{},{value:e.value,minute:e.minute,second:e.second}):e}));return w.filter((function(e){var t=1,o=Math.ceil(r.globals.gridWidth/120),i=e.value;void 0!==r.config.xaxis.tickAmount&&(o=r.config.xaxis.tickAmount),w.length>o&&(t=Math.floor(w.length/o));var a=!1,s=!1;switch(n.tickInterval){case"years":"year"===e.unit&&(a=!0);break;case"half_year":t=7,"year"===e.unit&&(a=!0);break;case"months":t=1,"year"===e.unit&&(a=!0);break;case"months_fortnight":t=15,"year"!==e.unit&&"month"!==e.unit||(a=!0),30===i&&(s=!0);break;case"months_days":t=10,"month"===e.unit&&(a=!0),30===i&&(s=!0);break;case"week_days":t=8,"month"===e.unit&&(a=!0);break;case"days":t=1,"month"===e.unit&&(a=!0);break;case"hours":"day"===e.unit&&(a=!0);break;case"minutes_fives":case"seconds_fives":i%5!=0&&(s=!0);break;case"seconds_tens":i%10!=0&&(s=!0)}if("hours"===n.tickInterval||"minutes_fives"===n.tickInterval||"seconds_tens"===n.tickInterval||"seconds_fives"===n.tickInterval){if(!s)return!0}else if((i%t==0||a)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var n=this.w,r=this.formatDates(e),o=this.removeOverlappingTS(r);n.globals.timescaleLabels=o.slice(),new pe(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,n=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>2.4:this.tickInterval="hours";break;case n>15:this.tickInterval="minutes_fives";break;case n>5:this.tickInterval="minutes";break;case n>1:this.tickInterval="seconds_tens";break;case 60*n>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var t=e.firstVal,n=e.currentMonth,r=e.currentYear,o=e.daysWidthOnXAxis,i=e.numberOfYears,a=t.minYear,s=0,l=new H(this.ctx),c="year";if(t.minDate>1||t.minMonth>0){var u=l.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);s=(l.determineDaysOfYear(t.minYear)-u+1)*o,a=t.minYear+1,this.timeScaleArray.push({position:s,value:a,unit:c,year:a,month:b.monthMod(n+1)})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:s,value:a,unit:c,year:r,month:b.monthMod(n+1)});for(var p=a,d=s,h=0;h<i;h++)p++,d=l.determineDaysOfYear(p-1)*o+d,this.timeScaleArray.push({position:d,value:p,unit:c,year:p,month:1})}},{key:"generateMonthScale",value:function(e){var t=e.firstVal,n=e.currentMonthDate,r=e.currentMonth,o=e.currentYear,i=e.daysWidthOnXAxis,a=e.numberOfMonths,s=r,l=0,c=new H(this.ctx),u="month",p=0;if(t.minDate>1){l=(c.determineDaysOfMonths(r+1,t.minYear)-n+1)*i,s=b.monthMod(r+1);var d=o+p,h=b.monthMod(s),f=s;0===s&&(u="year",f=d,h=1,d+=p+=1),this.timeScaleArray.push({position:l,value:f,unit:u,year:d,month:h})}else this.timeScaleArray.push({position:l,value:s,unit:u,year:o,month:b.monthMod(r)});for(var g=s+1,v=l,m=0,y=1;m<a;m++,y++){0===(g=b.monthMod(g))?(u="year",p+=1):u="month";var w=this._getYear(o,g,p);v=c.determineDaysOfMonths(g,w)*i+v;var C=0===g?w:g;this.timeScaleArray.push({position:v,value:C,unit:u,year:w,month:0===g?1:g}),g++}}},{key:"generateDayScale",value:function(e){var t=e.firstVal,n=e.currentMonth,r=e.currentYear,o=e.hoursWidthOnXAxis,i=e.numberOfDays,a=new H(this.ctx),s="day",l=t.minDate+1,c=l,u=function(e,t,n){return e>a.determineDaysOfMonths(t+1,n)?(c=1,s="month",d=t+=1,t):t},p=(24-t.minHour)*o,d=l,h=u(c,n,r);0===t.minHour&&1===t.minDate?(p=0,d=b.monthMod(t.minMonth),s="month",c=t.minDate,i++):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(p=0,l=t.minDate,d=l,h=u(c=l,n,r)),this.timeScaleArray.push({position:p,value:d,unit:s,year:this._getYear(r,h,0),month:b.monthMod(h),day:c});for(var f=p,g=0;g<i;g++){s="day",h=u(c+=1,h,this._getYear(r,h,0));var v=this._getYear(r,h,0);f=24*o+f;var m=1===c?b.monthMod(h):c;this.timeScaleArray.push({position:f,value:m,unit:s,year:v,month:b.monthMod(h),day:m})}}},{key:"generateHourScale",value:function(e){var t=e.firstVal,n=e.currentDate,r=e.currentMonth,o=e.currentYear,i=e.minutesWidthOnXAxis,a=e.numberOfHours,s=new H(this.ctx),l="hour",c=function(e,t){return e>s.determineDaysOfMonths(t+1,o)&&(g=1,t+=1),{month:t,date:g}},u=function(e,t){return e>s.determineDaysOfMonths(t+1,o)?t+=1:t},p=60-(t.minMinute+t.minSecond/60),d=p*i,h=t.minHour+1,f=h+1;60===p&&(d=0,f=(h=t.minHour)+1);var g=n,v=u(g,r);this.timeScaleArray.push({position:d,value:h,unit:l,day:g,hour:f,year:o,month:b.monthMod(v)});for(var m=d,y=0;y<a;y++){l="hour",f>=24&&(f=0,l="day",v=c(g+=1,v).month,v=u(g,v));var w=this._getYear(o,v,0);m=0===f&&0===y?p*i:60*i+m;var C=0===f?g:f;this.timeScaleArray.push({position:m,value:C,unit:l,hour:f,day:g,year:w,month:b.monthMod(v)}),f++}}},{key:"generateMinuteScale",value:function(e){for(var t=e.currentMillisecond,n=e.currentSecond,r=e.currentMinute,o=e.currentHour,i=e.currentDate,a=e.currentMonth,s=e.currentYear,l=e.minutesWidthOnXAxis,c=e.secondsWidthOnXAxis,u=e.numberOfMinutes,p=r+1,d=i,h=a,f=s,g=o,v=(60-n-t/1e3)*c,m=0;m<u;m++)p>=60&&(p=0,24===(g+=1)&&(g=0)),this.timeScaleArray.push({position:v,value:p,unit:"minute",hour:g,minute:p,day:d,year:this._getYear(f,h,0),month:b.monthMod(h)}),v+=l,p++}},{key:"generateSecondScale",value:function(e){for(var t=e.currentMillisecond,n=e.currentSecond,r=e.currentMinute,o=e.currentHour,i=e.currentDate,a=e.currentMonth,s=e.currentYear,l=e.secondsWidthOnXAxis,c=e.numberOfSeconds,u=n+1,p=r,d=i,h=a,f=s,g=o,v=(1e3-t)/1e3*l,m=0;m<c;m++)u>=60&&(u=0,++p>=60&&(p=0,24===++g&&(g=0))),this.timeScaleArray.push({position:v,value:u,unit:"second",hour:g,minute:p,second:u,day:d,year:this._getYear(f,h,0),month:b.monthMod(h)}),v+=l,u++}},{key:"createRawDateString",value:function(e,t){var n=e.year;return 0===e.month&&(e.month=1),n+="-"+("0"+e.month.toString()).slice(-2),"day"===e.unit?n+="day"===e.unit?"-"+("0"+t).slice(-2):"-01":n+="-"+("0"+(e.day?e.day:"1")).slice(-2),"hour"===e.unit?n+="hour"===e.unit?"T"+("0"+t).slice(-2):"T00":n+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),"minute"===e.unit?n+=":"+("0"+t).slice(-2):n+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),"second"===e.unit?n+=":"+("0"+t).slice(-2):n+=":00",this.utc&&(n+=".000Z"),n}},{key:"formatDates",value:function(e){var t=this,n=this.w;return e.map((function(e){var r=e.value.toString(),o=new H(t.ctx),i=t.createRawDateString(e,r),a=o.getDate(o.parseDate(i));if(t.utc||(a=o.getDate(o.parseDateWithTimezone(i))),void 0===n.config.xaxis.labels.format){var s="dd MMM",l=n.config.xaxis.labels.datetimeFormatter;"year"===e.unit&&(s=l.year),"month"===e.unit&&(s=l.month),"day"===e.unit&&(s=l.day),"hour"===e.unit&&(s=l.hour),"minute"===e.unit&&(s=l.minute),"second"===e.unit&&(s=l.second),r=o.formatDate(a,s)}else r=o.formatDate(a,n.config.xaxis.labels.format);return{dateString:i,position:e.position,value:r,unit:e.unit,year:e.year,month:e.month}}))}},{key:"removeOverlappingTS",value:function(e){var t,n=this,r=new x(this.ctx),o=!1;e.length>0&&e[0].value&&e.every((function(t){return t.value.length===e[0].value.length}))&&(o=!0,t=r.getTextRects(e[0].value).width);var i=0,a=e.map((function(a,s){if(s>0&&n.w.config.xaxis.labels.hideOverlappingLabels){var l=o?t:r.getTextRects(e[i].value).width,c=e[i].position;return a.position>c+l+10?(i=s,a):null}return a}));return a.filter((function(e){return null!==e}))}},{key:"_getYear",value:function(e,t,n){return e+Math.floor(t/12)+n}}]),e}(),Fe=function(){function e(t,n){s(this,e),this.ctx=n,this.w=n.w,this.el=t}return c(e,[{key:"setupElements",value:function(){var e=this.w.globals,t=this.w.config,n=t.chart.type;e.axisCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(n)>-1,e.xyCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble"].indexOf(n)>-1,e.isBarHorizontal=("bar"===t.chart.type||"rangeBar"===t.chart.type||"boxPlot"===t.chart.type)&&t.plotOptions.bar.horizontal,e.chartClass=".apexcharts"+e.chartID,e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),x.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas "+e.chartClass.substring(1)}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=new window.SVG.Doc(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),e.dom.Paper.node.style.background=t.chart.background,this.setSVGDimensions(),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elAnnotations=e.dom.Paper.group().attr({class:"apexcharts-annotations"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elWrap.appendChild(e.dom.elLegendWrap),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var n=this.w,r=n.config,o=n.globals,i={series:[],i:[]},a={series:[],i:[]},s={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},u={series:[],i:[]},p={series:[],i:[]};o.series.map((function(t,d){var h=0;void 0!==e[d].type?("column"===e[d].type||"bar"===e[d].type?(o.series.length>1&&r.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),c.series.push(t),c.i.push(d),h++,n.globals.columnSeries=c.series):"area"===e[d].type?(a.series.push(t),a.i.push(d),h++):"line"===e[d].type?(i.series.push(t),i.i.push(d),h++):"scatter"===e[d].type?(s.series.push(t),s.i.push(d)):"bubble"===e[d].type?(l.series.push(t),l.i.push(d),h++):"candlestick"===e[d].type?(u.series.push(t),u.i.push(d),h++):"boxPlot"===e[d].type?(p.series.push(t),p.i.push(d),h++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),h>1&&(o.comboCharts=!0)):(i.series.push(t),i.i.push(d))}));var d=new ke(this.ctx,t),h=new Ee(this.ctx,t);this.ctx.pie=new Ae(this.ctx);var f=new Te(this.ctx);this.ctx.rangeBar=new W(this.ctx,t);var g=new Pe(this.ctx),v=[];if(o.comboCharts){if(a.series.length>0&&v.push(d.draw(a.series,"area",a.i)),c.series.length>0)if(n.config.chart.stacked){var m=new Se(this.ctx,t);v.push(m.draw(c.series,c.i))}else this.ctx.bar=new G(this.ctx,t),v.push(this.ctx.bar.draw(c.series,c.i));if(i.series.length>0&&v.push(d.draw(i.series,"line",i.i)),u.series.length>0&&v.push(h.draw(u.series,u.i)),p.series.length>0&&v.push(h.draw(p.series,p.i)),s.series.length>0){var y=new ke(this.ctx,t,!0);v.push(y.draw(s.series,"scatter",s.i))}if(l.series.length>0){var b=new ke(this.ctx,t,!0);v.push(b.draw(l.series,"bubble",l.i))}}else switch(r.chart.type){case"line":v=d.draw(o.series,"line");break;case"area":v=d.draw(o.series,"area");break;case"bar":r.chart.stacked?v=new Se(this.ctx,t).draw(o.series):(this.ctx.bar=new G(this.ctx,t),v=this.ctx.bar.draw(o.series));break;case"candlestick":case"boxPlot":v=new Ee(this.ctx,t).draw(o.series);break;case"rangeBar":v=this.ctx.rangeBar.draw(o.series);break;case"heatmap":v=new Re(this.ctx,t).draw(o.series);break;case"treemap":v=new Ie(this.ctx,t).draw(o.series);break;case"pie":case"donut":case"polarArea":v=this.ctx.pie.draw(o.series);break;case"radialBar":v=f.draw(o.series);break;case"radar":v=g.draw(o.series);break;default:v=d.draw(o.series)}return v}},{key:"setSVGDimensions",value:function(){var e=this.w.globals,t=this.w.config;e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;var n=b.getDimensions(this.el),r=t.chart.width.toString().split(/[0-9]+/g).pop();"%"===r?b.isNumber(n[0])&&(0===n[0].width&&(n=b.getDimensions(this.el.parentNode)),e.svgWidth=n[0]*parseInt(t.chart.width,10)/100):"px"!==r&&""!==r||(e.svgWidth=parseInt(t.chart.width,10));var o=t.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===o){var i=b.getDimensions(this.el.parentNode);e.svgHeight=i[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.axisCharts?e.svgHeight=e.svgWidth/1.61:e.svgHeight=e.svgWidth/1.2;if(e.svgWidth<0&&(e.svgWidth=0),e.svgHeight<0&&(e.svgHeight=0),x.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==o){var a=t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight=e.svgHeight+a+"px"}e.dom.elWrap.style.width=e.svgWidth+"px",e.dom.elWrap.style.height=e.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,t=e.translateY,n={transform:"translate("+e.translateX+", "+t+")"};x.setAttrs(e.dom.elGraphical.node,n)}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,n=0,r=e.config.chart.sparkline.enabled?1:15;r+=e.config.grid.padding.bottom,"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||!e.config.legend.show||e.config.legend.floating||(n=new he(this.ctx).legendHelpers.getLegendBBox().clwh+10);var o=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),i=2.05*e.globals.radialSize;if(o&&!e.config.chart.sparkline.enabled&&0!==e.config.plotOptions.radialBar.startAngle){var a=b.getBoundingClientRect(o);i=a.bottom;var s=a.bottom-a.top;i=Math.max(2.05*e.globals.radialSize,s)}var l=i+t.translateY+n+r;t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",l),t.dom.elWrap.style.height=l+"px",x.setAttrs(t.dom.Paper.node,{height:l}),t.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px"}},{key:"coreCalculations",value:function(){new Z(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map((function(e){return[]}))},n=new B,r=this.w.globals;n.initGlobalVars(r),r.seriesXvalues=t(),r.seriesYvalues=t()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var e=null,t=this.w;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new re(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new re(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Le(this.ctx);var n=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?n=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(n=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(n)}e=new S(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.w;if(t.config.chart.brush.enabled&&"function"!=typeof t.config.chart.events.selection){var n=t.config.chart.brush.targets||[t.config.chart.brush.target];n.forEach((function(t){var n=ApexCharts.getChartByID(t);n.w.globals.brushSource=e.ctx,"function"!=typeof n.w.config.chart.events.zoomed&&(n.w.config.chart.events.zoomed=function(){e.updateSourceChart(n)}),"function"!=typeof n.w.config.chart.events.scrolled&&(n.w.config.chart.events.scrolled=function(){e.updateSourceChart(n)})})),t.config.chart.events.selection=function(e,r){n.forEach((function(e){var n=ApexCharts.getChartByID(e),o=b.clone(t.config.yaxis);if(t.config.chart.brush.autoScaleYaxis&&1===n.w.globals.series.length){var a=new Q(n);o=a.autoScaleY(n,o,r)}var s=n.w.config.yaxis.reduce((function(e,t,r){return[].concat(v(e),[i(i({},n.w.config.yaxis[r]),{},{min:o[0].min,max:o[0].max})])}),[]);n.ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max},yaxis:s},!1,!1,!1,!1)}))}}}}]),e}(),Ge=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"_updateOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(s){var l=[t.ctx];o&&(l=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(l=[t.ctx],t.ctx.w.globals.isExecCalled=!1),l.forEach((function(o,c){var u=o.w;if(u.globals.shouldAnimate=r,n||(u.globals.resized=!0,u.globals.dataChanged=!0,r&&o.series.getPreviousPaths()),e&&"object"===a(e)&&(o.config=new j(e),e=S.extendArrayProps(o.config,e,u),o.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,u.config=b.extend(u.config,e),i&&(u.globals.lastXAxis=e.xaxis?b.clone(e.xaxis):[],u.globals.lastYAxis=e.yaxis?b.clone(e.yaxis):[],u.globals.initialConfig=b.extend({},u.config),u.globals.initialSeries=b.clone(u.config.series),e.series))){for(var p=0;p<u.globals.collapsedSeriesIndices.length;p++){var d=u.config.series[u.globals.collapsedSeriesIndices[p]];u.globals.collapsedSeries[p].data=u.globals.axisCharts?d.data.slice():d}for(var h=0;h<u.globals.ancillaryCollapsedSeriesIndices.length;h++){var f=u.config.series[u.globals.ancillaryCollapsedSeriesIndices[h]];u.globals.ancillaryCollapsedSeries[h].data=u.globals.axisCharts?f.data.slice():f}o.series.emptyCollapsedSeries(u.config.series)}return o.update(e).then((function(){c===l.length-1&&s(o)}))}))}))}},{key:"_updateSeries",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(o){var i,a=n.w;return a.globals.shouldAnimate=t,a.globals.dataChanged=!0,t&&n.ctx.series.getPreviousPaths(),a.globals.axisCharts?(0===(i=e.map((function(e,t){return n._extendSeries(e,t)}))).length&&(i=[{data:[]}]),a.config.series=i):a.config.series=e.slice(),r&&(a.globals.initialSeries=b.clone(a.config.series)),n.ctx.update().then((function(){o(n.ctx)}))}))}},{key:"_extendSeries",value:function(e,t){var n=this.w,r=n.config.series[t];return i(i({},n.config.series[t]),{},{name:e.name?e.name:r&&r.name,color:e.color?e.color:r&&r.color,type:e.type?e.type:r&&r.type,data:e.data?e.data:r&&r.data})}},{key:"toggleDataPointSelection",value:function(e,t){var n=this.w,r=null,o=".apexcharts-series[data\\:realIndex='".concat(e,"']");return n.globals.axisCharts?r=n.globals.dom.Paper.select("".concat(o," path[j='").concat(t,"'], ").concat(o," circle[j='").concat(t,"'], ").concat(o," rect[j='").concat(t,"']")).members[0]:void 0===t&&(r=n.globals.dom.Paper.select("".concat(o," path[j='").concat(e,"']")).members[0],"pie"!==n.config.chart.type&&"polarArea"!==n.config.chart.type&&"donut"!==n.config.chart.type||this.ctx.pie.pieClicked(e)),r?(new x(this.ctx).pathMouseDown(r,null),r.node?r.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach((function(n){void 0!==e.xaxis[n]&&(t.config.xaxis[n]=e.xaxis[n],t.globals.lastXAxis[n]=e.xaxis[n])})),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var n=new V(e);e=n.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){var t=this.w;return t.config.chart.stacked&&"100%"===t.config.chart.stackType&&(Array.isArray(e.yaxis)?e.yaxis.forEach((function(t,n){e.yaxis[n].min=0,e.yaxis[n].max=100})):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,n=this.w,r=n.globals.lastXAxis,o=n.globals.lastYAxis;e&&e.xaxis&&(r=e.xaxis),e&&e.yaxis&&(o=e.yaxis),n.config.xaxis.min=r.min,n.config.xaxis.max=r.max;n.config.yaxis.map((function(e,r){n.globals.zoomed||void 0!==o[r]?function(e){void 0!==o[e]&&(n.config.yaxis[e].min=o[e].min,n.config.yaxis[e].max=o[e].max)}(r):void 0!==t.ctx.opts.yaxis[r]&&(e.min=t.ctx.opts.yaxis[r].min,e.max=t.ctx.opts.yaxis[r].max)}))}}]),e}();Ne="undefined"!=typeof window?window:void 0,Me=function(e,t){var n=(void 0!==this?this:e).SVG=function(e){if(n.supported)return e=new n.Doc(e),n.parser.draw||n.prepare(),e};if(n.ns="http://www.w3.org/2000/svg",n.xmlns="http://www.w3.org/2000/xmlns/",n.xlink="http://www.w3.org/1999/xlink",n.svgjs="http://svgjs.dev",n.supported=!0,!n.supported)return!1;n.did=1e3,n.eid=function(e){return"Svgjs"+p(e)+n.did++},n.create=function(e){var n=t.createElementNS(this.ns,e);return n.setAttribute("id",this.eid(e)),n},n.extend=function(){var e,t;t=(e=[].slice.call(arguments)).pop();for(var r=e.length-1;r>=0;r--)if(e[r])for(var o in t)e[r].prototype[o]=t[o];n.Set&&n.Set.inherit&&n.Set.inherit()},n.invent=function(e){var t="function"==typeof e.create?e.create:function(){this.constructor.call(this,n.create(e.create))};return e.inherit&&(t.prototype=new e.inherit),e.extend&&n.extend(t,e.extend),e.construct&&n.extend(e.parent||n.Container,e.construct),t},n.adopt=function(t){return t?t.instance?t.instance:((r="svg"==t.nodeName?t.parentNode instanceof e.SVGElement?new n.Nested:new n.Doc:"linearGradient"==t.nodeName?new n.Gradient("linear"):"radialGradient"==t.nodeName?new n.Gradient("radial"):n[p(t.nodeName)]?new(n[p(t.nodeName)]):new n.Element(t)).type=t.nodeName,r.node=t,t.instance=r,r instanceof n.Doc&&r.namespace().defs(),r.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),r):null;var r},n.prepare=function(){var e=t.getElementsByTagName("body")[0],r=(e?new n.Doc(e):n.adopt(t.documentElement).nested()).size(2,0);n.parser={body:e||t.documentElement,draw:r.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:r.polyline().node,path:r.path().node,native:n.create("svg")}},n.parser={native:n.create("svg")},t.addEventListener("DOMContentLoaded",(function(){n.parser.draw||n.prepare()}),!1),n.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},n.utils={map:function(e,t){for(var n=e.length,r=[],o=0;o<n;o++)r.push(t(e[o]));return r},filter:function(e,t){for(var n=e.length,r=[],o=0;o<n;o++)t(e[o])&&r.push(e[o]);return r},filterSVGElements:function(t){return this.filter(t,(function(t){return t instanceof e.SVGElement}))}},n.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},n.Color=function(e){var t,r;this.r=0,this.g=0,this.b=0,e&&("string"==typeof e?n.regex.isRgb.test(e)?(t=n.regex.rgb.exec(e.replace(n.regex.whitespace,"")),this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3])):n.regex.isHex.test(e)&&(t=n.regex.hex.exec(4==(r=e).length?["#",r.substring(1,2),r.substring(1,2),r.substring(2,3),r.substring(2,3),r.substring(3,4),r.substring(3,4)].join(""):r),this.r=parseInt(t[1],16),this.g=parseInt(t[2],16),this.b=parseInt(t[3],16)):"object"===a(e)&&(this.r=e.r,this.g=e.g,this.b=e.b))},n.extend(n.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+d(this.r)+d(this.g)+d(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11},morph:function(e){return this.destination=new n.Color(e),this},at:function(e){return this.destination?(e=e<0?0:e>1?1:e,new n.Color({r:~~(this.r+(this.destination.r-this.r)*e),g:~~(this.g+(this.destination.g-this.g)*e),b:~~(this.b+(this.destination.b-this.b)*e)})):this}}),n.Color.test=function(e){return e+="",n.regex.isHex.test(e)||n.regex.isRgb.test(e)},n.Color.isRgb=function(e){return e&&"number"==typeof e.r&&"number"==typeof e.g&&"number"==typeof e.b},n.Color.isColor=function(e){return n.Color.isRgb(e)||n.Color.test(e)},n.Array=function(e,t){0==(e=(e||[]).valueOf()).length&&t&&(e=t.valueOf()),this.value=this.parse(e)},n.extend(n.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(e){return e=e.valueOf(),Array.isArray(e)?e:this.split(e)}}),n.PointArray=function(e,t){n.Array.call(this,e,t||[[0,0]])},n.PointArray.prototype=new n.Array,n.PointArray.prototype.constructor=n.PointArray;for(var r={M:function(e,t,n){return t.x=n.x=e[0],t.y=n.y=e[1],["M",t.x,t.y]},L:function(e,t){return t.x=e[0],t.y=e[1],["L",e[0],e[1]]},H:function(e,t){return t.x=e[0],["H",e[0]]},V:function(e,t){return t.y=e[0],["V",e[0]]},C:function(e,t){return t.x=e[4],t.y=e[5],["C",e[0],e[1],e[2],e[3],e[4],e[5]]},Q:function(e,t){return t.x=e[2],t.y=e[3],["Q",e[0],e[1],e[2],e[3]]},Z:function(e,t,n){return t.x=n.x,t.y=n.y,["Z"]}},o="mlhvqtcsaz".split(""),i=0,s=o.length;i<s;++i)r[o[i]]=function(e){return function(t,n,o){if("H"==e)t[0]=t[0]+n.x;else if("V"==e)t[0]=t[0]+n.y;else if("A"==e)t[5]=t[5]+n.x,t[6]=t[6]+n.y;else for(var i=0,a=t.length;i<a;++i)t[i]=t[i]+(i%2?n.y:n.x);if(r&&"function"==typeof r[e])return r[e](t,n,o)}}(o[i].toUpperCase());n.PathArray=function(e,t){n.Array.call(this,e,t||[["M",0,0]])},n.PathArray.prototype=new n.Array,n.PathArray.prototype.constructor=n.PathArray,n.extend(n.PathArray,{toString:function(){return function(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t][0],null!=e[t][1]&&(r+=e[t][1],null!=e[t][2]&&(r+=" ",r+=e[t][2],null!=e[t][3]&&(r+=" ",r+=e[t][3],r+=" ",r+=e[t][4],null!=e[t][5]&&(r+=" ",r+=e[t][5],r+=" ",r+=e[t][6],null!=e[t][7]&&(r+=" ",r+=e[t][7])))));return r+" "}(this.value)},move:function(e,t){var n=this.bbox();return n.x,n.y,this},at:function(e){if(!this.destination)return this;for(var t=this.value,r=this.destination.value,o=[],i=new n.PathArray,a=0,s=t.length;a<s;a++){o[a]=[t[a][0]];for(var l=1,c=t[a].length;l<c;l++)o[a][l]=t[a][l]+(r[a][l]-t[a][l])*e;"A"===o[a][0]&&(o[a][4]=+(0!=o[a][4]),o[a][5]=+(0!=o[a][5]))}return i.value=o,i},parse:function(e){if(e instanceof n.PathArray)return e.valueOf();var t,o={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(n.regex.numbersWithDots,c).replace(n.regex.pathLetters," $& ").replace(n.regex.hyphen,"$1 -").trim().split(n.regex.delimiter):e.reduce((function(e,t){return[].concat.call(e,t)}),[]);var i=[],a=new n.Point,s=new n.Point,l=0,u=e.length;do{n.regex.isPathLetter.test(e[l])?(t=e[l],++l):"M"==t?t="L":"m"==t&&(t="l"),i.push(r[t].call(null,e.slice(l,l+=o[t.toUpperCase()]).map(parseFloat),a,s))}while(u>l);return i},bbox:function(){return n.parser.draw||n.prepare(),n.parser.path.setAttribute("d",this.toString()),n.parser.path.getBBox()}}),n.Number=n.invent({create:function(e,t){this.value=0,this.unit=t||"","number"==typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"==typeof e?(t=e.match(n.regex.numberAndUnit))&&(this.value=parseFloat(t[1]),"%"==t[5]?this.value/=100:"s"==t[5]&&(this.value*=1e3),this.unit=t[5]):e instanceof n.Number&&(this.value=e.valueOf(),this.unit=e.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(e){return e=new n.Number(e),new n.Number(this+e,this.unit||e.unit)},minus:function(e){return e=new n.Number(e),new n.Number(this-e,this.unit||e.unit)},times:function(e){return e=new n.Number(e),new n.Number(this*e,this.unit||e.unit)},divide:function(e){return e=new n.Number(e),new n.Number(this/e,this.unit||e.unit)},to:function(e){var t=new n.Number(this);return"string"==typeof e&&(t.unit=e),t},morph:function(e){return this.destination=new n.Number(e),e.relative&&(this.destination.value+=this.value),this},at:function(e){return this.destination?new n.Number(this.destination).minus(this).times(e).plus(this):this}}}),n.Element=n.invent({create:function(e){this._stroke=n.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=e)&&(this.type=e.nodeName,this.node.instance=this,this._stroke=e.getAttribute("stroke")||this._stroke)},extend:{x:function(e){return this.attr("x",e)},y:function(e){return this.attr("y",e)},cx:function(e){return null==e?this.x()+this.width()/2:this.x(e-this.width()/2)},cy:function(e){return null==e?this.y()+this.height()/2:this.y(e-this.height()/2)},move:function(e,t){return this.x(e).y(t)},center:function(e,t){return this.cx(e).cy(t)},width:function(e){return this.attr("width",e)},height:function(e){return this.attr("height",e)},size:function(e,t){var r=h(this,e,t);return this.width(new n.Number(r.width)).height(new n.Number(r.height))},clone:function(e){this.writeDataToDom();var t=v(this.node.cloneNode(!0));return e?e.add(t):this.after(t),t},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(e){return this.after(e).remove(),e},addTo:function(e){return e.put(this)},putIn:function(e){return e.add(this)},id:function(e){return this.attr("id",e)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var e=this.attr("class");return null==e?[]:e.trim().split(n.regex.delimiter)},hasClass:function(e){return-1!=this.classes().indexOf(e)},addClass:function(e){if(!this.hasClass(e)){var t=this.classes();t.push(e),this.attr("class",t.join(" "))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter((function(t){return t!=e})).join(" ")),this},toggleClass:function(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e)},reference:function(e){return n.get(this.attr(e))},parent:function(t){var r=this;if(!r.node.parentNode)return null;if(r=n.adopt(r.node.parentNode),!t)return r;for(;r&&r.node instanceof e.SVGElement;){if("string"==typeof t?r.matches(t):r instanceof t)return r;if(!r.node.parentNode||"#document"==r.node.parentNode.nodeName)return null;r=n.adopt(r.node.parentNode)}},doc:function(){return this instanceof n.Doc?this:this.parent(n.Doc)},parents:function(e){var t=[],n=this;do{if(!(n=n.parent(e))||!n.node)break;t.push(n)}while(n.parent);return t},matches:function(e){return function(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}(this.node,e)},native:function(){return this.node},svg:function(e){var r=t.createElement("svg");if(!(e&&this instanceof n.Parent))return r.appendChild(e=t.createElement("svg")),this.writeDataToDom(),e.appendChild(this.node.cloneNode(!0)),r.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");r.innerHTML="<svg>"+e.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var o=0,i=r.firstChild.childNodes.length;o<i;o++)this.node.appendChild(r.firstChild.firstChild);return this},writeDataToDom:function(){return(this.each||this.lines)&&(this.each?this:this.lines()).each((function(){this.writeDataToDom()})),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this},setData:function(e){return this.dom=e,this},is:function(e){return function(e,t){return e instanceof t}(this,e)}}}),n.easing={"-":function(e){return e},"<>":function(e){return-Math.cos(e*Math.PI)/2+.5},">":function(e){return Math.sin(e*Math.PI/2)},"<":function(e){return 1-Math.cos(e*Math.PI/2)}},n.morph=function(e){return function(t,r){return new n.MorphObj(t,r).at(e)}},n.Situation=n.invent({create:function(e){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new n.Number(e.duration).valueOf(),this.delay=new n.Number(e.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=e.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),n.FX=n.invent({create:function(e){this._target=e,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(e,t,r){"object"===a(e)&&(t=e.ease,r=e.delay,e=e.duration);var o=new n.Situation({duration:e||1e3,delay:r||0,ease:n.easing[t||"-"]||t});return this.queue(o),this},target:function(e){return e&&e instanceof n.Element?(this._target=e,this):this._target},timeToAbsPos:function(e){return(e-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(e){return this.situation.duration/this._speed*e+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=e.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){e.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(e){return("function"==typeof e||e instanceof n.Situation)&&this.situations.push(e),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof n.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var e,t=this.situation;if(t.init)return this;for(var r in t.animations){e=this.target()[r](),Array.isArray(e)||(e=[e]),Array.isArray(t.animations[r])||(t.animations[r]=[t.animations[r]]);for(var o=e.length;o--;)t.animations[r][o]instanceof n.Number&&(e[o]=new n.Number(e[o])),t.animations[r][o]=e[o].morph(t.animations[r][o])}for(var r in t.attrs)t.attrs[r]=new n.MorphObj(this.target().attr(r),t.attrs[r]);for(var r in t.styles)t.styles[r]=new n.MorphObj(this.target().style(r),t.styles[r]);return t.initialTransformation=this.target().matrixify(),t.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(e,t){var n=this.active;return this.active=!1,t&&this.clearQueue(),e&&this.situation&&(!n&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(e){var t=this.last();return this.target().on("finished.fx",(function n(r){r.detail.situation==t&&(e.call(this,t),this.off("finished.fx",n))})),this._callStart()},during:function(e){var t=this.last(),r=function(r){r.detail.situation==t&&e.call(this,r.detail.pos,n.morph(r.detail.pos),r.detail.eased,t)};return this.target().off("during.fx",r).on("during.fx",r),this.after((function(){this.off("during.fx",r)})),this._callStart()},afterAll:function(e){var t=function t(n){e.call(this),this.off("allfinished.fx",t)};return this.target().off("allfinished.fx",t).on("allfinished.fx",t),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(e,t,n){return this.last()[n||"animations"][e]=t,this._callStart()},step:function(e){var t,n,r;e||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(t=Math.max(this.absPos,0),n=Math.floor(t),!0===this.situation.loops||n<this.situation.loops?(this.pos=t-n,r=this.situation.loop,this.situation.loop=n):(this.absPos=this.situation.loops,this.pos=1,r=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=Boolean((this.situation.loop-r)%2))):(this.absPos=Math.min(this.absPos,1),this.pos=this.absPos),this.pos<0&&(this.pos=0),this.situation.reversed&&(this.pos=1-this.pos);var o=this.situation.ease(this.pos);for(var i in this.situation.once)i>this.lastPos&&i<=o&&(this.situation.once[i].call(this.target(),this.pos,o),delete this.situation.once[i]);return this.active&&this.target().fire("during",{pos:this.pos,eased:o,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=o,this):this},eachAt:function(){var e,t=this,r=this.target(),o=this.situation;for(var i in o.animations)e=[].concat(o.animations[i]).map((function(e){return"string"!=typeof e&&e.at?e.at(o.ease(t.pos),t.pos):e})),r[i].apply(r,e);for(var i in o.attrs)e=[i].concat(o.attrs[i]).map((function(e){return"string"!=typeof e&&e.at?e.at(o.ease(t.pos),t.pos):e})),r.attr.apply(r,e);for(var i in o.styles)e=[i].concat(o.styles[i]).map((function(e){return"string"!=typeof e&&e.at?e.at(o.ease(t.pos),t.pos):e})),r.style.apply(r,e);if(o.transforms.length){e=o.initialTransformation,i=0;for(var a=o.transforms.length;i<a;i++){var s=o.transforms[i];s instanceof n.Matrix?e=s.relative?e.multiply((new n.Matrix).morph(s).at(o.ease(this.pos))):e.morph(s).at(o.ease(this.pos)):(s.relative||s.undo(e.extract()),e=e.multiply(s.at(o.ease(this.pos))))}r.matrix(e)}return this},once:function(e,t,n){var r=this.last();return n||(e=r.ease(e)),r.once[e]=t,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:n.Element,construct:{animate:function(e,t,r){return(this.fx||(this.fx=new n.FX(this))).animate(e,t,r)},delay:function(e){return(this.fx||(this.fx=new n.FX(this))).delay(e)},stop:function(e,t){return this.fx&&this.fx.stop(e,t),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),n.MorphObj=n.invent({create:function(e,t){return n.Color.isColor(t)?new n.Color(e).morph(t):n.regex.delimiter.test(e)?n.regex.pathLetters.test(e)?new n.PathArray(e).morph(t):new n.Array(e).morph(t):n.regex.numberAndUnit.test(t)?new n.Number(e).morph(t):(this.value=e,void(this.destination=t))},extend:{at:function(e,t){return t<1?this.value:this.destination},valueOf:function(){return this.value}}}),n.extend(n.FX,{attr:function(e,t,n){if("object"===a(e))for(var r in e)this.attr(r,e[r]);else this.add(e,t,"attrs");return this},plot:function(e,t,n,r){return 4==arguments.length?this.plot([e,t,n,r]):this.add("plot",new(this.target().morphArray)(e))}}),n.Box=n.invent({create:function(e,t,r,o){if(!("object"!==a(e)||e instanceof n.Element))return n.Box.call(this,null!=e.left?e.left:e.x,null!=e.top?e.top:e.y,e.width,e.height);4==arguments.length&&(this.x=e,this.y=t,this.width=r,this.height=o),m(this)}}),n.BBox=n.invent({create:function(e){if(n.Box.apply(this,[].slice.call(arguments)),e instanceof n.Element){var r;try{if(!t.documentElement.contains){for(var o=e.node;o.parentNode;)o=o.parentNode;if(o!=t)throw new Error("Element not in the dom")}r=e.node.getBBox()}catch(t){if(e instanceof n.Shape){n.parser.draw||n.prepare();var i=e.clone(n.parser.draw.instance).show();i&&i.node&&"function"==typeof i.node.getBBox&&(r=i.node.getBBox()),i&&"function"==typeof i.remove&&i.remove()}else r={x:e.node.clientLeft,y:e.node.clientTop,width:e.node.clientWidth,height:e.node.clientHeight}}n.Box.call(this,r)}},inherit:n.Box,parent:n.Element,construct:{bbox:function(){return new n.BBox(this)}}}),n.BBox.prototype.constructor=n.BBox,n.Matrix=n.invent({create:function(e){var t=g([1,0,0,1,0,0]);e=null===e?t:e instanceof n.Element?e.matrixify():"string"==typeof e?g(e.split(n.regex.delimiter).map(parseFloat)):6==arguments.length?g([].slice.call(arguments)):Array.isArray(e)?g(e):e&&"object"===a(e)?e:t;for(var r=b.length-1;r>=0;--r)this[b[r]]=null!=e[b[r]]?e[b[r]]:t[b[r]]},extend:{extract:function(){var e=f(this,0,1);f(this,1,0);var t=180/Math.PI*Math.atan2(e.y,e.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(t*Math.PI/180)+this.f*Math.sin(t*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(t*Math.PI/180)+this.e*Math.sin(-t*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new n.Matrix(this)}},clone:function(){return new n.Matrix(this)},morph:function(e){return this.destination=new n.Matrix(e),this},multiply:function(e){return new n.Matrix(this.native().multiply(function(e){return e instanceof n.Matrix||(e=new n.Matrix(e)),e}(e).native()))},inverse:function(){return new n.Matrix(this.native().inverse())},translate:function(e,t){return new n.Matrix(this.native().translate(e||0,t||0))},native:function(){for(var e=n.parser.native.createSVGMatrix(),t=b.length-1;t>=0;t--)e[b[t]]=this[b[t]];return e},toString:function(){return"matrix("+y(this.a)+","+y(this.b)+","+y(this.c)+","+y(this.d)+","+y(this.e)+","+y(this.f)+")"}},parent:n.Element,construct:{ctm:function(){return new n.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof n.Nested){var e=this.rect(1,1),t=e.node.getScreenCTM();return e.remove(),new n.Matrix(t)}return new n.Matrix(this.node.getScreenCTM())}}}),n.Point=n.invent({create:function(e,t){var n;n=Array.isArray(e)?{x:e[0],y:e[1]}:"object"===a(e)?{x:e.x,y:e.y}:null!=e?{x:e,y:null!=t?t:e}:{x:0,y:0},this.x=n.x,this.y=n.y},extend:{clone:function(){return new n.Point(this)},morph:function(e,t){return this.destination=new n.Point(e,t),this}}}),n.extend(n.Element,{point:function(e,t){return new n.Point(e,t).transform(this.screenCTM().inverse())}}),n.extend(n.Element,{attr:function(e,t,r){if(null==e){for(e={},r=(t=this.node.attributes).length-1;r>=0;r--)e[t[r].nodeName]=n.regex.isNumber.test(t[r].nodeValue)?parseFloat(t[r].nodeValue):t[r].nodeValue;return e}if("object"===a(e))for(var o in e)this.attr(o,e[o]);else if(null===t)this.node.removeAttribute(e);else{if(null==t)return null==(t=this.node.getAttribute(e))?n.defaults.attrs[e]:n.regex.isNumber.test(t)?parseFloat(t):t;"stroke-width"==e?this.attr("stroke",parseFloat(t)>0?this._stroke:null):"stroke"==e&&(this._stroke=t),"fill"!=e&&"stroke"!=e||(n.regex.isImage.test(t)&&(t=this.doc().defs().image(t,0,0)),t instanceof n.Image&&(t=this.doc().defs().pattern(0,0,(function(){this.add(t)})))),"number"==typeof t?t=new n.Number(t):n.Color.isColor(t)?t=new n.Color(t):Array.isArray(t)&&(t=new n.Array(t)),"leading"==e?this.leading&&this.leading(t):"string"==typeof r?this.node.setAttributeNS(r,e,t.toString()):this.node.setAttribute(e,t.toString()),!this.rebuild||"font-size"!=e&&"x"!=e||this.rebuild(e,t)}return this}}),n.extend(n.Element,{transform:function(e,t){var r;return"object"!==a(e)?(r=new n.Matrix(this).extract(),"string"==typeof e?r[e]:r):(r=new n.Matrix(this),t=!!t||!!e.relative,null!=e.a&&(r=t?r.multiply(new n.Matrix(e)):new n.Matrix(e)),this.attr("transform",r))}}),n.extend(n.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(n.regex.transforms).slice(0,-1).map((function(e){var t=e.trim().split("(");return[t[0],t[1].split(n.regex.delimiter).map((function(e){return parseFloat(e)}))]})).reduce((function(e,t){return"matrix"==t[0]?e.multiply(g(t[1])):e[t[0]].apply(e,t[1])}),new n.Matrix)},toParent:function(e){if(this==e)return this;var t=this.screenCTM(),n=e.screenCTM().inverse();return this.addTo(e).untransform().transform(n.multiply(t)),this},toDoc:function(){return this.toParent(this.doc())}}),n.Transformation=n.invent({create:function(e,t){if(arguments.length>1&&"boolean"!=typeof t)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(e))for(var n=0,r=this.arguments.length;n<r;++n)this[this.arguments[n]]=e[n];else if(e&&"object"===a(e))for(n=0,r=this.arguments.length;n<r;++n)this[this.arguments[n]]=e[this.arguments[n]];this.inversed=!1,!0===t&&(this.inversed=!0)}}),n.Translate=n.invent({parent:n.Matrix,inherit:n.Transformation,create:function(e,t){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),n.extend(n.Element,{style:function(e,t){if(0==arguments.length)return this.node.style.cssText||"";if(arguments.length<2)if("object"===a(e))for(var r in e)this.style(r,e[r]);else{if(!n.regex.isCss.test(e))return this.node.style[u(e)];for(e=e.split(/\s*;\s*/).filter((function(e){return!!e})).map((function(e){return e.split(/\s*:\s*/)}));t=e.pop();)this.style(t[0],t[1])}else this.node.style[u(e)]=null===t||n.regex.isBlank.test(t)?"":t;return this}}),n.Parent=n.invent({create:function(e){this.constructor.call(this,e)},inherit:n.Element,extend:{children:function(){return n.utils.map(n.utils.filterSVGElements(this.node.childNodes),(function(e){return n.adopt(e)}))},add:function(e,t){return null==t?this.node.appendChild(e.node):e.node!=this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this},put:function(e,t){return this.add(e,t),e},has:function(e){return this.index(e)>=0},index:function(e){return[].slice.call(this.node.childNodes).indexOf(e.node)},get:function(e){return n.adopt(this.node.childNodes[e])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(e,t){for(var r=this.children(),o=0,i=r.length;o<i;o++)r[o]instanceof n.Element&&e.apply(r[o],[o,r]),t&&r[o]instanceof n.Container&&r[o].each(e,t);return this},removeElement:function(e){return this.node.removeChild(e.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this},defs:function(){return this.doc().defs()}}}),n.extend(n.Parent,{ungroup:function(e,t){return 0===t||this instanceof n.Defs||this.node==n.parser.draw||(e=e||(this instanceof n.Doc?this:this.parent(n.Parent)),t=t||1/0,this.each((function(){return this instanceof n.Defs?this:this instanceof n.Parent?this.ungroup(e,t-1):this.toParent(e)})),this.node.firstChild||this.remove()),this},flatten:function(e,t){return this.ungroup(e,t)}}),n.Container=n.invent({create:function(e){this.constructor.call(this,e)},inherit:n.Parent}),n.ViewBox=n.invent({parent:n.Container,construct:{}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach((function(e){n.Element.prototype[e]=function(t){return n.on(this.node,e,t),this}})),n.listeners=[],n.handlerMap=[],n.listenerId=0,n.on=function(e,t,r,o,i){var a=r.bind(o||e.instance||e),s=(n.handlerMap.indexOf(e)+1||n.handlerMap.push(e))-1,l=t.split(".")[0],c=t.split(".")[1]||"*";n.listeners[s]=n.listeners[s]||{},n.listeners[s][l]=n.listeners[s][l]||{},n.listeners[s][l][c]=n.listeners[s][l][c]||{},r._svgjsListenerId||(r._svgjsListenerId=++n.listenerId),n.listeners[s][l][c][r._svgjsListenerId]=a,e.addEventListener(l,a,i||{passive:!0})},n.off=function(e,t,r){var o=n.handlerMap.indexOf(e),i=t&&t.split(".")[0],a=t&&t.split(".")[1],s="";if(-1!=o)if(r){if("function"==typeof r&&(r=r._svgjsListenerId),!r)return;n.listeners[o][i]&&n.listeners[o][i][a||"*"]&&(e.removeEventListener(i,n.listeners[o][i][a||"*"][r],!1),delete n.listeners[o][i][a||"*"][r])}else if(a&&i){if(n.listeners[o][i]&&n.listeners[o][i][a]){for(var l in n.listeners[o][i][a])n.off(e,[i,a].join("."),l);delete n.listeners[o][i][a]}}else if(a)for(var c in n.listeners[o])for(var s in n.listeners[o][c])a===s&&n.off(e,[c,a].join("."));else if(i){if(n.listeners[o][i]){for(var s in n.listeners[o][i])n.off(e,[i,s].join("."));delete n.listeners[o][i]}}else{for(var c in n.listeners[o])n.off(e,c);delete n.listeners[o],delete n.handlerMap[o]}},n.extend(n.Element,{on:function(e,t,r,o){return n.on(this.node,e,t,r,o),this},off:function(e,t){return n.off(this.node,e,t),this},fire:function(t,r){return t instanceof e.Event?this.node.dispatchEvent(t):this.node.dispatchEvent(t=new n.CustomEvent(t,{detail:r,cancelable:!0})),this._event=t,this},event:function(){return this._event}}),n.Defs=n.invent({create:"defs",inherit:n.Container}),n.G=n.invent({create:"g",inherit:n.Container,extend:{x:function(e){return null==e?this.transform("x"):this.transform({x:e-this.x()},!0)}},construct:{group:function(){return this.put(new n.G)}}}),n.Doc=n.invent({create:function(e){e&&("svg"==(e="string"==typeof e?t.getElementById(e):e).nodeName?this.constructor.call(this,e):(this.constructor.call(this,n.create("svg")),e.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:n.Container,extend:{namespace:function(){return this.attr({xmlns:n.ns,version:"1.1"}).attr("xmlns:xlink",n.xlink,n.xmlns).attr("xmlns:svgjs",n.svgjs,n.xmlns)},defs:function(){var e;return this._defs||((e=this.node.getElementsByTagName("defs")[0])?this._defs=n.adopt(e):this._defs=new n.Defs,this.node.appendChild(this._defs.node)),this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,n.parser.draw&&!n.parser.draw.parentNode&&this.node.appendChild(n.parser.draw),this},clone:function(e){this.writeDataToDom();var t=this.node,n=v(t.cloneNode(!0));return e?(e.node||e).appendChild(n.node):t.parentNode.insertBefore(n.node,t.nextSibling),n}}}),n.extend(n.Element,{}),n.Gradient=n.invent({create:function(e){this.constructor.call(this,n.create(e+"Gradient")),this.type=e},inherit:n.Container,extend:{at:function(e,t,r){return this.put(new n.Stop).update(e,t,r)},update:function(e){return this.clear(),"function"==typeof e&&e.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(e,t,r){return"transform"==e&&(e="gradientTransform"),n.Container.prototype.attr.call(this,e,t,r)}},construct:{gradient:function(e,t){return this.defs().gradient(e,t)}}}),n.extend(n.Gradient,n.FX,{from:function(e,t){return"radial"==(this._target||this).type?this.attr({fx:new n.Number(e),fy:new n.Number(t)}):this.attr({x1:new n.Number(e),y1:new n.Number(t)})},to:function(e,t){return"radial"==(this._target||this).type?this.attr({cx:new n.Number(e),cy:new n.Number(t)}):this.attr({x2:new n.Number(e),y2:new n.Number(t)})}}),n.extend(n.Defs,{gradient:function(e,t){return this.put(new n.Gradient(e)).update(t)}}),n.Stop=n.invent({create:"stop",inherit:n.Element,extend:{update:function(e){return("number"==typeof e||e instanceof n.Number)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=e.opacity&&this.attr("stop-opacity",e.opacity),null!=e.color&&this.attr("stop-color",e.color),null!=e.offset&&this.attr("offset",new n.Number(e.offset)),this}}}),n.Pattern=n.invent({create:"pattern",inherit:n.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(e){return this.clear(),"function"==typeof e&&e.call(this,this),this},toString:function(){return this.fill()},attr:function(e,t,r){return"transform"==e&&(e="patternTransform"),n.Container.prototype.attr.call(this,e,t,r)}},construct:{pattern:function(e,t,n){return this.defs().pattern(e,t,n)}}}),n.extend(n.Defs,{pattern:function(e,t,r){return this.put(new n.Pattern).update(r).attr({x:0,y:0,width:e,height:t,patternUnits:"userSpaceOnUse"})}}),n.Shape=n.invent({create:function(e){this.constructor.call(this,e)},inherit:n.Element}),n.Symbol=n.invent({create:"symbol",inherit:n.Container,construct:{symbol:function(){return this.put(new n.Symbol)}}}),n.Use=n.invent({create:"use",inherit:n.Shape,extend:{element:function(e,t){return this.attr("href",(t||"")+"#"+e,n.xlink)}},construct:{use:function(e,t){return this.put(new n.Use).element(e,t)}}}),n.Rect=n.invent({create:"rect",inherit:n.Shape,construct:{rect:function(e,t){return this.put(new n.Rect).size(e,t)}}}),n.Circle=n.invent({create:"circle",inherit:n.Shape,construct:{circle:function(e){return this.put(new n.Circle).rx(new n.Number(e).divide(2)).move(0,0)}}}),n.extend(n.Circle,n.FX,{rx:function(e){return this.attr("r",e)},ry:function(e){return this.rx(e)}}),n.Ellipse=n.invent({create:"ellipse",inherit:n.Shape,construct:{ellipse:function(e,t){return this.put(new n.Ellipse).size(e,t).move(0,0)}}}),n.extend(n.Ellipse,n.Rect,n.FX,{rx:function(e){return this.attr("rx",e)},ry:function(e){return this.attr("ry",e)}}),n.extend(n.Circle,n.Ellipse,{x:function(e){return null==e?this.cx()-this.rx():this.cx(e+this.rx())},y:function(e){return null==e?this.cy()-this.ry():this.cy(e+this.ry())},cx:function(e){return null==e?this.attr("cx"):this.attr("cx",e)},cy:function(e){return null==e?this.attr("cy"):this.attr("cy",e)},width:function(e){return null==e?2*this.rx():this.rx(new n.Number(e).divide(2))},height:function(e){return null==e?2*this.ry():this.ry(new n.Number(e).divide(2))},size:function(e,t){var r=h(this,e,t);return this.rx(new n.Number(r.width).divide(2)).ry(new n.Number(r.height).divide(2))}}),n.Line=n.invent({create:"line",inherit:n.Shape,extend:{array:function(){return new n.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(e,t,r,o){return null==e?this.array():(e=void 0!==t?{x1:e,y1:t,x2:r,y2:o}:new n.PointArray(e).toLine(),this.attr(e))},move:function(e,t){return this.attr(this.array().move(e,t).toLine())},size:function(e,t){var n=h(this,e,t);return this.attr(this.array().size(n.width,n.height).toLine())}},construct:{line:function(e,t,r,o){return n.Line.prototype.plot.apply(this.put(new n.Line),null!=e?[e,t,r,o]:[0,0,0,0])}}}),n.Polyline=n.invent({create:"polyline",inherit:n.Shape,construct:{polyline:function(e){return this.put(new n.Polyline).plot(e||new n.PointArray)}}}),n.Polygon=n.invent({create:"polygon",inherit:n.Shape,construct:{polygon:function(e){return this.put(new n.Polygon).plot(e||new n.PointArray)}}}),n.extend(n.Polyline,n.Polygon,{array:function(){return this._array||(this._array=new n.PointArray(this.attr("points")))},plot:function(e){return null==e?this.array():this.clear().attr("points","string"==typeof e?e:this._array=new n.PointArray(e))},clear:function(){return delete this._array,this},move:function(e,t){return this.attr("points",this.array().move(e,t))},size:function(e,t){var n=h(this,e,t);return this.attr("points",this.array().size(n.width,n.height))}}),n.extend(n.Line,n.Polyline,n.Polygon,{morphArray:n.PointArray,x:function(e){return null==e?this.bbox().x:this.move(e,this.bbox().y)},y:function(e){return null==e?this.bbox().y:this.move(this.bbox().x,e)},width:function(e){var t=this.bbox();return null==e?t.width:this.size(e,t.height)},height:function(e){var t=this.bbox();return null==e?t.height:this.size(t.width,e)}}),n.Path=n.invent({create:"path",inherit:n.Shape,extend:{morphArray:n.PathArray,array:function(){return this._array||(this._array=new n.PathArray(this.attr("d")))},plot:function(e){return null==e?this.array():this.clear().attr("d","string"==typeof e?e:this._array=new n.PathArray(e))},clear:function(){return delete this._array,this}},construct:{path:function(e){return this.put(new n.Path).plot(e||new n.PathArray)}}}),n.Image=n.invent({create:"image",inherit:n.Shape,extend:{load:function(t){if(!t)return this;var r=this,o=new e.Image;return n.on(o,"load",(function(){n.off(o);var e=r.parent(n.Pattern);null!==e&&(0==r.width()&&0==r.height()&&r.size(o.width,o.height),e&&0==e.width()&&0==e.height()&&e.size(r.width(),r.height()),"function"==typeof r._loaded&&r._loaded.call(r,{width:o.width,height:o.height,ratio:o.width/o.height,url:t}))})),n.on(o,"error",(function(e){n.off(o),"function"==typeof r._error&&r._error.call(r,e)})),this.attr("href",o.src=this.src=t,n.xlink)},loaded:function(e){return this._loaded=e,this},error:function(e){return this._error=e,this}},construct:{image:function(e,t,r){return this.put(new n.Image).load(e).size(t||0,r||t||0)}}}),n.Text=n.invent({create:function(){this.constructor.call(this,n.create("text")),this.dom.leading=new n.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",n.defaults.attrs["font-family"])},inherit:n.Shape,extend:{x:function(e){return null==e?this.attr("x"):this.attr("x",e)},text:function(e){if(void 0===e){e="";for(var t=this.node.childNodes,r=0,o=t.length;r<o;++r)0!=r&&3!=t[r].nodeType&&1==n.adopt(t[r]).dom.newLined&&(e+="\n"),e+=t[r].textContent;return e}if(this.clear().build(!0),"function"==typeof e)e.call(this,this);else{r=0;for(var i=(e=e.split("\n")).length;r<i;r++)this.tspan(e[r]).newLine()}return this.build(!1).rebuild()},size:function(e){return this.attr("font-size",e).rebuild()},leading:function(e){return null==e?this.dom.leading:(this.dom.leading=new n.Number(e),this.rebuild())},lines:function(){var e=(this.textPath&&this.textPath()||this).node,t=n.utils.map(n.utils.filterSVGElements(e.childNodes),(function(e){return n.adopt(e)}));return new n.Set(t)},rebuild:function(e){if("boolean"==typeof e&&(this._rebuild=e),this._rebuild){var t=this,r=0,o=this.dom.leading*new n.Number(this.attr("font-size"));this.lines().each((function(){this.dom.newLined&&(t.textPath()||this.attr("x",t.attr("x")),"\n"==this.text()?r+=o:(this.attr("dy",o+r),r=0))})),this.fire("rebuild")}return this},build:function(e){return this._build=!!e,this},setData:function(e){return this.dom=e,this.dom.leading=new n.Number(e.leading||1.3),this}},construct:{text:function(e){return this.put(new n.Text).text(e)},plain:function(e){return this.put(new n.Text).plain(e)}}}),n.Tspan=n.invent({create:"tspan",inherit:n.Shape,extend:{text:function(e){return null==e?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof e?e.call(this,this):this.plain(e),this)},dx:function(e){return this.attr("dx",e)},dy:function(e){return this.attr("dy",e)},newLine:function(){var e=this.parent(n.Text);return this.dom.newLined=!0,this.dy(e.dom.leading*e.attr("font-size")).attr("x",e.x())}}}),n.extend(n.Text,n.Tspan,{plain:function(e){return!1===this._build&&this.clear(),this.node.appendChild(t.createTextNode(e)),this},tspan:function(e){var t=(this.textPath&&this.textPath()||this).node,r=new n.Tspan;return!1===this._build&&this.clear(),t.appendChild(r.node),r.text(e)},clear:function(){for(var e=(this.textPath&&this.textPath()||this).node;e.hasChildNodes();)e.removeChild(e.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),n.TextPath=n.invent({create:"textPath",inherit:n.Parent,parent:n.Text,construct:{morphArray:n.PathArray,array:function(){var e=this.track();return e?e.array():null},plot:function(e){var t=this.track(),n=null;return t&&(n=t.plot(e)),null==e?n:this},track:function(){var e=this.textPath();if(e)return e.reference("href")},textPath:function(){if(this.node.firstChild&&"textPath"==this.node.firstChild.nodeName)return n.adopt(this.node.firstChild)}}}),n.Nested=n.invent({create:function(){this.constructor.call(this,n.create("svg")),this.style("overflow","visible")},inherit:n.Container,construct:{nested:function(){return this.put(new n.Nested)}}});var l={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(e,t){return"color"==t?e:e+"-"+t}};function c(e,t,r,o){return r+o.replace(n.regex.dots," .")}function u(e){return e.toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function p(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function h(e,t,n){if(null==t||null==n){var r=e.bbox();null==t?t=r.width/r.height*n:null==n&&(n=r.height/r.width*t)}return{width:t,height:n}}function f(e,t,n){return{x:t*e.a+n*e.c+0,y:t*e.b+n*e.d+0}}function g(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}function v(t){for(var r=t.childNodes.length-1;r>=0;r--)t.childNodes[r]instanceof e.SVGElement&&v(t.childNodes[r]);return n.adopt(t).id(n.eid(t.nodeName))}function m(e){return null==e.x&&(e.x=0,e.y=0,e.width=0,e.height=0),e.w=e.width,e.h=e.height,e.x2=e.x+e.width,e.y2=e.y+e.height,e.cx=e.x+e.width/2,e.cy=e.y+e.height/2,e}function y(e){return Math.abs(e)>1e-37?e:0}["fill","stroke"].forEach((function(e){var t={};t[e]=function(t){if(void 0===t)return this;if("string"==typeof t||n.Color.isRgb(t)||t&&"function"==typeof t.fill)this.attr(e,t);else for(var r=l[e].length-1;r>=0;r--)null!=t[l[e][r]]&&this.attr(l.prefix(e,l[e][r]),t[l[e][r]]);return this},n.extend(n.Element,n.FX,t)})),n.extend(n.Element,n.FX,{translate:function(e,t){return this.transform({x:e,y:t})},matrix:function(e){return this.attr("transform",new n.Matrix(6==arguments.length?[].slice.call(arguments):e))},opacity:function(e){return this.attr("opacity",e)},dx:function(e){return this.x(new n.Number(e).plus(this instanceof n.FX?0:this.x()),!0)},dy:function(e){return this.y(new n.Number(e).plus(this instanceof n.FX?0:this.y()),!0)}}),n.extend(n.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(e){return this.node.getPointAtLength(e)}}),n.Set=n.invent({create:function(e){Array.isArray(e)?this.members=e:this.clear()},extend:{add:function(){for(var e=[].slice.call(arguments),t=0,n=e.length;t<n;t++)this.members.push(e[t]);return this},remove:function(e){var t=this.index(e);return t>-1&&this.members.splice(t,1),this},each:function(e){for(var t=0,n=this.members.length;t<n;t++)e.apply(this.members[t],[t,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(e){return this.index(e)>=0},index:function(e){return this.members.indexOf(e)},get:function(e){return this.members[e]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(e){return new n.Set(e)}}}),n.FX.Set=n.invent({create:function(e){this.set=e}}),n.Set.inherit=function(){var e=[];for(var t in n.Shape.prototype)"function"==typeof n.Shape.prototype[t]&&"function"!=typeof n.Set.prototype[t]&&e.push(t);for(var t in e.forEach((function(e){n.Set.prototype[e]=function(){for(var t=0,r=this.members.length;t<r;t++)this.members[t]&&"function"==typeof this.members[t][e]&&this.members[t][e].apply(this.members[t],arguments);return"animate"==e?this.fx||(this.fx=new n.FX.Set(this)):this}})),e=[],n.FX.prototype)"function"==typeof n.FX.prototype[t]&&"function"!=typeof n.FX.Set.prototype[t]&&e.push(t);e.forEach((function(e){n.FX.Set.prototype[e]=function(){for(var t=0,n=this.set.members.length;t<n;t++)this.set.members[t].fx[e].apply(this.set.members[t].fx,arguments);return this}}))},n.extend(n.Element,{}),n.extend(n.Element,{remember:function(e,t){if("object"===a(arguments[0]))for(var n in e)this.remember(n,e[n]);else{if(1==arguments.length)return this.memory()[e];this.memory()[e]=t}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var e=arguments.length-1;e>=0;e--)delete this.memory()[arguments[e]];return this},memory:function(){return this._memory||(this._memory={})}}),n.get=function(e){var r=t.getElementById(function(e){var t=(e||"").toString().match(n.regex.reference);if(t)return t[1]}(e)||e);return n.adopt(r)},n.select=function(e,r){return new n.Set(n.utils.map((r||t).querySelectorAll(e),(function(e){return n.adopt(e)})))},n.extend(n.Parent,{select:function(e){return n.select(e,this.node)}});var b="abcdef".split("");if("function"!=typeof e.CustomEvent){var w=function(e,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var r=t.createEvent("CustomEvent");return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r};w.prototype=e.Event.prototype,n.CustomEvent=w}else n.CustomEvent=e.CustomEvent;return n},void 0!==(r=function(){return Me(Ne,Ne.document)}.call(t,n,t,e))&&(e.exports=r),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(e,t){return this.add(e,t),!e.attr("in")&&this.autoSetIn&&e.attr("in",this.source),e.attr("result")||e.attr("result",e),e},blend:function(e,t,n){return this.put(new SVG.BlendEffect(e,t,n))},colorMatrix:function(e,t){return this.put(new SVG.ColorMatrixEffect(e,t))},convolveMatrix:function(e){return this.put(new SVG.ConvolveMatrixEffect(e))},componentTransfer:function(e){return this.put(new SVG.ComponentTransferEffect(e))},composite:function(e,t,n){return this.put(new SVG.CompositeEffect(e,t,n))},flood:function(e,t){return this.put(new SVG.FloodEffect(e,t))},offset:function(e,t){return this.put(new SVG.OffsetEffect(e,t))},image:function(e){return this.put(new SVG.ImageEffect(e))},merge:function(){var e=[void 0];for(var t in arguments)e.push(arguments[t]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,e)))},gaussianBlur:function(e,t){return this.put(new SVG.GaussianBlurEffect(e,t))},morphology:function(e,t){return this.put(new SVG.MorphologyEffect(e,t))},diffuseLighting:function(e,t,n){return this.put(new SVG.DiffuseLightingEffect(e,t,n))},displacementMap:function(e,t,n,r,o){return this.put(new SVG.DisplacementMapEffect(e,t,n,r,o))},specularLighting:function(e,t,n,r){return this.put(new SVG.SpecularLightingEffect(e,t,n,r))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(e,t,n,r,o){return this.put(new SVG.TurbulenceEffect(e,t,n,r,o))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(e){var t=this.put(new SVG.Filter);return"function"==typeof e&&e.call(t,t),t}}),SVG.extend(SVG.Container,{filter:function(e){return this.defs().filter(e)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(e){return this.filterer=e instanceof SVG.Element?e:this.doc().filter(e),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(e){return this.filterer&&!0===e&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",e)},result:function(e){return null==e?this.attr("result"):this.attr("result",e)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",e)},result:function(e){return null==e?this.attr("result"):this.attr("result",e)},toString:function(){return this.result()}}});var e={blend:function(e,t){return this.parent()&&this.parent().blend(this,e,t)},colorMatrix:function(e,t){return this.parent()&&this.parent().colorMatrix(e,t).in(this)},convolveMatrix:function(e){return this.parent()&&this.parent().convolveMatrix(e).in(this)},componentTransfer:function(e){return this.parent()&&this.parent().componentTransfer(e).in(this)},composite:function(e,t){return this.parent()&&this.parent().composite(this,e,t)},flood:function(e,t){return this.parent()&&this.parent().flood(e,t)},offset:function(e,t){return this.parent()&&this.parent().offset(e,t).in(this)},image:function(e){return this.parent()&&this.parent().image(e)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(e,t){return this.parent()&&this.parent().gaussianBlur(e,t).in(this)},morphology:function(e,t){return this.parent()&&this.parent().morphology(e,t).in(this)},diffuseLighting:function(e,t,n){return this.parent()&&this.parent().diffuseLighting(e,t,n).in(this)},displacementMap:function(e,t,n,r){return this.parent()&&this.parent().displacementMap(this,e,t,n,r)},specularLighting:function(e,t,n,r){return this.parent()&&this.parent().specularLighting(e,t,n,r).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(e,t,n,r,o){return this.parent()&&this.parent().turbulence(e,t,n,r,o).in(this)}};SVG.extend(SVG.Effect,e),SVG.extend(SVG.ParentEffect,e),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(e){this.attr("in",e)}}});var t={blend:function(e,t,n){this.attr({in:e,in2:t,mode:n||"normal"})},colorMatrix:function(e,t){"matrix"==e&&(t=o(t)),this.attr({type:e,values:void 0===t?null:t})},convolveMatrix:function(e){e=o(e),this.attr({order:Math.sqrt(e.split(" ").length),kernelMatrix:e})},composite:function(e,t,n){this.attr({in:e,in2:t,operator:n})},flood:function(e,t){this.attr("flood-color",e),null!=t&&this.attr("flood-opacity",t)},offset:function(e,t){this.attr({dx:e,dy:t})},image:function(e){this.attr("href",e,SVG.xlink)},displacementMap:function(e,t,n,r,o){this.attr({in:e,in2:t,scale:n,xChannelSelector:r,yChannelSelector:o})},gaussianBlur:function(e,t){null!=e||null!=t?this.attr("stdDeviation",i(Array.prototype.slice.call(arguments))):this.attr("stdDeviation","0 0")},morphology:function(e,t){this.attr({operator:e,radius:t})},tile:function(){},turbulence:function(e,t,n,r,o){this.attr({numOctaves:t,seed:n,stitchTiles:r,baseFrequency:e,type:o})}},n={merge:function(){var e;if(arguments[0]instanceof SVG.Set){var t=this;arguments[0].each((function(e){this instanceof SVG.MergeNode?t.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&t.put(new SVG.MergeNode(this))}))}else{e=Array.isArray(arguments[0])?arguments[0]:arguments;for(var n=0;n<e.length;n++)e[n]instanceof SVG.MergeNode?this.put(e[n]):this.put(new SVG.MergeNode(e[n]))}},componentTransfer:function(e){if(this.rgb=new SVG.Set,["r","g","b","a"].forEach(function(e){this[e]=new(SVG["Func"+e.toUpperCase()])("identity"),this.rgb.add(this[e]),this.node.appendChild(this[e].node)}.bind(this)),e)for(var t in e.rgb&&(["r","g","b"].forEach(function(t){this[t].attr(e.rgb)}.bind(this)),delete e.rgb),e)this[t].attr(e[t])},diffuseLighting:function(e,t,n){this.attr({surfaceScale:e,diffuseConstant:t,kernelUnitLength:n})},specularLighting:function(e,t,n,r){this.attr({surfaceScale:e,diffuseConstant:t,specularExponent:n,kernelUnitLength:r})}},r={distantLight:function(e,t){this.attr({azimuth:e,elevation:t})},pointLight:function(e,t,n){this.attr({x:e,y:t,z:n})},spotLight:function(e,t,n,r,o,i){this.attr({x:e,y:t,z:n,pointsAtX:r,pointsAtY:o,pointsAtZ:i})},mergeNode:function(e){this.attr("in",e)}};function o(e){return Array.isArray(e)&&(e=new SVG.Array(e)),e.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function i(e){if(!Array.isArray(e))return e;for(var t=0,n=e.length,r=[];t<n;t++)r.push(e[t]);return r.join(" ")}function a(){var e=function(){};for(var t in"function"==typeof arguments[arguments.length-1]&&(e=arguments[arguments.length-1],Array.prototype.splice.call(arguments,arguments.length-1,1)),arguments)for(var n in arguments[t])e(arguments[t][n],n,arguments[t])}["r","g","b","a"].forEach((function(e){r["Func"+e.toUpperCase()]=function(e){switch(this.attr("type",e),e){case"table":this.attr("tableValues",arguments[1]);break;case"linear":this.attr("slope",arguments[1]),this.attr("intercept",arguments[2]);break;case"gamma":this.attr("amplitude",arguments[1]),this.attr("exponent",arguments[2]),this.attr("offset",arguments[2])}}})),a(t,(function(e,t){var n=t.charAt(0).toUpperCase()+t.slice(1);SVG[n+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+n)),e.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.Effect,extend:{}})})),a(n,(function(e,t){var n=t.charAt(0).toUpperCase()+t.slice(1);SVG[n+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+n)),e.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.ParentEffect,extend:{}})})),a(r,(function(e,t){var n=t.charAt(0).toUpperCase()+t.slice(1);SVG[n]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+n)),e.apply(this,arguments)},inherit:SVG.ChildEffect,extend:{}})})),SVG.extend(SVG.MergeEffect,{in:function(e){return e instanceof SVG.MergeNode?this.add(e,0):this.add(new SVG.MergeNode(e),0),this}}),SVG.extend(SVG.CompositeEffect,SVG.BlendEffect,SVG.DisplacementMapEffect,{in2:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in2")+'"]').get(0)||this.attr("in2"):this.attr("in2",e)}}),SVG.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]}}.call(void 0),function(){function e(e,o,i,a,s,l,c){for(var u=e.slice(o,i||c),p=a.slice(s,l||c),d=0,h={pos:[0,0],start:[0,0]},f={pos:[0,0],start:[0,0]};u[d]=t.call(h,u[d]),p[d]=t.call(f,p[d]),u[d][0]!=p[d][0]||"M"==u[d][0]||"A"==u[d][0]&&(u[d][4]!=p[d][4]||u[d][5]!=p[d][5])?(Array.prototype.splice.apply(u,[d,1].concat(r.call(h,u[d]))),Array.prototype.splice.apply(p,[d,1].concat(r.call(f,p[d])))):(u[d]=n.call(h,u[d]),p[d]=n.call(f,p[d])),++d!=u.length||d!=p.length;)d==u.length&&u.push(["C",h.pos[0],h.pos[1],h.pos[0],h.pos[1],h.pos[0],h.pos[1]]),d==p.length&&p.push(["C",f.pos[0],f.pos[1],f.pos[0],f.pos[1],f.pos[0],f.pos[1]]);return{start:u,dest:p}}function t(e){switch(e[0]){case"z":case"Z":e[0]="L",e[1]=this.start[0],e[2]=this.start[1];break;case"H":e[0]="L",e[2]=this.pos[1];break;case"V":e[0]="L",e[2]=e[1],e[1]=this.pos[0];break;case"T":e[0]="Q",e[3]=e[1],e[4]=e[2],e[1]=this.reflection[1],e[2]=this.reflection[0];break;case"S":e[0]="C",e[6]=e[4],e[5]=e[3],e[4]=e[2],e[3]=e[1],e[2]=this.reflection[1],e[1]=this.reflection[0]}return e}function n(e){var t=e.length;return this.pos=[e[t-2],e[t-1]],-1!="SCQT".indexOf(e[0])&&(this.reflection=[2*this.pos[0]-e[t-4],2*this.pos[1]-e[t-3]]),e}function r(e){var t=[e];switch(e[0]){case"M":return this.pos=this.start=[e[1],e[2]],t;case"L":e[5]=e[3]=e[1],e[6]=e[4]=e[2],e[1]=this.pos[0],e[2]=this.pos[1];break;case"Q":e[6]=e[4],e[5]=e[3],e[4]=1*e[4]/3+2*e[2]/3,e[3]=1*e[3]/3+2*e[1]/3,e[2]=1*this.pos[1]/3+2*e[2]/3,e[1]=1*this.pos[0]/3+2*e[1]/3;break;case"A":e=(t=function(e,t){var n,r,o,i,a,s,l,c,u,p,d,h,f,g,v,m,y,b,w,C,x,S,E,_,R,O,A=Math.abs(t[1]),P=Math.abs(t[2]),T=t[3]%360,D=t[4],k=t[5],N=t[6],M=t[7],I=new SVG.Point(e),L=new SVG.Point(N,M),F=[];if(0===A||0===P||I.x===L.x&&I.y===L.y)return[["C",I.x,I.y,L.x,L.y,L.x,L.y]];for((r=(n=new SVG.Point((I.x-L.x)/2,(I.y-L.y)/2).transform((new SVG.Matrix).rotate(T))).x*n.x/(A*A)+n.y*n.y/(P*P))>1&&(A*=r=Math.sqrt(r),P*=r),o=(new SVG.Matrix).rotate(T).scale(1/A,1/P).rotate(-T),I=I.transform(o),s=(i=[(L=L.transform(o)).x-I.x,L.y-I.y])[0]*i[0]+i[1]*i[1],a=Math.sqrt(s),i[0]/=a,i[1]/=a,l=s<4?Math.sqrt(1-s/4):0,D===k&&(l*=-1),c=new SVG.Point((L.x+I.x)/2+l*-i[1],(L.y+I.y)/2+l*i[0]),u=new SVG.Point(I.x-c.x,I.y-c.y),p=new SVG.Point(L.x-c.x,L.y-c.y),d=Math.acos(u.x/Math.sqrt(u.x*u.x+u.y*u.y)),u.y<0&&(d*=-1),h=Math.acos(p.x/Math.sqrt(p.x*p.x+p.y*p.y)),p.y<0&&(h*=-1),k&&d>h&&(h+=2*Math.PI),!k&&d<h&&(h-=2*Math.PI),m=[],y=d,f=(h-d)/(g=Math.ceil(2*Math.abs(d-h)/Math.PI)),v=4*Math.tan(f/4)/3,x=0;x<=g;x++)w=Math.cos(y),b=Math.sin(y),C=new SVG.Point(c.x+w,c.y+b),m[x]=[new SVG.Point(C.x+v*b,C.y-v*w),C,new SVG.Point(C.x-v*b,C.y+v*w)],y+=f;for(m[0][0]=m[0][1].clone(),m[m.length-1][2]=m[m.length-1][1].clone(),o=(new SVG.Matrix).rotate(T).scale(A,P).rotate(-T),x=0,S=m.length;x<S;x++)m[x][0]=m[x][0].transform(o),m[x][1]=m[x][1].transform(o),m[x][2]=m[x][2].transform(o);for(x=1,S=m.length;x<S;x++)E=(C=m[x-1][2]).x,_=C.y,R=(C=m[x][0]).x,O=C.y,N=(C=m[x][1]).x,M=C.y,F.push(["C",E,_,R,O,N,M]);return F}(this.pos,e))[0]}return e[0]="C",this.pos=[e[5],e[6]],this.reflection=[2*e[5]-e[3],2*e[6]-e[4]],t}function o(e,t){if(!1===t)return!1;for(var n=t,r=e.length;n<r;++n)if("M"==e[n][0])return n;return!1}SVG.extend(SVG.PathArray,{morph:function(t){for(var n=this.value,r=this.parse(t),i=0,a=0,s=!1,l=!1;!1!==i||!1!==a;){var c;s=o(n,!1!==i&&i+1),l=o(r,!1!==a&&a+1),!1===i&&(i=0==(c=new SVG.PathArray(u.start).bbox()).height||0==c.width?n.push(n[0])-1:n.push(["M",c.x+c.width/2,c.y+c.height/2])-1),!1===a&&(a=0==(c=new SVG.PathArray(u.dest).bbox()).height||0==c.width?r.push(r[0])-1:r.push(["M",c.x+c.width/2,c.y+c.height/2])-1);var u=e(n,i,s,r,a,l);n=n.slice(0,i).concat(u.start,!1===s?[]:n.slice(s)),r=r.slice(0,a).concat(u.dest,!1===l?[]:r.slice(l)),i=!1!==s&&i+u.start.length,a=!1!==l&&a+u.dest.length}return this.value=n,this.destination=new SVG.PathArray,this.destination.value=r,this}})}(),function(){function e(e){e.remember("_draggable",this),this.el=e}e.prototype.init=function(e,t){var n=this;this.constraint=e,this.value=t,this.el.on("mousedown.drag",(function(e){n.start(e)})),this.el.on("touchstart.drag",(function(e){n.start(e)}))},e.prototype.transformPoint=function(e,t){var n=(e=e||window.event).changedTouches&&e.changedTouches[0]||e;return this.p.x=n.clientX-(t||0),this.p.y=n.clientY,this.p.matrixTransform(this.m)},e.prototype.getBBox=function(){var e=this.el.bbox();return this.el instanceof SVG.Nested&&(e=this.el.rbox()),(this.el instanceof SVG.G||this.el instanceof SVG.Use||this.el instanceof SVG.Nested)&&(e.x=this.el.x(),e.y=this.el.y()),e},e.prototype.start=function(e){if("click"!=e.type&&"mousedown"!=e.type&&"mousemove"!=e.type||1==(e.which||e.buttons)){var t=this;if(this.el.fire("beforedrag",{event:e,handler:this}),!this.el.event().defaultPrevented){e.preventDefault(),e.stopPropagation(),this.parent=this.parent||this.el.parent(SVG.Nested)||this.el.parent(SVG.Doc),this.p=this.parent.node.createSVGPoint(),this.m=this.el.node.getScreenCTM().inverse();var n,r=this.getBBox();if(this.el instanceof SVG.Text)switch(n=this.el.node.getComputedTextLength(),this.el.attr("text-anchor")){case"middle":n/=2;break;case"start":n=0}this.startPoints={point:this.transformPoint(e,n),box:r,transform:this.el.transform()},SVG.on(window,"mousemove.drag",(function(e){t.drag(e)})),SVG.on(window,"touchmove.drag",(function(e){t.drag(e)})),SVG.on(window,"mouseup.drag",(function(e){t.end(e)})),SVG.on(window,"touchend.drag",(function(e){t.end(e)})),this.el.fire("dragstart",{event:e,p:this.startPoints.point,m:this.m,handler:this})}}},e.prototype.drag=function(e){var t=this.getBBox(),n=this.transformPoint(e),r=this.startPoints.box.x+n.x-this.startPoints.point.x,o=this.startPoints.box.y+n.y-this.startPoints.point.y,i=this.constraint,a=n.x-this.startPoints.point.x,s=n.y-this.startPoints.point.y;if(this.el.fire("dragmove",{event:e,p:n,m:this.m,handler:this}),this.el.event().defaultPrevented)return n;if("function"==typeof i){var l=i.call(this.el,r,o,this.m);"boolean"==typeof l&&(l={x:l,y:l}),!0===l.x?this.el.x(r):!1!==l.x&&this.el.x(l.x),!0===l.y?this.el.y(o):!1!==l.y&&this.el.y(l.y)}else"object"==typeof i&&(null!=i.minX&&r<i.minX?a=(r=i.minX)-this.startPoints.box.x:null!=i.maxX&&r>i.maxX-t.width&&(a=(r=i.maxX-t.width)-this.startPoints.box.x),null!=i.minY&&o<i.minY?s=(o=i.minY)-this.startPoints.box.y:null!=i.maxY&&o>i.maxY-t.height&&(s=(o=i.maxY-t.height)-this.startPoints.box.y),null!=i.snapToGrid&&(r-=r%i.snapToGrid,o-=o%i.snapToGrid,a-=a%i.snapToGrid,s-=s%i.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:a,y:s},!0):this.el.move(r,o));return n},e.prototype.end=function(e){var t=this.drag(e);this.el.fire("dragend",{event:e,p:t,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(t,n){"function"!=typeof t&&"object"!=typeof t||(n=t,t=!0);var r=this.remember("_draggable")||new e(this);return(t=void 0===t||t)?r.init(n||{},t):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function e(e){this.el=e,e.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(e,t,n){var r="string"!=typeof e?e:t[e];return n?r/2:r},this.pointCoords=function(e,t){var n=this.pointsList[e];return{x:this.pointCoord(n[0],t,"t"===e||"b"===e),y:this.pointCoord(n[1],t,"r"===e||"l"===e)}}}e.prototype.init=function(e,t){var n=this.el.bbox();this.options={};var r=this.el.selectize.defaults.points;for(var o in this.el.selectize.defaults)this.options[o]=this.el.selectize.defaults[o],void 0!==t[o]&&(this.options[o]=t[o]);var i=["points","pointsExclude"];for(var o in i){var a=this.options[i[o]];"string"==typeof a?a=a.length>0?a.split(/\s*,\s*/i):[]:"boolean"==typeof a&&"points"===i[o]&&(a=a?r:[]),this.options[i[o]]=a}this.options.points=[r,this.options.points].reduce((function(e,t){return e.filter((function(e){return t.indexOf(e)>-1}))})),this.options.points=[this.options.points,this.options.pointsExclude].reduce((function(e,t){return e.filter((function(e){return t.indexOf(e)<0}))})),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(n.x,n.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(e):this.selectRect(e),this.observe(),this.cleanup()},e.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},e.prototype.getPointArray=function(){var e=this.el.bbox();return this.el.array().valueOf().map((function(t){return[t[0]-e.x,t[1]-e.y]}))},e.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),n=0,r=t.length;n<r;++n){var o=function(t){return function(n){(n=n||window.event).preventDefault?n.preventDefault():n.returnValue=!1,n.stopPropagation();var r=n.pageX||n.touches[0].pageX,o=n.pageY||n.touches[0].pageY;e.el.fire("point",{x:r,y:o,i:t,event:n})}}(n),i=this.drawPoint(t[n][0],t[n][1]).addClass(this.options.classPoints).addClass(this.options.classPoints+"_point").on("touchstart",o).on("mousedown",o);this.pointSelection.set.add(i)}},e.prototype.drawPoint=function(e,t){var n=this.options.pointType;switch(n){case"circle":return this.drawCircle(e,t);case"rect":return this.drawRect(e,t);default:if("function"==typeof n)return n.call(this,e,t);throw new Error("Unknown "+n+" point type!")}},e.prototype.drawCircle=function(e,t){return this.nested.circle(this.options.pointSize).center(e,t)},e.prototype.drawRect=function(e,t){return this.nested.rect(this.options.pointSize,this.options.pointSize).center(e,t)},e.prototype.updatePointSelection=function(){var e=this.getPointArray();this.pointSelection.set.each((function(t){this.cx()===e[t][0]&&this.cy()===e[t][1]||this.center(e[t][0],e[t][1])}))},e.prototype.updateRectSelection=function(){var e=this,t=this.el.bbox();if(this.rectSelection.set.get(0).attr({width:t.width,height:t.height}),this.options.points.length&&this.options.points.map((function(n,r){var o=e.pointCoords(n,t);e.rectSelection.set.get(r+1).center(o.x,o.y)})),this.options.rotationPoint){var n=this.rectSelection.set.length();this.rectSelection.set.get(n-1).center(t.width/2,20)}},e.prototype.selectRect=function(e){var t=this,n=this.el.bbox();function r(e){return function(n){(n=n||window.event).preventDefault?n.preventDefault():n.returnValue=!1,n.stopPropagation();var r=n.pageX||n.touches[0].pageX,o=n.pageY||n.touches[0].pageY;t.el.fire(e,{x:r,y:o,event:n})}}if(this.rectSelection.isSelected=e,this.rectSelection.set=this.rectSelection.set||this.parent.set(),this.rectSelection.set.get(0)||this.rectSelection.set.add(this.nested.rect(n.width,n.height).addClass(this.options.classRect)),this.options.points.length&&this.rectSelection.set.length()<2&&(this.options.points.map((function(e,o){var i=t.pointCoords(e,n),a=t.drawPoint(i.x,i.y).attr("class",t.options.classPoints+"_"+e).on("mousedown",r(e)).on("touchstart",r(e));t.rectSelection.set.add(a)})),this.rectSelection.set.each((function(){this.addClass(t.options.classPoints)}))),this.options.rotationPoint&&(this.options.points&&!this.rectSelection.set.get(9)||!this.options.points&&!this.rectSelection.set.get(1))){var o=function(e){(e=e||window.event).preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation();var n=e.pageX||e.touches[0].pageX,r=e.pageY||e.touches[0].pageY;t.el.fire("rot",{x:n,y:r,event:e})},i=this.drawPoint(n.width/2,20).attr("class",this.options.classPoints+"_rot").on("touchstart",o).on("mousedown",o);this.rectSelection.set.add(i)}},e.prototype.handler=function(){var e=this.el.bbox();this.nested.matrix(new SVG.Matrix(this.el).translate(e.x,e.y)),this.rectSelection.isSelected&&this.updateRectSelection(),this.pointSelection.isSelected&&this.updatePointSelection()},e.prototype.observe=function(){var e=this;if(MutationObserver)if(this.rectSelection.isSelected||this.pointSelection.isSelected)this.observerInst=this.observerInst||new MutationObserver((function(){e.handler()})),this.observerInst.observe(this.el.node,{attributes:!0});else try{this.observerInst.disconnect(),delete this.observerInst}catch(e){}else this.el.off("DOMAttrModified.select"),(this.rectSelection.isSelected||this.pointSelection.isSelected)&&this.el.on("DOMAttrModified.select",(function(){e.handler()}))},e.prototype.cleanup=function(){!this.rectSelection.isSelected&&this.rectSelection.set&&(this.rectSelection.set.each((function(){this.remove()})),this.rectSelection.set.clear(),delete this.rectSelection.set),!this.pointSelection.isSelected&&this.pointSelection.set&&(this.pointSelection.set.each((function(){this.remove()})),this.pointSelection.set.clear(),delete this.pointSelection.set),this.pointSelection.isSelected||this.rectSelection.isSelected||(this.nested.remove(),delete this.nested)},SVG.extend(SVG.Element,{selectize:function(t,n){return"object"==typeof t&&(n=t,t=!0),(this.remember("_selectHandler")||new e(this)).init(void 0===t||t,n||{}),this}}),SVG.Element.prototype.selectize.defaults={points:["lt","rt","rb","lb","t","r","b","l"],pointsExclude:[],classRect:"svg_select_boundingRect",classPoints:"svg_select_points",pointSize:7,rotationPoint:!0,deepSelect:!1,pointType:"circle"}}(),function(){(function(){function e(e){e.remember("_resizeHandler",this),this.el=e,this.parameters={},this.lastUpdateCall=null,this.p=e.doc().node.createSVGPoint()}e.prototype.transformPoint=function(e,t,n){return this.p.x=e-(this.offset.x-window.pageXOffset),this.p.y=t-(this.offset.y-window.pageYOffset),this.p.matrixTransform(n||this.m)},e.prototype._extractPosition=function(e){return{x:null!=e.clientX?e.clientX:e.touches[0].clientX,y:null!=e.clientY?e.clientY:e.touches[0].clientY}},e.prototype.init=function(e){var t=this;if(this.stop(),"stop"!==e){for(var n in this.options={},this.el.resize.defaults)this.options[n]=this.el.resize.defaults[n],void 0!==e[n]&&(this.options[n]=e[n]);this.el.on("lt.resize",(function(e){t.resize(e||window.event)})),this.el.on("rt.resize",(function(e){t.resize(e||window.event)})),this.el.on("rb.resize",(function(e){t.resize(e||window.event)})),this.el.on("lb.resize",(function(e){t.resize(e||window.event)})),this.el.on("t.resize",(function(e){t.resize(e||window.event)})),this.el.on("r.resize",(function(e){t.resize(e||window.event)})),this.el.on("b.resize",(function(e){t.resize(e||window.event)})),this.el.on("l.resize",(function(e){t.resize(e||window.event)})),this.el.on("rot.resize",(function(e){t.resize(e||window.event)})),this.el.on("point.resize",(function(e){t.resize(e||window.event)})),this.update()}},e.prototype.stop=function(){return this.el.off("lt.resize"),this.el.off("rt.resize"),this.el.off("rb.resize"),this.el.off("lb.resize"),this.el.off("t.resize"),this.el.off("r.resize"),this.el.off("b.resize"),this.el.off("l.resize"),this.el.off("rot.resize"),this.el.off("point.resize"),this},e.prototype.resize=function(e){var t=this;this.m=this.el.node.getScreenCTM().inverse(),this.offset={x:window.pageXOffset,y:window.pageYOffset};var n=this._extractPosition(e.detail.event);if(this.parameters={type:this.el.type,p:this.transformPoint(n.x,n.y),x:e.detail.x,y:e.detail.y,box:this.el.bbox(),rotation:this.el.transform().rotation},"text"===this.el.type&&(this.parameters.fontSize=this.el.attr()["font-size"]),void 0!==e.detail.i){var r=this.el.array().valueOf();this.parameters.i=e.detail.i,this.parameters.pointCoords=[r[e.detail.i][0],r[e.detail.i][1]]}switch(e.type){case"lt":this.calc=function(e,t){var n=this.snapToGrid(e,t);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y+n[1]).size(this.parameters.box.width-n[0],this.parameters.box.height-n[1])}};break;case"rt":this.calc=function(e,t){var n=this.snapToGrid(e,t,2);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).size(this.parameters.box.width+n[0],this.parameters.box.height-n[1])}};break;case"rb":this.calc=function(e,t){var n=this.snapToGrid(e,t,0);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+n[0],this.parameters.box.height+n[1])}};break;case"lb":this.calc=function(e,t){var n=this.snapToGrid(e,t,1);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).size(this.parameters.box.width-n[0],this.parameters.box.height+n[1])}};break;case"t":this.calc=function(e,t){var n=this.snapToGrid(e,t,2);if(this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).height(this.parameters.box.height-n[1])}};break;case"r":this.calc=function(e,t){var n=this.snapToGrid(e,t,0);if(this.parameters.box.width+n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+n[0])}};break;case"b":this.calc=function(e,t){var n=this.snapToGrid(e,t,0);if(this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+n[1])}};break;case"l":this.calc=function(e,t){var n=this.snapToGrid(e,t,1);if(this.parameters.box.width-n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).width(this.parameters.box.width-n[0])}};break;case"rot":this.calc=function(e,t){var n=e+this.parameters.p.x,r=t+this.parameters.p.y,o=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),i=Math.atan2(r-this.parameters.box.y-this.parameters.box.height/2,n-this.parameters.box.x-this.parameters.box.width/2),a=this.parameters.rotation+180*(i-o)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(a-a%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(e,t){var n=this.snapToGrid(e,t,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),r=this.el.array().valueOf();r[this.parameters.i][0]=this.parameters.pointCoords[0]+n[0],r[this.parameters.i][1]=this.parameters.pointCoords[1]+n[1],this.el.plot(r)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:e}),SVG.on(window,"touchmove.resize",(function(e){t.update(e||window.event)})),SVG.on(window,"touchend.resize",(function(){t.done()})),SVG.on(window,"mousemove.resize",(function(e){t.update(e||window.event)})),SVG.on(window,"mouseup.resize",(function(){t.done()}))},e.prototype.update=function(e){if(e){var t=this._extractPosition(e),n=this.transformPoint(t.x,t.y),r=n.x-this.parameters.p.x,o=n.y-this.parameters.p.y;this.lastUpdateCall=[r,o],this.calc(r,o),this.el.fire("resizing",{dx:r,dy:o,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},e.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},e.prototype.snapToGrid=function(e,t,n,r){var o;return void 0!==r?o=[(n+e)%this.options.snapToGrid,(r+t)%this.options.snapToGrid]:(n=null==n?3:n,o=[(this.parameters.box.x+e+(1&n?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+t+(2&n?0:this.parameters.box.height))%this.options.snapToGrid]),e<0&&(o[0]-=this.options.snapToGrid),t<0&&(o[1]-=this.options.snapToGrid),e-=Math.abs(o[0])<this.options.snapToGrid/2?o[0]:o[0]-(e<0?-this.options.snapToGrid:this.options.snapToGrid),t-=Math.abs(o[1])<this.options.snapToGrid/2?o[1]:o[1]-(t<0?-this.options.snapToGrid:this.options.snapToGrid),this.constraintToBox(e,t,n,r)},e.prototype.constraintToBox=function(e,t,n,r){var o,i,a=this.options.constraint||{};return void 0!==r?(o=n,i=r):(o=this.parameters.box.x+(1&n?0:this.parameters.box.width),i=this.parameters.box.y+(2&n?0:this.parameters.box.height)),void 0!==a.minX&&o+e<a.minX&&(e=a.minX-o),void 0!==a.maxX&&o+e>a.maxX&&(e=a.maxX-o),void 0!==a.minY&&i+t<a.minY&&(t=a.minY-i),void 0!==a.maxY&&i+t>a.maxY&&(t=a.maxY-i),[e,t]},e.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var n=e.slice(),r=this.parameters.box.width/this.parameters.box.height,o=this.parameters.box.width+e[0],i=this.parameters.box.height-e[1],a=o/i;return a<r?(n[1]=o/r-this.parameters.box.height,t&&(n[1]=-n[1])):a>r&&(n[0]=this.parameters.box.width-i*r,t&&(n[0]=-n[0])),n},SVG.extend(SVG.Element,{resize:function(t){return(this.remember("_resizeHandler")||new e(this)).init(t||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var He=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new w(this.ctx),this.ctx.axes=new ne(this.ctx),this.ctx.core=new Fe(this.ctx.el,this.ctx),this.ctx.config=new j({}),this.ctx.data=new U(this.ctx),this.ctx.grid=new $(this.ctx),this.ctx.graphics=new x(this.ctx),this.ctx.coreUtils=new S(this.ctx),this.ctx.crosshairs=new re(this.ctx),this.ctx.events=new ee(this.ctx),this.ctx.exports=new q(this.ctx),this.ctx.localization=new te(this.ctx),this.ctx.options=new P,this.ctx.responsive=new oe(this.ctx),this.ctx.series=new L(this.ctx),this.ctx.theme=new ie(this.ctx),this.ctx.formatters=new Y(this.ctx),this.ctx.titleSubtitle=new ae(this.ctx),this.ctx.legend=new he(this.ctx),this.ctx.toolbar=new fe(this.ctx),this.ctx.dimensions=new pe(this.ctx),this.ctx.updateHelpers=new Ge(this.ctx),this.ctx.zoomPanSelection=new ge(this.ctx),this.ctx.w.globals.tooltip=new xe(this.ctx)}}]),e}(),We=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"clear",value:function(e){var t=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:t})}},{key:"killSVG",value:function(e){e.each((function(e,t){this.removeClass("*"),this.off(),this.stop()}),!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,n=e.isUpdating,r=this.w.globals.dom.Paper.node;r.parentNode&&r.parentNode.parentNode&&!n&&(r.parentNode.parentNode.style.minHeight="unset");var o=this.w.globals.dom.baseEl;o&&this.ctx.eventList.forEach((function(e){o.removeEventListener(e,t.ctx.events.documentEvent)}));var i=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(i.Paper),i.Paper.remove(),i.elWrap=null,i.elGraphical=null,i.elAnnotations=null,i.elLegendWrap=null,i.baseEl=null,i.elGridRect=null,i.elGridRectMask=null,i.elGridRectMarkerMask=null,i.elForecastMask=null,i.elNonForecastMask=null,i.elDefs=null}}]),e}(),Ve=new WeakMap,je=function(){function e(t,n){s(this,e),this.opts=n,this.ctx=this,this.w=new z(n).init(),this.el=t,this.w.globals.cuid=b.randomId(),this.w.globals.chartID=this.w.config.chart.id?b.escapeString(this.w.config.chart.id):this.w.globals.cuid,new He(this).initModules(),this.create=b.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return c(e,[{key:"render",value:function(){var e=this;return new Promise((function(t,n){if(null!==e.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var r=e.w.config.chart.events.beforeMount;if("function"==typeof r&&r(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(e,t){var n=!1,r=e.getBoundingClientRect();"none"!==e.style.display&&0!==r.width||(n=!0);var o=new ResizeObserver((function(r){n&&t.call(e,r),n=!0}));e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(e.children).forEach((function(e){return o.observe(e)})):o.observe(e),Ve.set(t,o)}(e.el.parentNode,e.parentResizeHandler),!e.css){var o=e.el.getRootNode&&e.el.getRootNode(),i=b.is("ShadowRoot",o),a=e.el.ownerDocument,s=a.getElementById("apexcharts-css");!i&&s||(e.css=document.createElement("style"),e.css.id="apexcharts-css",e.css.textContent='.apexcharts-canvas {\n position: relative;\n user-select: none;\n /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */\n}\n\n\n/* scrollbar is not visible by default for legend, hence forcing the visibility */\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px;\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n}\n\n\n.apexcharts-inner {\n position: relative;\n}\n\n.apexcharts-text tspan {\n font-family: inherit;\n}\n\n.legend-mouseover-inactive {\n transition: 0.15s ease all;\n opacity: 0.20;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0;\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, 0.96);\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, 0.8);\n}\n\n.apexcharts-tooltip * {\n font-family: inherit;\n}\n\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #ECEFF1;\n border-bottom: 1px solid #ddd;\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, 0.7);\n border-bottom: 1px solid #333;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n font-weight: 600;\n margin-left: 5px;\n}\n\n.apexcharts-tooltip-title:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-z-value:empty {\n display: none;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n font-weight: 600;\n}\n\n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-goals-group, \n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n display: flex;\n}\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px;\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0px;\n margin-right: 10px;\n border-radius: 50%;\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px;\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0 !important;\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-box, .apexcharts-custom-tooltip {\n padding: 4px 8px;\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse;\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0;\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: bold;\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px;\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777;\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: bold;\n display: block;\n margin-bottom: 5px;\n}\n\n.apexcharts-xaxistooltip {\n opacity: 0;\n padding: 9px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-left: -6px;\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-left: -7px;\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%;\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%;\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #ECEFF1;\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #ECEFF1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-yaxistooltip {\n opacity: 0;\n padding: 4px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-top: -6px;\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-top: -7px;\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%;\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%;\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1;\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none;\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0;\n}\n\n.apexcharts-selection-rect {\n cursor: move;\n}\n\n.svg_select_boundingRect, .svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n}\n.apexcharts-selection-rect + g .svg_select_boundingRect,\n.apexcharts-selection-rect + g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden;\n}\n\n.apexcharts-selection-rect + g .svg_select_points_l,\n.apexcharts-selection-rect + g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible;\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon,\n.apexcharts-reset-icon,\n.apexcharts-pan-icon,\n.apexcharts-selection-icon,\n.apexcharts-menu-icon,\n.apexcharts-toolbar-custom-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6E8192;\n text-align: center;\n}\n\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-menu-icon svg {\n fill: #6E8192;\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(0.76)\n}\n\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg {\n fill: #f3f4f5;\n}\n\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg {\n fill: #008FFB;\n}\n\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg {\n fill: #333;\n}\n\n.apexcharts-selection-icon,\n.apexcharts-menu-icon {\n position: relative;\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px;\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-reset-icon,\n.apexcharts-menu-icon {\n transform: scale(0.85);\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(0.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px;\n}\n\n.apexcharts-pan-icon {\n transform: scale(0.62);\n position: relative;\n left: 1px;\n top: 0px;\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6E8192;\n stroke-width: 2;\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008FFB;\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333;\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0px 6px 2px 6px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: 0.15s ease all;\n pointer-events: none;\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: 0.15s ease all;\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer;\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee;\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n}\n\n@media screen and (min-width: 768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1;\n }\n}\n\n.apexcharts-datalabel.apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-pie-label,\n.apexcharts-datalabels,\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value {\n cursor: default;\n pointer-events: none;\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: 0.3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease;\n}\n\n.apexcharts-canvas .apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-gridline,\n.apexcharts-annotation-rect,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-line,\n.apexcharts-zoom-rect,\n.apexcharts-toolbar svg,\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-radar-series path,\n.apexcharts-radar-series polygon {\n pointer-events: none;\n}\n\n\n/* markers */\n\n.apexcharts-marker {\n transition: 0.15s ease all;\n}\n\n@keyframes opaque {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n\n/* Resize generated styles */\n\n@keyframes resizeanim {\n from {\n opacity: 0;\n }\n to {\n opacity: 0;\n }\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n}\n\n.resize-triggers,\n.resize-triggers>div,\n.contract-trigger:before {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.resize-triggers>div {\n background: #eee;\n overflow: auto;\n}\n\n.contract-trigger:before {\n width: 200%;\n height: 200%;\n}',i?o.prepend(e.css):a.head.appendChild(e.css))}var l=e.create(e.w.config.series,{});if(!l)return t(e);e.mount(l).then((function(){"function"==typeof e.w.config.chart.events.mounted&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(l)})).catch((function(e){n(e)}))}else n(new Error("Element not found"))}))}},{key:"create",value:function(e,t){var n=this.w;new He(this).initModules();var r=this.w.globals;if(r.noData=!1,r.animationEnded=!1,this.responsive.checkResponsiveConfig(t),n.config.xaxis.convertedCatToNumeric&&new V(n.config).convertCatToNumericXaxis(n.config,this.ctx),null===this.el)return r.animationEnded=!0,null;if(this.core.setupElements(),"treemap"===n.config.chart.type&&(n.config.grid.show=!1,n.config.yaxis[0].show=!1),0===r.svgWidth)return r.animationEnded=!0,null;var o=S.checkComboSeries(e);r.comboCharts=o.comboCharts,r.comboBarCount=o.comboBarCount;var i=e.every((function(e){return e.data&&0===e.data.length}));(0===e.length||i)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(e),this.theme.init(),new k(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),r.noData&&r.collapsedSeries.length!==r.series.length&&!n.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),r.axisCharts&&(this.core.coreCalculations(),"category"!==n.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=n.globals.minX,this.ctx.toolbar.maxX=n.globals.maxX),this.formatters.heatmapLabelFormatters(),new S(this).getLargestMarkerSize(),this.dimensions.plotCoords();var a=this.core.xySettings();this.grid.createGridMask();var s=this.core.plotChartType(e,a),l=new M(this);l.bringForward(),n.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition();var c={plot:{left:n.globals.translateX,top:n.globals.translateY,width:n.globals.gridWidth,height:n.globals.gridHeight}};return{elGraph:s,xyRatios:a,elInner:n.globals.dom.elGraphical,dimensions:c}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this,r=n.w;return new Promise((function(o,i){if(null===n.el)return i(new Error("Not enough data to display or target element not found"));(null===t||r.globals.allSeriesCollapsed)&&n.series.handleNoData(),"treemap"!==r.config.chart.type&&n.axes.drawAxis(r.config.chart.type,t.xyRatios),n.grid=new $(n);var a=n.grid.drawGrid();n.annotations=new T(n),n.annotations.drawImageAnnos(),n.annotations.drawTextAnnos(),"back"===r.config.grid.position&&a&&r.globals.dom.elGraphical.add(a.el);var s=new K(e.ctx),l=new J(e.ctx);if(null!==a&&(s.xAxisLabelCorrections(a.xAxisTickWidth),l.setYAxisTextAlignments(),r.config.yaxis.map((function(e,t){-1===r.globals.ignoreYAxisIndexes.indexOf(t)&&l.yAxisTitleRotate(t,e.opposite)}))),"back"===r.config.annotations.position&&(r.globals.dom.Paper.add(r.globals.dom.elAnnotations),n.annotations.drawAxesAnnotations()),Array.isArray(t.elGraph))for(var c=0;c<t.elGraph.length;c++)r.globals.dom.elGraphical.add(t.elGraph[c]);else r.globals.dom.elGraphical.add(t.elGraph);if("front"===r.config.grid.position&&a&&r.globals.dom.elGraphical.add(a.el),"front"===r.config.xaxis.crosshairs.position&&n.crosshairs.drawXCrosshairs(),"front"===r.config.yaxis[0].crosshairs.position&&n.crosshairs.drawYCrosshairs(),"front"===r.config.annotations.position&&(r.globals.dom.Paper.add(r.globals.dom.elAnnotations),n.annotations.drawAxesAnnotations()),!r.globals.noData){if(r.config.tooltip.enabled&&!r.globals.noData&&n.w.globals.tooltip.drawTooltip(t.xyRatios),r.globals.axisCharts&&(r.globals.isXNumeric||r.config.xaxis.convertedCatToNumeric||r.globals.isRangeBar))(r.config.chart.zoom.enabled||r.config.chart.selection&&r.config.chart.selection.enabled||r.config.chart.pan&&r.config.chart.pan.enabled)&&n.zoomPanSelection.init({xyRatios:t.xyRatios});else{var u=r.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach((function(e){u[e]=!1}))}r.config.chart.toolbar.show&&!r.globals.allSeriesCollapsed&&n.toolbar.createToolbar()}r.globals.memory.methodsToExec.length>0&&r.globals.memory.methodsToExec.forEach((function(e){e.method(e.params,!1,e.context)})),r.globals.axisCharts||r.globals.noData||n.core.resizeNonAxisCharts(),o(n)}))}},{key:"destroy",value:function(){var e,t;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,e=this.parentResizeHandler,(t=Ve.get(e))&&(t.disconnect(),Ve.delete(e));var n=this.w.config.chart.id;n&&Apex._chartInstances.forEach((function(e,t){e.id===b.escapeString(n)&&Apex._chartInstances.splice(t,1)})),new We(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.w;return a.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((function(e,n){return t.updateHelpers._extendSeries(e,n)}))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,n,r,o,i)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,n)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.w.config.series.slice();return r.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(r,t,n)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this;n.w.globals.dataChanged=!0,n.series.getPreviousPaths();for(var r=n.w.config.series.slice(),o=0;o<r.length;o++)if(null!==e[o]&&void 0!==e[o])for(var i=0;i<e[o].data.length;i++)r[o].data.push(e[o].data[i]);return n.w.config.series=r,t&&(n.w.globals.initialSeries=b.clone(n.w.config.series)),this.update()}},{key:"update",value:function(e){var t=this;return new Promise((function(n,r){new We(t.ctx).clear({isUpdating:!0});var o=t.create(t.w.config.series,e);if(!o)return n(t);t.mount(o).then((function(){"function"==typeof t.w.config.chart.events.updated&&t.w.config.chart.events.updated(t,t.w),t.events.fireEvent("updated",[t,t.w]),t.w.globals.isDirty=!0,n(t)})).catch((function(e){r(e)}))}))}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),t=[this];return e.length&&(t=[],e.forEach((function(e){t.push(e)}))),t}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter((function(e){if(e.group)return!0})).map((function(t){return e.w.config.chart.group===t.group?t.chart:e}))}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,t){return this.series.toggleSeriesOnHover(e,t)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(e,t)}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this;n&&(r=n),r.annotations.addXaxisAnnotationExternal(e,t,r)}},{key:"addYaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this;n&&(r=n),r.annotations.addYaxisAnnotationExternal(e,t,r)}},{key:"addPointAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this;n&&(r=n),r.annotations.addPointAnnotationExternal(e,t,r)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=this;t&&(n=t),n.annotations.removeAnnotation(n,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new Z(this.ctx);return t.getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new Z(this.ctx);return t.getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new q(this.ctx).dataURI(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;"function"==typeof e&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=b.escapeString(e),n=Apex._chartInstances.filter((function(e){return e.id===t}))[0];return n&&n.chart}},{key:"initOnLoad",value:function(){for(var t=document.querySelectorAll("[data-apexcharts]"),n=0;n<t.length;n++)new e(t[n],JSON.parse(t[n].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,t){var n=this.getChartByID(e);if(n){n.w.globals.isExecCalled=!0;var r=null;if(-1!==n.publicMethods.indexOf(t)){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];r=n[t].apply(n,i)}return r}}},{key:"merge",value:function(e,t){return b.extend(e,t)}}]),e}();e.exports=je},8991:function(e){"use strict";e.exports=function(e){return function(){var t=arguments.length;if(t){for(var n=[],r=-1;++r<t;)n[r]=arguments[r];return e.call(this,n)}return e.call(this,[])}}},6548:function(e,t,n){var r;r=function(){var e,t,o;return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof _dereq_&&_dereq_;if(!s&&l)return l(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){var n=t[a][1][e];return o(n||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof _dereq_&&_dereq_,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";t.exports=function(e){var t=e._SomePromiseArray;function n(e){var n=new t(e),r=n.promise();return n.setHowMany(1),n.setUnwrap(),n.init(),r}e.any=function(e){return n(e)},e.prototype.any=function(){return n(this)}}},{}],2:[function(e,t,n){"use strict";var o;try{throw new Error}catch(r){o=r}var i=e("./schedule"),a=e("./queue");function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new a(16),this._normalQueue=new a(16),this._haveDrainedQueues=!1;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=i}function l(e){for(;e.length()>0;)c(e)}function c(e){var t=e.shift();if("function"!==typeof t)t._settlePromises();else{var n=e.shift(),r=e.shift();t.call(n,r)}}s.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},s.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!==typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(r){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.prototype.invokeLater=function(e,t,n){this._lateQueue.push(e,t,n),this._queueTick()},s.prototype.invoke=function(e,t,n){this._normalQueue.push(e,t,n),this._queueTick()},s.prototype.settlePromises=function(e){this._normalQueue._pushOne(e),this._queueTick()},s.prototype._drainQueues=function(){l(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,l(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},t.exports=s,t.exports.firstLineError=o},{"./queue":26,"./schedule":29}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var o=!1,i=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(i,i,null,this,e)},s=function(e,t){0===(50397184&this._bitField)&&this._resolveCallback(t.target)},l=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(i){o||(o=!0,e.prototype._propagateFrom=r.propagateFromFunction(),e.prototype._boundValue=r.boundValueFunction());var c=n(i),u=new e(t);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(c),c instanceof e){var d={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:c};p._then(t,a,void 0,u,d),c._then(s,l,void 0,u,d),u._setOnCancel(c)}else u._resolveCallback(p);return u},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,n){"use strict";var o;"undefined"!==typeof Promise&&(o=Promise);var i=e("./promise")();i.noConflict=function(){try{Promise===i&&(Promise=o)}catch(r){}return i},t.exports=i},{"./promise":22}],5:[function(e,t,n){"use strict";var r=Object.create;if(r){var o=r(null),i=r(null);o[" size"]=i[" size"]=0}t.exports=function(t){var n=e("./util"),r=n.canEvaluate;function o(e){var r=function(e,r){var o;if(null!=e&&(o=e[r]),"function"!==typeof o){var i="Object "+n.classString(e)+" has no method '"+n.toString(r)+"'";throw new t.TypeError(i)}return o}(e,this.pop());return r.apply(e,this)}function i(e){return e[this]}function a(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}n.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(o,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"===typeof e)t=a;else if(r){var n=(void 0)(e);t=null!==n?n:i}else t=i;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,n){"use strict";t.exports=function(t,n,r,o){var i=e("./util"),a=i.tryCatch,s=i.errorObj,l=t._async;t.prototype.break=t.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(i.isArray(e))for(var n=0;n<e.length;++n)this._doInvokeOnCancel(e[n],t);else if(void 0!==e)if("function"===typeof e){if(!t){var r=a(e).call(this._boundValue());r===s&&(this._attachExtraTrace(r.e),l.throwLater(r.e))}}else e._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),l.invoke(this._doInvokeOnCancel,this,e)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(e,t,n){"use strict";t.exports=function(t){var n=e("./util"),r=e("./es5").keys,o=n.tryCatch,i=n.errorObj;return function(e,a,s){return function(l){var c=s._boundValue();e:for(var u=0;u<e.length;++u){var p=e[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(l instanceof p)return o(a).call(c,l)}else if("function"===typeof p){var d=o(p).call(c,l);if(d===i)return d;if(d)return o(a).call(c,l)}else if(n.isObject(l)){for(var h=r(p),f=0;f<h.length;++f){var g=h[f];if(p[g]!=l[g])continue e}return o(a).call(c,l)}}return t}}}},{"./es5":13,"./util":36}],8:[function(e,t,n){"use strict";t.exports=function(e){var t=!1,n=[];function r(){this._trace=new r.CapturedTrace(o())}function o(){var e=n.length-1;if(e>=0)return n[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},r.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},r.prototype._popContext=function(){if(void 0!==this._trace){var e=n.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},r.CapturedTrace=null,r.create=function(){if(t)return new r},r.deactivateLongStackTraces=function(){},r.activateLongStackTraces=function(){var n=e.prototype._pushContext,i=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,l=e.prototype._promiseCreated;r.deactivateLongStackTraces=function(){e.prototype._pushContext=n,e.prototype._popContext=i,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=l,t=!1},t=!0,e.prototype._pushContext=r.prototype._pushContext,e.prototype._popContext=r.prototype._popContext,e._peekContext=e.prototype._peekContext=o,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},r}},{}],9:[function(e,t,n){"use strict";t.exports=function(t,n,o,i){var a,s,l,c,u=t._async,p=e("./errors").Warning,d=e("./util"),h=e("./es5"),f=d.canAttachTrace,g=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,v=/\((?:timers\.js):\d+:\d+\)/,m=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,y=null,b=null,w=!1,C=!(0==d.env("BLUEBIRD_DEBUG")),x=!(0==d.env("BLUEBIRD_WARNINGS")||!C&&!d.env("BLUEBIRD_WARNINGS")),S=!(0==d.env("BLUEBIRD_LONG_STACK_TRACES")||!C&&!d.env("BLUEBIRD_LONG_STACK_TRACES")),E=0!=d.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(x||!!d.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function n(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();r()}function r(){e.length=0}c=function(t){e.push(t),setTimeout(n,1)},h.defineProperty(t,"_unhandledRejectionCheck",{value:n}),h.defineProperty(t,"_unhandledRejectionClear",{value:r})}(),t.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),c(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){q("rejectionHandled",a,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),q("unhandledRejection",s,e,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(e,t,n){return z(e,t,n||this)},t.onPossiblyUnhandledRejection=function(e){var n=t._getContext();s=d.contextBind(n,e)},t.onUnhandledRejectionHandled=function(e){var n=t._getContext();a=d.contextBind(n,e)};var _=function(){};t.longStackTraces=function(){if(u.haveItemsQueued()&&!ne.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ne.longStackTraces&&$()){var e=t.prototype._captureStackTrace,r=t.prototype._attachExtraTrace,o=t.prototype._dereferenceTrace;ne.longStackTraces=!0,_=function(){if(u.haveItemsQueued()&&!ne.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=r,t.prototype._dereferenceTrace=o,n.deactivateLongStackTraces(),ne.longStackTraces=!1},t.prototype._captureStackTrace=V,t.prototype._attachExtraTrace=j,t.prototype._dereferenceTrace=B,n.activateLongStackTraces()}},t.hasLongStackTraces=function(){return ne.longStackTraces&&$()};var R={unhandledrejection:{before:function(){var e=d.global.onunhandledrejection;return d.global.onunhandledrejection=null,e},after:function(e){d.global.onunhandledrejection=e}},rejectionhandled:{before:function(){var e=d.global.onrejectionhandled;return d.global.onrejectionhandled=null,e},after:function(e){d.global.onrejectionhandled=e}}},O=function(){var e=function(e,t){if(!e)return!d.global.dispatchEvent(t);var n;try{return n=e.before(),!d.global.dispatchEvent(t)}finally{e.after(n)}};try{if("function"===typeof CustomEvent){var t=new CustomEvent("CustomEvent");return d.global.dispatchEvent(t),function(t,n){t=t.toLowerCase();var r=new CustomEvent(t,{detail:n,cancelable:!0});return h.defineProperty(r,"promise",{value:n.promise}),h.defineProperty(r,"reason",{value:n.reason}),e(R[t],r)}}return"function"===typeof Event?(t=new Event("CustomEvent"),d.global.dispatchEvent(t),function(t,n){t=t.toLowerCase();var r=new Event(t,{cancelable:!0});return r.detail=n,h.defineProperty(r,"promise",{value:n.promise}),h.defineProperty(r,"reason",{value:n.reason}),e(R[t],r)}):((t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),d.global.dispatchEvent(t),function(t,n){t=t.toLowerCase();var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,!1,!0,n),e(R[t],r)})}catch(r){}return function(){return!1}}(),A=d.isNode?function(){return process.emit.apply(process,arguments)}:d.global?function(e){var t="on"+e.toLowerCase(),n=d.global[t];return!!n&&(n.apply(d.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function P(e,t){return{promise:t}}var T={promiseCreated:P,promiseFulfilled:P,promiseRejected:P,promiseResolved:P,promiseCancelled:P,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:P},D=function(e){var t=!1;try{t=A.apply(null,arguments)}catch(r){u.throwLater(r),t=!0}var n=!1;try{n=O(e,T[e].apply(null,arguments))}catch(r){u.throwLater(r),n=!0}return n||t};function k(){return!1}function N(e,t,n){var o=this;try{e(t,n,(function(e){if("function"!==typeof e)throw new TypeError("onCancel must be a function, got: "+d.toString(e));o._attachCancellationCallback(e)}))}catch(r){return r}}function M(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?d.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function I(){return this._onCancelField}function L(e){this._onCancelField=e}function F(){this._cancellationParent=void 0,this._onCancelField=void 0}function G(e,t){if(0!==(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!==(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&_()),"warnings"in e){var n=e.warnings;ne.warnings=!!n,E=ne.warnings,d.isObject(n)&&"wForgottenReturn"in n&&(E=!!n.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ne.cancellation){if(u.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=F,t.prototype._propagateFrom=G,t.prototype._onCancel=I,t.prototype._setOnCancel=L,t.prototype._attachCancellationCallback=M,t.prototype._execute=N,H=G,ne.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!ne.monitoring?(ne.monitoring=!0,t.prototype._fireEvent=D):!e.monitoring&&ne.monitoring&&(ne.monitoring=!1,t.prototype._fireEvent=k)),"asyncHooks"in e&&d.nodeSupportsAsyncResource){var r=ne.asyncHooks,a=!!e.asyncHooks;r!==a&&(ne.asyncHooks=a,a?o():i())}return t},t.prototype._fireEvent=k,t.prototype._execute=function(e,t,n){try{e(t,n)}catch(r){return r}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var H=function(e,t){0!==(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)};function W(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function V(){this._trace=new ee(this._peekContext())}function j(e,t){if(f(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var r=Y(e);d.notEnumerableProp(e,"stack",r.message+"\n"+r.stack.join("\n")),d.notEnumerableProp(e,"__stackCleaned__",!0)}}}function B(){this._trace=void 0}function z(e,n,r){if(ne.warnings){var o,i=new p(e);if(n)r._attachExtraTrace(i);else if(ne.longStackTraces&&(o=t._peekContext()))o.attachExtraTrace(i);else{var a=Y(i);i.stack=a.message+"\n"+a.stack.join("\n")}D("warning",i)||X(i,"",!0)}}function U(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],o=" (No stack trace)"===r||y.test(r),i=o&&Q(r);o&&!i&&(w&&" "!==r.charAt(0)&&(r=" "+r),t.push(r))}return t}function Y(e){var t=e.stack,n=e.toString();return t="string"===typeof t&&t.length>0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),n=0;n<t.length;++n){var r=t[n];if(" (No stack trace)"===r||y.test(r))break}return n>0&&"SyntaxError"!=e.name&&(t=t.slice(n)),t}(e):[" (No stack trace)"],{message:n,stack:"SyntaxError"==e.name?t:U(t)}}function X(e,t,n){if("undefined"!==typeof console){var r;if(d.isObject(e)){var o=e.stack;r=t+b(o,e)}else r=t+String(e);"function"===typeof l?l(r,n):"function"!==typeof console.log&&"object"!==typeof console.log||console.log(r)}}function q(e,t,n,o){var i=!1;try{"function"===typeof t&&(i=!0,"rejectionHandled"===e?t(o):t(n,o))}catch(r){u.throwLater(r)}"unhandledRejection"===e?D(e,n,o)||i||X(n,"Unhandled rejection "):D(e,o)}function K(e){var t;if("function"===typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"===typeof e.toString?e.toString():d.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(r){}0===t.length&&(t="(empty array)")}return"(<"+function(e){var t=41;return e.length<t?e:e.substr(0,t-3)+"..."}(t)+">, no stack trace)"}function $(){return"function"===typeof te}var Q=function(){return!1},Z=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function J(e){var t=e.match(Z);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function ee(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);te(this,ee),t>32&&this.uncycle()}d.inherits(ee,Error),n.CapturedTrace=ee,ee.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],n={},r=0,o=this;void 0!==o;++r)t.push(o),o=o._parent;for(r=(e=this._length=r)-1;r>=0;--r){var i=t[r].stack;void 0===n[i]&&(n[i]=r)}for(r=0;r<e;++r){var a=n[t[r].stack];if(void 0!==a&&a!==r){a>0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[r]._parent=void 0,t[r]._length=1;var s=r>0?t[r-1]:this;a<e-1?(s._parent=t[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var l=s._length+1,c=r-2;c>=0;--c)t[c]._length=l,l++;return}}}},ee.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=Y(e),n=t.message,r=[t.stack],o=this;void 0!==o;)r.push(U(o.stack.split("\n"))),o=o._parent;!function(e){for(var t=e[0],n=1;n<e.length;++n){for(var r=e[n],o=t.length-1,i=t[o],a=-1,s=r.length-1;s>=0;--s)if(r[s]===i){a=s;break}for(s=a;s>=0;--s){var l=r[s];if(t[o]!==l)break;t.pop(),o--}t=r}}(r),function(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}(r),d.notEnumerableProp(e,"stack",function(e,t){for(var n=0;n<t.length-1;++n)t[n].push("From previous event:"),t[n]=t[n].join("\n");return n<t.length&&(t[n]=t[n].join("\n")),e+"\n"+t.join("\n")}(n,r)),d.notEnumerableProp(e,"__stackCleaned__",!0)}};var te=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"===typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():K(t)};if("number"===typeof Error.stackTraceLimit&&"function"===typeof Error.captureStackTrace){Error.stackTraceLimit+=6,y=e,b=t;var n=Error.captureStackTrace;return Q=function(e){return g.test(e)},function(e,t){Error.stackTraceLimit+=6,n(e,t),Error.stackTraceLimit-=6}}var o,i=new Error;if("string"===typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return y=/@/,b=t,w=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(r){o="stack"in r}return!("stack"in i)&&o&&"number"===typeof Error.stackTraceLimit?(y=e,b=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(r){e.stack=r.stack}Error.stackTraceLimit-=6}):(b=function(e,t){return"string"===typeof e?e:"object"!==typeof t&&"function"!==typeof t||void 0===t.name||void 0===t.message?K(t):t.toString()},null)}();"undefined"!==typeof console&&"undefined"!==typeof console.warn&&(l=function(e){console.warn(e)},d.isNode&&process.stderr.isTTY?l=function(e,t){var n=t?"\x1b[33m":"\x1b[31m";console.warn(n+e+"\x1b[0m\n")}:d.isNode||"string"!==typeof(new Error).stack||(l=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ne={warnings:x,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return S&&t.longStackTraces(),{asyncHooks:function(){return ne.asyncHooks},longStackTraces:function(){return ne.longStackTraces},warnings:function(){return ne.warnings},cancellation:function(){return ne.cancellation},monitoring:function(){return ne.monitoring},propagateFromFunction:function(){return H},boundValueFunction:function(){return W},checkForgottenReturns:function(e,t,n,r,o){if(void 0===e&&null!==t&&E){if(void 0!==o&&o._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var i="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),l=U(s),c=l.length-1;c>=0;--c){var u=l[c];if(!v.test(u)){var p=u.match(m);p&&(i="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(l.length>0){var d=l[0];for(c=0;c<s.length;++c)if(s[c]===d){c>0&&(a="\n"+s[c-1]);break}}}var h="a promise was created in a "+n+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,t)}},setBounds:function(e,t){if($()){for(var n,r,o=(e.stack||"").split("\n"),i=(t.stack||"").split("\n"),a=-1,s=-1,l=0;l<o.length;++l)if(c=J(o[l])){n=c.fileName,a=c.line;break}for(l=0;l<i.length;++l){var c;if(c=J(i[l])){r=c.fileName,s=c.line;break}}a<0||s<0||!n||!r||n!==r||a>=s||(Q=function(e){if(g.test(e))return!0;var t=J(e);return!!(t&&t.fileName===n&&a<=t.line&&t.line<=s)})}},warn:z,deprecated:function(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),z(n)},CapturedTrace:ee,fireDomEvent:O,fireGlobalEvent:A}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,n){"use strict";t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1],r=function(){throw t};return this.caught(e,r)},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var r=arguments[1];r instanceof e&&r.suppressUnhandledRejections();var o=function(){return r};return this.caught(n,o)}}},{}],11:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.reduce,r=e.all;function o(){return r(this)}e.prototype.each=function(e){return n(this,e,t,0)._then(o,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return n(this,e,t,t)},e.each=function(e,r){return n(e,r,t,0)._then(o,void 0,void 0,e,void 0)},e.mapSeries=function(e,r){return n(e,r,t,t)}}},{}],12:[function(e,t,n){"use strict";var o,i,a=e("./es5"),s=a.freeze,l=e("./util"),c=l.inherits,u=l.notEnumerableProp;function p(e,t){function n(r){if(!(this instanceof n))return new n(r);u(this,"message","string"===typeof r?r:t),u(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(n,Error),n}var d=p("Warning","warning"),h=p("CancellationError","cancellation error"),f=p("TimeoutError","timeout error"),g=p("AggregateError","aggregate error");try{o=TypeError,i=RangeError}catch(r){o=p("TypeError","type error"),i=p("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m<v.length;++m)"function"===typeof Array.prototype[v[m]]&&(g.prototype[v[m]]=Array.prototype[v[m]]);a.defineProperty(g.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),g.prototype.isOperational=!0;var y=0;function b(e){if(!(this instanceof b))return new b(e);u(this,"name","OperationalError"),u(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(u(this,"message",e.message),u(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}g.prototype.toString=function(){var e=Array(4*y+1).join(" "),t="\n"+e+"AggregateError of:\n";y++,e=Array(4*y+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",o=r.split("\n"),i=0;i<o.length;++i)o[i]=e+o[i];t+=(r=o.join("\n"))+"\n"}return y--,t},c(b,Error);var w=Error.__BluebirdErrorTypes__;w||(w=s({CancellationError:h,TimeoutError:f,OperationalError:b,RejectionError:b,AggregateError:g}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:w,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:o,RangeError:i,CancellationError:w.CancellationError,OperationalError:w.OperationalError,TimeoutError:w.TimeoutError,AggregateError:w.AggregateError,Warning:d}},{"./es5":13,"./util":36}],13:[function(e,t,n){var o=function(){"use strict";return void 0===this}();if(o)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:o,propertyIsWritable:function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,a={}.toString,s={}.constructor.prototype,l=function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t};t.exports={isArray:function(e){try{return"[object Array]"===a.call(e)}catch(r){return!1}},keys:l,names:l,defineProperty:function(e,t,n){return e[t]=n.value,e},getDescriptor:function(e,t){return{value:e[t]}},freeze:function(e){return e},getPrototypeOf:function(e){try{return Object(e).constructor.prototype}catch(r){return s}},isES5:o,propertyIsWritable:function(){return!0}}}},{}],14:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.map;e.prototype.filter=function(e,r){return n(this,e,r,t)},e.filter=function(e,r,o){return n(e,r,o,t)}}},{}],15:[function(e,t,n){"use strict";t.exports=function(t,n,r){var o=e("./util"),i=t.CancellationError,a=o.errorObj,s=e("./catch_filter")(r);function l(e,t,n){this.promise=e,this.type=t,this.handler=n,this.called=!1,this.cancelPromise=null}function c(e){this.finallyHandler=e}function u(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function p(){return h.call(this,this.promise._target()._settledValue())}function d(e){if(!u(this,e))return a.e=e,a}function h(e){var o=this.promise,s=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?s.call(o._boundValue()):s.call(o._boundValue(),e);if(l===r)return l;if(void 0!==l){o._setReturnedNonUndefined();var h=n(l,o);if(h instanceof t){if(null!=this.cancelPromise){if(h._isCancelled()){var f=new i("late cancellation observer");return o._attachExtraTrace(f),a.e=f,a}h.isPending()&&h._attachCancellationCallback(new c(this))}return h._then(p,d,void 0,this,void 0)}}}return o.isRejected()?(u(this),a.e=e,a):(u(this),e)}return l.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){u(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,r){return"function"!==typeof e?this.then():this._then(n,r,void 0,new l(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,h,h)},t.prototype.tap=function(e){return this._passThrough(e,1,h)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,h);var r,i=new Array(n-1),a=0;for(r=0;r<n-1;++r){var l=arguments[r];if(!o.isObject(l))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+o.classString(l)));i[a++]=l}i.length=a;var c=arguments[r];return this._passThrough(s(i,c,this),1,void 0,h)},l}},{"./catch_filter":7,"./util":36}],16:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i,a){var s=e("./errors").TypeError,l=e("./util"),c=l.errorObj,u=l.tryCatch,p=[];function d(e,n,o,i){if(a.cancellation()){var s=new t(r),l=this._finallyPromise=new t(r);this._promise=s.lastly((function(){return l})),s._captureStackTrace(),s._setOnCancel(this)}else(this._promise=new t(r))._captureStackTrace();this._stack=i,this._generatorFunction=e,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"===typeof o?[o].concat(p):p,this._yieldedPromise=null,this._cancellationPhase=!1}l.inherits(d,i),d.prototype._isResolved=function(){return null===this._promise},d.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},d.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if("undefined"!==typeof this._generator.return)this._promise._pushContext(),e=u(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),e=u(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},d.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=u(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},d.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=u(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},d.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},d.prototype.promise=function(){return this._promise},d.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},d.prototype._continue=function(e){var n=this._promise;if(e===c)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(e.e,!1);var r=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var i=o(r,this._promise);if(i instanceof t||(i=function(e,n,r){for(var i=0;i<n.length;++i){r._pushContext();var a=u(n[i])(e);if(r._popContext(),a===c){r._pushContext();var s=t.reject(c.e);return r._popContext(),s}var l=o(a,r);if(l instanceof t)return l}return null}(i,this._yieldHandlers,this._promise),null!==i)){var a=(i=i._target())._bitField;0===(50397184&a)?(this._yieldedPromise=i,i._proxy(this,null)):0!==(33554432&a)?t._async.invoke(this._promiseFulfilled,this,i._value()):0!==(16777216&a)?t._async.invoke(this._promiseRejected,this,i._reason()):this._promiseCancelled()}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(r))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(e,t){if("function"!==typeof e)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(t).yieldHandler,r=d,o=(new Error).stack;return function(){var t=e.apply(this,arguments),i=new r(void 0,void 0,n,o),a=i.promise();return i._generator=t,i._promiseFulfilled(void 0),a}},t.coroutine.addYieldHandler=function(e){if("function"!==typeof e)throw new s("expecting a function but got "+l.classString(e));p.push(e)},t.spawn=function(e){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!==typeof e)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new d(e,this),o=r.promise();return r._run(t.spawn),o}}},{"./errors":12,"./util":36}],17:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i){var a=e("./util");a.canEvaluate,a.tryCatch,a.errorObj,t.join=function(){var e,t=arguments.length-1;t>0&&"function"===typeof arguments[t]&&(e=arguments[t]);var r=[].slice.call(arguments);e&&r.pop();var o=new n(r).promise();return void 0!==e?o.spread(e):o}}},{"./util":36}],18:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i,a){var s=e("./util"),l=s.tryCatch,c=s.errorObj,u=t._async;function p(e,n,r,o){this.constructor$(e),this._promise._captureStackTrace();var a=t._getContext();if(this._callback=s.contextBind(a,n),this._preservedValues=o===i?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],u.invoke(this._asyncInit,this,void 0),s.isArray(e))for(var l=0;l<e.length;++l){var c=e[l];c instanceof t&&c.suppressUnhandledRejections()}}function d(e,n,o,i){if("function"!==typeof n)return r("expecting a function but got "+s.classString(n));var a=0;if(void 0!==o){if("object"!==typeof o||null===o)return t.reject(new TypeError("options argument must be an object but it is "+s.classString(o)));if("number"!==typeof o.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+s.classString(o.concurrency)));a=o.concurrency}return new p(e,n,a="number"===typeof a&&isFinite(a)&&a>=1?a:0,i).promise()}s.inherits(p,n),p.prototype._asyncInit=function(){this._init$(void 0,-2)},p.prototype._init=function(){},p.prototype._promiseFulfilled=function(e,n){var r=this._values,i=this.length(),s=this._preservedValues,u=this._limit;if(n<0){if(r[n=-1*n-1]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return r[n]=e,this._queue.push(n),!1;null!==s&&(s[n]=e);var p=this._promise,d=this._callback,h=p._boundValue();p._pushContext();var f=l(d).call(h,e,n,i),g=p._popContext();if(a.checkForgottenReturns(f,g,null!==s?"Promise.filter":"Promise.map",p),f===c)return this._reject(f.e),!0;var v=o(f,this._promise);if(v instanceof t){var m=(v=v._target())._bitField;if(0===(50397184&m))return u>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&m))return 0!==(16777216&m)?(this._reject(v._reason()),!0):(this._cancel(),!0);f=v._value()}r[n]=f}return++this._totalResolved>=i&&(null!==s?this._filter(r,s):this._resolve(r),!0)},p.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var r=e.pop();this._promiseFulfilled(n[r],r)}},p.prototype._filter=function(e,t){for(var n=t.length,r=new Array(n),o=0,i=0;i<n;++i)e[i]&&(r[o++]=t[i]);r.length=o,this._resolve(r)},p.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return d(this,e,t,null)},t.map=function(e,t,n,r){return d(e,t,n,r)}}},{"./util":36}],19:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i){var a=e("./util"),s=a.tryCatch;t.method=function(e){if("function"!==typeof e)throw new t.TypeError("expecting a function but got "+a.classString(e));return function(){var r=new t(n);r._captureStackTrace(),r._pushContext();var o=s(e).apply(this,arguments),a=r._popContext();return i.checkForgottenReturns(o,a,"Promise.method",r),r._resolveFromSyncValue(o),r}},t.attempt=t.try=function(e){if("function"!==typeof e)return o("expecting a function but got "+a.classString(e));var r,l=new t(n);if(l._captureStackTrace(),l._pushContext(),arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],u=arguments[2];r=a.isArray(c)?s(e).apply(u,c):s(e).call(u,c)}else r=s(e)();var p=l._popContext();return i.checkForgottenReturns(r,p,"Promise.try",l),l._resolveFromSyncValue(r),l},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,n){"use strict";var r=e("./util"),o=r.maybeWrapAsError,i=e("./errors").OperationalError,a=e("./es5"),s=/^(?:name|message|stack|cause)$/;function l(e){var t;if(function(e){return e instanceof Error&&a.getPrototypeOf(e)===Error.prototype}(e)){(t=new i(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var n=a.keys(e),o=0;o<n.length;++o){var l=n[o];s.test(l)||(t[l]=e[l])}return t}return r.markAsOriginatingFromRejection(e),e}t.exports=function(e,t){return function(n,r){if(null!==e){if(n){var i=l(o(n));e._attachExtraTrace(i),e._reject(i)}else if(t){var a=[].slice.call(arguments,1);e._fulfill(a)}else e._fulfill(r);e=null}}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,n){"use strict";t.exports=function(t){var n=e("./util"),r=t._async,o=n.tryCatch,i=n.errorObj;function a(e,t){if(!n.isArray(e))return s.call(this,e,t);var a=o(t).apply(this._boundValue(),[null].concat(e));a===i&&r.throwLater(a.e)}function s(e,t){var n=this._boundValue(),a=void 0===e?o(t).call(n,null):o(t).call(n,null,e);a===i&&r.throwLater(a.e)}function l(e,t){if(!e){var n=new Error(e+"");n.cause=e,e=n}var a=o(t).call(this._boundValue(),e);a===i&&r.throwLater(a.e)}t.prototype.asCallback=t.prototype.nodeify=function(e,t){if("function"==typeof e){var n=s;void 0!==t&&Object(t).spread&&(n=a),this._then(n,l,void 0,this,e)}return this}}},{"./util":36}],22:[function(e,t,n){"use strict";t.exports=function(){var n=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},r=function(){return new k.PromiseInspection(this._target())},o=function(e){return k.reject(new m(e))};function i(){}var a={},s=e("./util");s.setReflectHandler(r);var l=function(){var e=process.domain;return void 0===e?null:e},c=function(){return{domain:l(),async:null}},u=s.isNode&&s.nodeSupportsAsyncResource?e("async_hooks").AsyncResource:null,p=function(){return{domain:l(),async:new u("Bluebird::Promise")}},d=s.isNode?c:function(){return null};s.notEnumerableProp(k,"_getContext",d);var h=e("./es5"),f=e("./async"),g=new f;h.defineProperty(k,"_async",{value:g});var v=e("./errors"),m=k.TypeError=v.TypeError;k.RangeError=v.RangeError;var y=k.CancellationError=v.CancellationError;k.TimeoutError=v.TimeoutError,k.OperationalError=v.OperationalError,k.RejectionError=v.OperationalError,k.AggregateError=v.AggregateError;var b=function(){},w={},C={},x=e("./thenables")(k,b),S=e("./promise_array")(k,b,x,o,i),E=e("./context")(k),_=E.create,R=e("./debuggability")(k,E,(function(){d=p,s.notEnumerableProp(k,"_getContext",p)}),(function(){d=c,s.notEnumerableProp(k,"_getContext",c)})),O=(R.CapturedTrace,e("./finally")(k,x,C)),A=e("./catch_filter")(C),P=e("./nodeback"),T=s.errorObj,D=s.tryCatch;function k(e){e!==b&&function(e,t){if(null==e||e.constructor!==k)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!==typeof t)throw new m("expecting a function but got "+s.classString(t))}(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function N(e){this.promise._resolveCallback(e)}function M(e){this.promise._rejectCallback(e,!1)}function I(e){var t=new k(b);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}return k.prototype.toString=function(){return"[object Promise]"},k.prototype.caught=k.prototype.catch=function(e){var t=arguments.length;if(t>1){var n,r=new Array(t-1),i=0;for(n=0;n<t-1;++n){var a=arguments[n];if(!s.isObject(a))return o("Catch statement predicate: expecting an object but got "+s.classString(a));r[i++]=a}if(r.length=i,"function"!==typeof(e=arguments[n]))throw new m("The last argument to .catch() must be a function, got "+s.toString(e));return this.then(void 0,A(r,e,this))}return this.then(void 0,e)},k.prototype.reflect=function(){return this._then(r,r,void 0,this,void 0)},k.prototype.then=function(e,t){if(R.warnings()&&arguments.length>0&&"function"!==typeof e&&"function"!==typeof t){var n=".then() only accepts functions but was passed: "+s.classString(e);arguments.length>1&&(n+=", "+s.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},k.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},k.prototype.spread=function(e){return"function"!==typeof e?o("expecting a function but got "+s.classString(e)):this.all()._then(e,void 0,void 0,w,void 0)},k.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},k.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new S(this).promise()},k.prototype.error=function(e){return this.caught(s.originatesFromRejection,e)},k.getNewLibraryCopy=t.exports,k.is=function(e){return e instanceof k},k.fromNode=k.fromCallback=function(e){var t=new k(b);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=D(e)(P(t,n));return r===T&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},k.all=function(e){return new S(e).promise()},k.cast=function(e){var t=x(e);return t instanceof k||((t=new k(b))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},k.resolve=k.fulfilled=k.cast,k.reject=k.rejected=function(e){var t=new k(b);return t._captureStackTrace(),t._rejectCallback(e,!0),t},k.setScheduler=function(e){if("function"!==typeof e)throw new m("expecting a function but got "+s.classString(e));return g.setScheduler(e)},k.prototype._then=function(e,t,n,r,o){var i=void 0!==o,a=i?o:new k(b),l=this._target(),c=l._bitField;i||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&c)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var u=d();if(0!==(50397184&c)){var p,h,f=l._settlePromiseCtx;0!==(33554432&c)?(h=l._rejectionHandler0,p=e):0!==(16777216&c)?(h=l._fulfillmentHandler0,p=t,l._unsetRejectionIsUnhandled()):(f=l._settlePromiseLateCancellationObserver,h=new y("late cancellation observer"),l._attachExtraTrace(h),p=t),g.invoke(f,l,{handler:s.contextBind(u,p),promise:a,receiver:r,value:h})}else l._addCallbacks(e,t,a,r,u);return a},k.prototype._length=function(){return 65535&this._bitField},k.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},k.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},k.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},k.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},k.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},k.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},k.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},k.prototype._isFinal=function(){return(4194304&this._bitField)>0},k.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},k.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},k.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},k.prototype._setAsyncGuaranteed=function(){if(!g.hasCustomScheduler()){var e=this._bitField;this._bitField=e|(536870912&e)>>2^134217728}},k.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},k.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==a)return void 0===t&&this._isBound()?this._boundValue():t},k.prototype._promiseAt=function(e){return this[4*e-4+2]},k.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},k.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},k.prototype._boundValue=function(){},k.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,n=e._rejectionHandler0,r=e._promise0,o=e._receiverAt(0);void 0===o&&(o=a),this._addCallbacks(t,n,r,o,null)},k.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),r=e._rejectionHandlerAt(t),o=e._promiseAt(t),i=e._receiverAt(t);void 0===i&&(i=a),this._addCallbacks(n,r,o,i,null)},k.prototype._addCallbacks=function(e,t,n,r,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=n,this._receiver0=r,"function"===typeof e&&(this._fulfillmentHandler0=s.contextBind(o,e)),"function"===typeof t&&(this._rejectionHandler0=s.contextBind(o,t));else{var a=4*i-4;this[a+2]=n,this[a+3]=r,"function"===typeof e&&(this[a+0]=s.contextBind(o,e)),"function"===typeof t&&(this[a+1]=s.contextBind(o,t))}return this._setLength(i+1),i},k.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},k.prototype._resolveCallback=function(e,t){if(0===(117506048&this._bitField)){if(e===this)return this._rejectCallback(n(),!1);var r=x(e,this);if(!(r instanceof k))return this._fulfill(e);t&&this._propagateFrom(r,2);var o=r._target();if(o!==this){var i=o._bitField;if(0===(50397184&i)){var a=this._length();a>0&&o._migrateCallback0(this);for(var s=1;s<a;++s)o._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&i))this._fulfill(o._value());else if(0!==(16777216&i))this._reject(o._reason());else{var l=new y("late cancellation observer");o._attachExtraTrace(l),this._reject(l)}}else this._reject(n())}},k.prototype._rejectCallback=function(e,t,n){var r=s.ensureErrorObject(e),o=r===e;if(!o&&!n&&R.warnings()){var i="a promise was rejected with a non-error: "+s.classString(e);this._warn(i,!0)}this._attachExtraTrace(r,!!t&&o),this._reject(e)},k.prototype._resolveFromExecutor=function(e){if(e!==b){var t=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(e,(function(e){t._resolveCallback(e)}),(function(e){t._rejectCallback(e,n)}));n=!1,this._popContext(),void 0!==r&&t._rejectCallback(r,!0)}},k.prototype._settlePromiseFromHandler=function(e,t,n,r){var o=r._bitField;if(0===(65536&o)){var i;r._pushContext(),t===w?n&&"number"===typeof n.length?i=D(e).apply(this._boundValue(),n):(i=T).e=new m("cannot .spread() a non-array: "+s.classString(n)):i=D(e).call(t,n);var a=r._popContext();0===(65536&(o=r._bitField))&&(i===C?r._reject(n):i===T?r._rejectCallback(i.e,!1):(R.checkForgottenReturns(i,a,"",r,this),r._resolveCallback(i)))}},k.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},k.prototype._followee=function(){return this._rejectionHandler0},k.prototype._setFollowee=function(e){this._rejectionHandler0=e},k.prototype._settlePromise=function(e,t,n,o){var a=e instanceof k,s=this._bitField,l=0!==(134217728&s);0!==(65536&s)?(a&&e._invokeInternalOnCancel(),n instanceof O&&n.isFinallyHandler()?(n.cancelPromise=e,D(t).call(n,o)===T&&e._reject(T.e)):t===r?e._fulfill(r.call(n)):n instanceof i?n._promiseCancelled(e):a||e instanceof S?e._cancel():n.cancel()):"function"===typeof t?a?(l&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,n,o,e)):t.call(n,o,e):n instanceof i?n._isResolved()||(0!==(33554432&s)?n._promiseFulfilled(o,e):n._promiseRejected(o,e)):a&&(l&&e._setAsyncGuaranteed(),0!==(33554432&s)?e._fulfill(o):e._reject(o))},k.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,n=e.promise,r=e.receiver,o=e.value;"function"===typeof t?n instanceof k?this._settlePromiseFromHandler(t,r,o,n):t.call(r,o,n):n instanceof k&&n._reject(o)},k.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},k.prototype._settlePromise0=function(e,t,n){var r=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,e,o,t)},k.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},k.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!==(134217728&t)?this._settlePromises():g.settlePromises(this),this._dereferenceTrace())}},k.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return g.fatalError(e,s.isNode);(65535&t)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled()}},k.prototype._fulfillPromises=function(e,t){for(var n=1;n<e;n++){var r=this._fulfillmentHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,t)}},k.prototype._rejectPromises=function(e,t){for(var n=1;n<e;n++){var r=this._rejectionHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,t)}},k.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(0!==(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,e),this._fulfillPromises(t,r)}this._setLength(0)}this._clearCancellationData()},k.prototype._settledValue=function(){var e=this._bitField;return 0!==(33554432&e)?this._rejectionHandler0:0!==(16777216&e)?this._fulfillmentHandler0:void 0},"undefined"!==typeof Symbol&&Symbol.toStringTag&&h.defineProperty(k.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),k.defer=k.pending=function(){return R.deprecated("Promise.defer","new Promise"),{promise:new k(b),resolve:N,reject:M}},s.notEnumerableProp(k,"_makeSelfResolutionError",n),e("./method")(k,b,x,o,R),e("./bind")(k,b,x,R),e("./cancel")(k,S,o,R),e("./direct_resolve")(k),e("./synchronous_inspection")(k),e("./join")(k,S,x,b,g),k.Promise=k,k.version="3.7.2",e("./call_get.js")(k),e("./generators.js")(k,o,b,x,i,R),e("./map.js")(k,S,o,x,b,R),e("./nodeify.js")(k),e("./promisify.js")(k,b),e("./props.js")(k,S,x,o),e("./race.js")(k,b,x,o),e("./reduce.js")(k,S,o,x,b,R),e("./settle.js")(k,S,R),e("./some.js")(k,S,o),e("./timers.js")(k,b,R),e("./using.js")(k,o,x,_,b,R),e("./any.js")(k),e("./each.js")(k,b),e("./filter.js")(k,b),s.toFastProperties(k),s.toFastProperties(k.prototype),I({a:1}),I({b:2}),I({c:3}),I(1),I((function(){})),I(void 0),I(!1),I(new k(b)),R.setBounds(f.firstLineError,s.lastLineError),k}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i){var a=e("./util");function s(e){var r=this._promise=new t(n);e instanceof t&&(r._propagateFrom(e,3),e.suppressUnhandledRejections()),r._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.isArray,a.inherits(s,i),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(n,i){var s=r(this._values,this._promise);if(s instanceof t){var l=(s=s._target())._bitField;if(this._values=s,0===(50397184&l))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,i);if(0===(33554432&l))return 0!==(16777216&l)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=a.asArray(s)))0!==s.length?this._iterate(s):-5===i?this._resolveEmptyArray():this._resolve(function(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}(i));else{var c=o("expecting an array or an iterable object but got "+a.classString(s)).reason();this._promise._rejectCallback(c,!1)}},s.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var o=this._promise,i=!1,a=null,s=0;s<n;++s){var l=r(e[s],o);a=l instanceof t?(l=l._target())._bitField:null,i?null!==a&&l.suppressUnhandledRejections():null!==a?0===(50397184&a)?(l._proxy(this,s),this._values[s]=l):i=0!==(33554432&a)?this._promiseFulfilled(l._value(),s):0!==(16777216&a)?this._promiseRejected(l._reason(),s):this._promiseCancelled(s):i=this._promiseFulfilled(l,s)}i||o._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(e){this._values=null,this._promise._fulfill(e)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},s.prototype._promiseFulfilled=function(e,t){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n<e.length;++n)e[n]instanceof t&&e[n].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(e){return e},s}},{"./util":36}],24:[function(e,t,n){"use strict";t.exports=function(t,n){var o={},i=e("./util"),a=e("./nodeback"),s=i.withAppended,l=i.maybeWrapAsError,c=i.canEvaluate,u=e("./errors").TypeError,p={__isPromisified__:!0},d=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),h=function(e){return i.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e};function f(e){return!d.test(e)}function g(e){try{return!0===e.__isPromisified__}catch(r){return!1}}function v(e,t,n){var r=i.getDataPropertyOrDefault(e,t+n,p);return!!r&&g(r)}function m(e,t,n,r){for(var o=i.inheritedDataKeys(e),a=[],s=0;s<o.length;++s){var l=o[s],c=e[l],p=r===h||h(l);"function"!==typeof c||g(c)||v(e,l,t)||!r(l,c,e,p)||a.push(l,c)}return function(e,t,n){for(var r=0;r<e.length;r+=2){var o=e[r];if(n.test(o))for(var i=o.replace(n,""),a=0;a<e.length;a+=2)if(e[a]===i)throw new u("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",t))}}(a,t,n),a}var y=c?void 0:function(e,c,u,p,d,h){var f=function(){return this}(),g=e;function v(){var i=c;c===o&&(i=this);var u=new t(n);u._captureStackTrace();var p="string"===typeof g&&this!==f?this[g]:e,d=a(u,h);try{p.apply(i,s(arguments,d))}catch(r){u._rejectCallback(l(r),!0,!0)}return u._isFateSealed()||u._setAsyncGuaranteed(),u}return"string"===typeof g&&(e=p),i.notEnumerableProp(v,"__isPromisified__",!0),v};function b(e,t,n,r,a){for(var s=new RegExp(t.replace(/([$])/,"\\$")+"$"),l=m(e,t,s,n),c=0,u=l.length;c<u;c+=2){var p=l[c],d=l[c+1],h=p+t;if(r===y)e[h]=y(p,o,p,d,t,a);else{var f=r(d,(function(){return y(p,o,p,d,t,a)}));i.notEnumerableProp(f,"__isPromisified__",!0),e[h]=f}}return i.toFastProperties(e),e}t.promisify=function(e,t){if("function"!==typeof e)throw new u("expecting a function but got "+i.classString(e));if(g(e))return e;var n=function(e,t,n){return y(e,t,void 0,e,null,n)}(e,void 0===(t=Object(t)).context?o:t.context,!!t.multiArgs);return i.copyDescriptors(e,n,f),n},t.promisifyAll=function(e,t){if("function"!==typeof e&&"object"!==typeof e)throw new u("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var n=!!(t=Object(t)).multiArgs,r=t.suffix;"string"!==typeof r&&(r="Async");var o=t.filter;"function"!==typeof o&&(o=h);var a=t.promisifier;if("function"!==typeof a&&(a=y),!i.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=i.inheritedDataKeys(e),l=0;l<s.length;++l){var c=e[s[l]];"constructor"!==s[l]&&i.isClass(c)&&(b(c.prototype,r,o,a,n),b(c,r,o,a,n))}return b(e,r,o,a,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(e,t,n){"use strict";t.exports=function(t,n,r,o){var i,a=e("./util"),s=a.isObject,l=e("./es5");"function"===typeof Map&&(i=Map);var c=function(){var e=0,t=0;function n(n,r){this[e]=n,this[e+t]=r,e++}return function(r){t=r.size,e=0;var o=new Array(2*r.size);return r.forEach(n,o),o}}();function u(e){var t,n=!1;if(void 0!==i&&e instanceof i)t=c(e),n=!0;else{var r=l.keys(e),o=r.length;t=new Array(2*o);for(var a=0;a<o;++a){var s=r[a];t[a]=e[s],t[a+o]=s}}this.constructor$(t),this._isMap=n,this._init$(void 0,n?-6:-3)}function p(e){var n,i=r(e);return s(i)?(n=i instanceof t?i._then(t.props,void 0,void 0,void 0,void 0):new u(i).promise(),i instanceof t&&n._propagateFrom(i,2),n):o("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}a.inherits(u,n),u.prototype._init=function(){},u.prototype._promiseFulfilled=function(e,t){if(this._values[t]=e,++this._totalResolved>=this._length){var n;if(this._isMap)n=function(e){for(var t=new i,n=e.length/2|0,r=0;r<n;++r){var o=e[n+r],a=e[r];t.set(o,a)}return t}(this._values);else{n={};for(var r=this.length(),o=0,a=this.length();o<a;++o)n[this._values[o+r]]=this._values[o]}return this._resolve(n),!0}return!1},u.prototype.shouldCopyValues=function(){return!1},u.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return p(this)},t.props=function(e){return p(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,n){"use strict";function r(e){this._capacity=e,this._length=0,this._front=0}r.prototype._willBeOverCapacity=function(e){return this._capacity<e},r.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1),this[this._front+t&this._capacity-1]=e,this._length=t+1},r.prototype.push=function(e,t,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(e),this._pushOne(t),void this._pushOne(n);var o=this._front+r-3;this._checkCapacity(r);var i=this._capacity-1;this[o+0&i]=e,this[o+1&i]=t,this[o+2&i]=n,this._length=r},r.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t},r.prototype.length=function(){return this._length},r.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)},r.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e,function(e,t,n,r,o){for(var i=0;i<o;++i)n[i+r]=e[i+t],e[i+t]=void 0}(this,0,this,t,this._front+this._length&t-1)},t.exports=r},{}],27:[function(e,t,n){"use strict";t.exports=function(t,n,r,o){var i=e("./util");function a(e,s){var l,c=r(e);if(c instanceof t)return(l=c).then((function(e){return a(e,l)}));if(null===(e=i.asArray(e)))return o("expecting an array or an iterable object but got "+i.classString(e));var u=new t(n);void 0!==s&&u._propagateFrom(s,3);for(var p=u._fulfill,d=u._reject,h=0,f=e.length;h<f;++h){var g=e[h];(void 0!==g||h in e)&&t.cast(g)._then(p,d,void 0,u,null)}return u}t.race=function(e){return a(e,void 0)},t.prototype.race=function(){return a(this,void 0)}}},{"./util":36}],28:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i,a){var s=e("./util"),l=s.tryCatch;function c(e,n,r,o){this.constructor$(e);var a=t._getContext();this._fn=s.contextBind(a,n),void 0!==r&&(r=t.resolve(r))._attachCancellationCallback(this),this._initialValue=r,this._currentCancellable=null,this._eachValues=o===i?Array(this._length):0===o?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function p(e,t,n,o){return"function"!==typeof t?r("expecting a function but got "+s.classString(t)):new c(e,t,n,o).promise()}function d(e){this.accum=e,this.array._gotAccum(e);var n=o(this.value,this.array._promise);return n instanceof t?(this.array._currentCancellable=n,n._then(h,void 0,void 0,this,void 0)):h.call(this,n)}function h(e){var n,r=this.array,o=r._promise,i=l(r._fn);o._pushContext(),(n=void 0!==r._eachValues?i.call(o._boundValue(),e,this.index,this.length):i.call(o._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(r._currentCancellable=n);var s=o._popContext();return a.checkForgottenReturns(n,s,void 0!==r._eachValues?"Promise.each":"Promise.reduce",o),n}s.inherits(c,n),c.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==i&&this._eachValues.push(e)},c.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},c.prototype._init=function(){},c.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},c.prototype.shouldCopyValues=function(){return!1},c.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},c.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},c.prototype._iterate=function(e){var n,r;this._values=e;var o=e.length;void 0!==this._initialValue?(n=this._initialValue,r=0):(n=t.resolve(e[0]),r=1),this._currentCancellable=n;for(var i=r;i<o;++i){var a=e[i];a instanceof t&&a.suppressUnhandledRejections()}if(!n.isRejected())for(;r<o;++r){var s={accum:null,value:e[r],index:r,length:o,array:this};n=n._then(d,void 0,void 0,s,void 0),0===(127&r)&&n._setNoAsyncGuarantee()}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(u,u,void 0,n,this)},t.prototype.reduce=function(e,t){return p(this,e,t,null)},t.reduce=function(e,t,n,r){return p(e,t,n,r)}}},{"./util":36}],29:[function(e,t,r){"use strict";var o,i=e("./util"),a=i.getNativePromise();if(i.isNode&&"undefined"===typeof MutationObserver){var s=n.g.setImmediate,l=process.nextTick;o=i.isRecentNode?function(e){s.call(n.g,e)}:function(e){l.call(process,e)}}else if("function"===typeof a&&"function"===typeof a.resolve){var c=a.resolve();o=function(e){c.then(e)}}else o="undefined"===typeof MutationObserver||"undefined"!==typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!==typeof setImmediate?function(e){setImmediate(e)}:"undefined"!==typeof setTimeout?function(e){setTimeout(e,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}:function(){var e=document.createElement("div"),t={attributes:!0},n=!1,r=document.createElement("div");return new MutationObserver((function(){e.classList.toggle("foo"),n=!1})).observe(r,t),function(o){var i=new MutationObserver((function(){i.disconnect(),o()}));i.observe(e,t),n||(n=!0,r.classList.toggle("foo"))}}();t.exports=o},{"./util":36}],30:[function(e,t,n){"use strict";t.exports=function(t,n,r){var o=t.PromiseInspection;function i(e){this.constructor$(e)}e("./util").inherits(i,n),i.prototype._promiseResolved=function(e,t){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var n=new o;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},i.prototype._promiseRejected=function(e,t){var n=new o;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return r.deprecated(".settle()",".reflect()"),new i(e).promise()},t.allSettled=function(e){return new i(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,n){"use strict";t.exports=function(t,n,r){var o=e("./util"),i=e("./errors").RangeError,a=e("./errors").AggregateError,s=o.isArray,l={};function c(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function u(e,t){if((0|t)!==t||t<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new c(e),o=n.promise();return n.setHowMany(t),n.init(),o}o.inherits(c,n),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=s(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(e){this._howMany=e},c.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new a,t=this.length();t<this._values.length;++t)this._values[t]!==l&&e.push(this._values[t]);return e.length>0?this._reject(e):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(e){this._values.push(e)},c.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new i(t)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return u(e,t)},t.prototype.some=function(e){return u(this,e)},t._SomePromiseArray=c}},{"./errors":12,"./util":36}],32:[function(e,t,n){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},o=t.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},i=t.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return i.call(this._target())},e.prototype.isFulfilled=function(){return o.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),r.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,n){"use strict";t.exports=function(t,n){var o=e("./util"),i=o.errorObj,a=o.isObject,s={}.hasOwnProperty;return function(e,l){if(a(e)){if(e instanceof t)return e;var c=function(e){try{return function(e){return e.then}(e)}catch(r){return i.e=r,i}}(e);if(c===i){l&&l._pushContext();var u=t.reject(c.e);return l&&l._popContext(),u}if("function"===typeof c)return function(e){try{return s.call(e,"_promise0")}catch(r){return!1}}(e)?(u=new t(n),e._then(u._fulfill,u._reject,void 0,u,null),u):function(e,r,a){var s=new t(n),l=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var c=!0,u=o.tryCatch(r).call(e,p,d);function p(e){s&&(s._resolveCallback(e),s=null)}function d(e){s&&(s._rejectCallback(e,c,!0),s=null)}return c=!1,s&&u===i&&(s._rejectCallback(u.e,!0,!0),s=null),l}(e,c,l)}return e}}},{"./util":36}],34:[function(e,t,n){"use strict";t.exports=function(t,n,r){var o=e("./util"),i=t.TimeoutError;function a(e){this.handle=e}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,o){var i,l;return void 0!==o?(i=t.resolve(o)._then(s,null,null,e,void 0),r.cancellation()&&o instanceof t&&i._setOnCancel(o)):(i=new t(n),l=setTimeout((function(){i._fulfill()}),+e),r.cancellation()&&i._setOnCancel(new a(l)),i._captureStackTrace()),i._setAsyncGuaranteed(),i};function c(e){return clearTimeout(this.handle),e}function u(e){throw clearTimeout(this.handle),e}t.prototype.delay=function(e){return l(e,this)},t.prototype.timeout=function(e,t){var n,s;e=+e;var l=new a(setTimeout((function(){n.isPending()&&function(e,t,n){var r;r="string"!==typeof t?t instanceof Error?t:new i("operation timed out"):new i(t),o.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._reject(r),null!=n&&n.cancel()}(n,t,s)}),e));return r.cancellation()?(s=this.then(),(n=s._then(c,u,void 0,l,void 0))._setOnCancel(l)):n=this._then(c,u,void 0,l,void 0),n}}},{"./util":36}],35:[function(e,t,n){"use strict";t.exports=function(t,n,o,i,a,s){var l=e("./util"),c=e("./errors").TypeError,u=e("./util").inherits,p=l.errorObj,d=l.tryCatch,h={};function f(e){setTimeout((function(){throw e}),0)}function g(e,n){var i=0,s=e.length,l=new t(a);return function a(){if(i>=s)return l._fulfill();var c=function(e){var t=o(e);return t!==e&&"function"===typeof e._isDisposable&&"function"===typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}(e[i++]);if(c instanceof t&&c._isDisposable()){try{c=o(c._getDisposer().tryDispose(n),e.promise)}catch(r){return f(r)}if(c instanceof t)return c._then(a,f,null,null,null)}a()}(),l}function v(e,t,n){this._data=e,this._promise=t,this._context=n}function m(e,t,n){this.constructor$(e,t,n)}function y(e){return v.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function b(e){this.length=e,this.promise=null,this[e-1]=null}v.prototype.data=function(){return this._data},v.prototype.promise=function(){return this._promise},v.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},v.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=t!==h?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},v.isDisposer=function(e){return null!=e&&"function"===typeof e.resource&&"function"===typeof e.tryDispose},u(m,v),m.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},b.prototype._resultCancelled=function(){for(var e=this.length,n=0;n<e;++n){var r=this[n];r instanceof t&&r.cancel()}},t.using=function(){var e=arguments.length;if(e<2)return n("you must pass at least 2 arguments to Promise.using");var r,i=arguments[e-1];if("function"!==typeof i)return n("expecting a function but got "+l.classString(i));var a=!0;2===e&&Array.isArray(arguments[0])?(e=(r=arguments[0]).length,a=!1):(r=arguments,e--);for(var c=new b(e),u=0;u<e;++u){var h=r[u];if(v.isDisposer(h)){var f=h;(h=h.promise())._setDisposable(f)}else{var m=o(h);m instanceof t&&(h=m._then(y,null,null,{resources:c,index:u},void 0))}c[u]=h}var w=new Array(c.length);for(u=0;u<w.length;++u)w[u]=t.resolve(c[u]).reflect();var C=t.all(w).then((function(e){for(var t=0;t<e.length;++t){var n=e[t];if(n.isRejected())return p.e=n.error(),p;if(!n.isFulfilled())return void C.cancel();e[t]=n.value()}x._pushContext(),i=d(i);var r=a?i.apply(void 0,e):i(e),o=x._popContext();return s.checkForgottenReturns(r,o,"Promise.using",x),r})),x=C.lastly((function(){var e=new t.PromiseInspection(C);return g(c,e)}));return c.promise=x,x._setOnCancel(c),x},t.prototype._setDisposable=function(e){this._bitField=131072|this._bitField,this._disposer=e},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"===typeof e)return new m(e,this,i());throw new c}}},{"./errors":12,"./util":36}],36:[function(e,t,o){"use strict";var i=e("./es5"),a="undefined"==typeof navigator,s={e:{}},l,c="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:void 0!==this?this:null;function u(){try{var e=l;return l=null,e.apply(this,arguments)}catch(r){return s.e=r,s}}function p(e){return l=e,u}var d=function(e,t){var n={}.hasOwnProperty;function r(){for(var r in this.constructor=e,this.constructor$=t,t.prototype)n.call(t.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=t.prototype[r])}return r.prototype=t.prototype,e.prototype=new r,e.prototype};function h(e){return null==e||!0===e||!1===e||"string"===typeof e||"number"===typeof e}function f(e){return"function"===typeof e||"object"===typeof e&&null!==e}function g(e){return h(e)?new Error(O(e)):e}function v(e,t){var n,r=e.length,o=new Array(r+1);for(n=0;n<r;++n)o[n]=e[n];return o[n]=t,o}function m(e,t,n){if(!i.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var r=Object.getOwnPropertyDescriptor(e,t);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function y(e,t,n){if(h(e))return e;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return i.defineProperty(e,t,r),e}function b(e){throw e}var w=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1};if(i.isES5){var n=Object.getOwnPropertyNames;return function(e){for(var o=[],a=Object.create(null);null!=e&&!t(e);){var s;try{s=n(e)}catch(r){return o}for(var l=0;l<s.length;++l){var c=s[l];if(!a[c]){a[c]=!0;var u=Object.getOwnPropertyDescriptor(e,c);null!=u&&null==u.get&&null==u.set&&o.push(c)}}e=i.getPrototypeOf(e)}return o}}var o={}.hasOwnProperty;return function(n){if(t(n))return[];var r=[];e:for(var i in n)if(o.call(n,i))r.push(i);else{for(var a=0;a<e.length;++a)if(o.call(e[a],i))continue e;r.push(i)}return r}}(),C=/this\s*\.\s*\S+\s*=/;function x(e){try{if("function"===typeof e){var t=i.names(e.prototype),n=i.isES5&&t.length>1,o=t.length>0&&!(1===t.length&&"constructor"===t[0]),a=C.test(e+"")&&i.names(e).length>0;if(n||o||a)return!0}return!1}catch(r){return!1}}function S(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.foo}return r(),r(),e}var E=/^[a-z$_][a-z$_0-9]*$/i;function _(e){return E.test(e)}function R(e,t,n){for(var r=new Array(e),o=0;o<e;++o)r[o]=t+o+n;return r}function O(e){try{return e+""}catch(r){return"[no string representation]"}}function A(e){return e instanceof Error||null!==e&&"object"===typeof e&&"string"===typeof e.message&&"string"===typeof e.name}function P(e){try{y(e,"isOperational",!0)}catch(t){}}function T(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)}function D(e){return A(e)&&i.propertyIsWritable(e,"stack")}var k="stack"in new Error?function(e){return D(e)?e:new Error(O(e))}:function(e){if(D(e))return e;try{throw new Error(O(e))}catch(t){return t}};function N(e){return{}.toString.call(e)}function M(e,t,n){for(var r=i.names(e),o=0;o<r.length;++o){var a=r[o];if(n(a))try{i.defineProperty(t,a,i.getDescriptor(e,a))}catch(s){}}}var I=function(e){return i.isArray(e)?e:null};if("undefined"!==typeof Symbol&&Symbol.iterator){var L="function"===typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,n=[],r=e[Symbol.iterator]();!(t=r.next()).done;)n.push(t.value);return n};I=function(e){return i.isArray(e)?e:null!=e&&"function"===typeof e[Symbol.iterator]?L(e):null}}var F="undefined"!==typeof process&&"[object process]"===N(process).toLowerCase(),G="undefined"!==typeof process&&!0,H;function W(e){return G?{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}[e]:void 0}function V(){if("function"===typeof Promise)try{if("[object Promise]"===N(new Promise((function(){}))))return Promise}catch(r){}}function j(e,t){if(null===e||"function"!==typeof t||t===H)return t;null!==e.domain&&(t=e.domain.bind(t));var n=e.async;if(null!==n){var r=t;t=function(){var e=new Array(2).concat([].slice.call(arguments));return e[0]=r,e[1]=this,n.runInAsyncScope.apply(n,e)}}return t}var B={setReflectHandler:function(e){H=e},isClass:x,isIdentifier:_,inheritedDataKeys:w,getDataPropertyOrDefault:m,thrower:b,isArray:i.isArray,asArray:I,notEnumerableProp:y,isPrimitive:h,isObject:f,isError:A,canEvaluate:a,errorObj:s,tryCatch:p,inherits:d,withAppended:v,maybeWrapAsError:g,toFastProperties:S,filledRange:R,toString:O,canAttachTrace:D,ensureErrorObject:k,originatesFromRejection:T,markAsOriginatingFromRejection:P,classString:N,copyDescriptors:M,isNode:F,hasEnvVariables:G,env:W,global:c,getNativePromise:V,contextBind:j};B.isRecentNode=B.isNode&&function(){var e;return process.versions&&process.versions.node?e=process.versions.node.split(".").map(Number):process.version&&(e=process.version.split(".").map(Number)),0===e[0]&&e[1]>10||e[0]>0}(),B.nodeSupportsAsyncResource=B.isNode&&function(){var t=!1;try{t="function"===typeof e("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(r){t=!1}return t}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(r){B.lastLineError=r}t.exports=B},{"./es5":13,async_hooks:void 0}]},{},[4])(4)},e.exports=r(),"undefined"!==typeof window&&null!==window?window.P=window.Promise:"undefined"!==typeof self&&null!==self&&(self.P=self.Promise)},9773:function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},6474:function(e,t,n){"use strict";var r=n(6548),o=n(7465);function i(e,t){return delete t._rev,t.$createdAt=(new Date).toJSON(),t.$id?(t._id=t.$id+"_"+t.$createdAt,e.put(t).then((function(n){return n.$id=t.$id,s(e,n),n})).catch((function(e){if(409!==e.status)throw e}))):e.post(t).then((function(t){return t.$id=t.id,s(e,{id:t.id}),t}))}t.delta=new o.EventEmitter,t.deltaInit=function(){this.on("destroyed",(function(){this.delta.removeAllListeners()}))},t.clone=function(e){return JSON.parse(JSON.stringify(e))},t.merge=function(e,t){var n={};for(var r in e)n[r]=e[r];for(r in t)n[r]=t[r];return n},t.save=function(e){return i(this,e)},t.delete=function(e){var t,n="string"===typeof(t=e)||t instanceof String||function(e){return!isNaN(e)}(e)?e:e.$id;if(function(e){return"undefined"===typeof e}(n))throw new Error("missing $id");return i(this,{$id:n,$deleted:!0})},t.all=function(){var e={},n={};return this.allDocs({include_docs:!0}).then((function(r){return r.rows.forEach((function(r){r.doc.$id||(r.doc.$id=r.doc._id),r.doc.$deleted?(delete e[r.doc.$id],n[r.doc.$id]=!0):n[r.doc.$id]||(e[r.doc.$id]?e[r.doc.$id]=t.merge(e[r.doc.$id],r.doc):e[r.doc.$id]=r.doc)})),e}))};var a={};function s(e,n){e.get(n.id).then((function(e){var n=e.$id?e.$id:e._id;t.wasDeleted(n)||(e.$deleted?(t.markDeletion(n),t.delta.emit("delete",n)):e.$id?t.delta.emit("update",e):(e.$id=n,t.delta.emit("create",e)))}))}function l(e,t){return e.get(t).then((function(t){return e.remove(t)})).catch((function(e){if(404!==e.status)throw e}))}t.wasDeleted=function(e){return!!a[e]},t.markDeletion=function(e){a[e]=!0},t.saveChanges=function(e,t){var n=function(e,t){var n={},r=!1;for(var o in t)e[o]!==t[o]&&(r=!0,n[o]=t[o]);return r?n:null}(e,t);return null!==n?(n.$id=e.$id,this.save(n).then((function(){return n}))):r.resolve()},t.getAndRemove=function(e){return l(this,e)};var c=function(e,n,r,o){return function(){return function(e,n,r,o){return e.get(n.doc._id).then((function(i){if(n.doc.$id||(n.doc.$id=n.doc._id),n.doc.$deleted||o[n.doc.$id])return o[n.doc.$id]=!0,e.remove(i);if(r[n.doc.$id]){var a=!1;for(var s in n.doc)if("undefined"===typeof r[n.doc.$id][s]){a=!0;break}if(!a)return e.remove(i);r[n.doc.$id]=t.merge(r[n.doc.$id],n.doc)}else r[n.doc.$id]=n.doc}))}(e,n,r,o)}};t.cleanup=function(){var e=this;return e.allDocs({include_docs:!0}).then((function(t){var n={},o={},i=r.resolve();return t.rows.forEach((function(t){i=i.then(c(e,t,n,o))})),i.then((function(){if(!function(e){for(var t in e)return!1;return!0}(o))return function(e,t,n){var o=[];return t.rows.forEach((function(t){n[t.doc.$id]&&o.push(l(e,t.id))})),r.all(o)}(e,t,o)}))}))},"undefined"!==typeof window&&window.PouchDB&&window.PouchDB.plugin(t)},7465:function(e){"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!==e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"===typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&g(e,"error",t,n)}(e,o,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var o,i,a,c;if(s(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"===typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"===typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):f(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"===typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!==typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"===typeof l)r(l,this,t);else{var c=l.length,u=f(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!==typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},2110:function(e,t,n){"use strict";var r=n(8309),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var o=h(n);o&&o!==f&&e(t,o,r)}var a=u(n);p&&(a=a.concat(p(n)));for(var s=l(t),g=l(n),v=0;v<a.length;++v){var m=a[v];if(!i[m]&&(!r||!r[m])&&(!g||!g[m])&&(!s||!s[m])){var y=d(n,m);try{c(t,m,y)}catch(b){}}}}return t}},746:function(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function C(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case i:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case d:case v:case g:case l:return e;default:return t}}case o:return t}}}function x(e){return C(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return x(e)||C(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return C(e)===c},t.isContextProvider=function(e){return C(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return C(e)===d},t.isFragment=function(e){return C(e)===i},t.isLazy=function(e){return C(e)===v},t.isMemo=function(e){return C(e)===g},t.isPortal=function(e){return C(e)===o},t.isProfiler=function(e){return C(e)===s},t.isStrictMode=function(e){return C(e)===a},t.isSuspense=function(e){return C(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===p||e===s||e===a||e===h||e===f||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===m)},t.typeOf=C},8309:function(e,t,n){"use strict";e.exports=n(746)},37:function(e,t,n){"use strict";var r,o,i,a=[n(5525),n(1683),n(1374),n(1089),n(4018),n(4792)],s=-1,l=[],c=!1;function u(){r&&o&&(r=!1,o.length?l=o.concat(l):s=-1,l.length&&p())}function p(){if(!r){c=!1,r=!0;for(var e=l.length,t=setTimeout(u);e;){for(o=l,l=[];o&&++s<e;)o[s].run();s=-1,e=l.length}o=null,s=-1,r=!1,clearTimeout(t)}}for(var d=-1,h=a.length;++d<h;)if(a[d]&&a[d].test&&a[d].test()){i=a[d].install(p);break}function f(e,t){this.fun=e,this.array=t}f.prototype.run=function(){var e=this.fun,t=this.array;switch(t.length){case 0:return e();case 1:return e(t[0]);case 2:return e(t[0],t[1]);case 3:return e(t[0],t[1],t[2]);default:return e.apply(null,t)}},e.exports=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),c||r||(c=!0,i())}},1089:function(e,t,n){"use strict";t.test=function(){return!n.g.setImmediate&&"undefined"!==typeof n.g.MessageChannel},t.install=function(e){var t=new n.g.MessageChannel;return t.port1.onmessage=e,function(){t.port2.postMessage(0)}}},1374:function(e,t,n){"use strict";var r=n.g.MutationObserver||n.g.WebKitMutationObserver;t.test=function(){return r},t.install=function(e){var t=0,o=new r(e),i=n.g.document.createTextNode("");return o.observe(i,{characterData:!0}),function(){i.data=t=++t%2}}},1683:function(e,t,n){"use strict";t.test=function(){return"function"===typeof n.g.queueMicrotask},t.install=function(e){return function(){n.g.queueMicrotask(e)}}},4018:function(e,t,n){"use strict";t.test=function(){return"document"in n.g&&"onreadystatechange"in n.g.document.createElement("script")},t.install=function(e){return function(){var t=n.g.document.createElement("script");return t.onreadystatechange=function(){e(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},n.g.document.documentElement.appendChild(t),e}}},4792:function(e,t){"use strict";t.test=function(){return!0},t.install=function(e){return function(){setTimeout(e,0)}}},2534:function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1725:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,i){for(var a,s,l=o(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))n.call(a,u)&&(l[u]=a[u]);if(t){s=t(a);for(var p=0;p<s.length;p++)r.call(a,s[p])&&(l[s[p]]=a[s[p]])}}return l}},1834:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;for(var n=[],r=0;r<256;++r)n.push((r+256).toString(16).substr(1));var o=function(e,t){var r=t||0,o=n;return(o[e[r+0]]+o[e[r+1]]+o[e[r+2]]+o[e[r+3]]+"-"+o[e[r+4]]+o[e[r+5]]+"-"+o[e[r+6]]+o[e[r+7]]+"-"+o[e[r+8]]+o[e[r+9]]+"-"+o[e[r+10]]+o[e[r+11]]+o[e[r+12]]+o[e[r+13]]+o[e[r+14]]+o[e[r+15]]).toLowerCase()};t.default=o},2020:function(e,t,n){"use strict";Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}});var r=s(n(2239)),o=s(n(3368)),i=s(n(1673)),a=s(n(6166));function s(e){return e&&e.__esModule?e:{default:e}}},7473:function(e,t){"use strict";function n(e){return 14+(e+64>>>9<<4)+1}function r(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,i,a){return r((s=r(r(t,e),r(o,a)))<<(l=i)|s>>>32-l,n);var s,l}function i(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function a(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function l(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=function(e){if("string"===typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var o=0;o<t.length;++o)e[o]=t.charCodeAt(o)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",o=0;o<n;o+=8){var i=e[o>>5]>>>o%32&255,a=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[n(t)-1]=t;for(var o=1732584193,c=-271733879,u=-1732584194,p=271733878,d=0;d<e.length;d+=16){var h=o,f=c,g=u,v=p;o=i(o,c,u,p,e[d],7,-680876936),p=i(p,o,c,u,e[d+1],12,-389564586),u=i(u,p,o,c,e[d+2],17,606105819),c=i(c,u,p,o,e[d+3],22,-1044525330),o=i(o,c,u,p,e[d+4],7,-176418897),p=i(p,o,c,u,e[d+5],12,1200080426),u=i(u,p,o,c,e[d+6],17,-1473231341),c=i(c,u,p,o,e[d+7],22,-45705983),o=i(o,c,u,p,e[d+8],7,1770035416),p=i(p,o,c,u,e[d+9],12,-1958414417),u=i(u,p,o,c,e[d+10],17,-42063),c=i(c,u,p,o,e[d+11],22,-1990404162),o=i(o,c,u,p,e[d+12],7,1804603682),p=i(p,o,c,u,e[d+13],12,-40341101),u=i(u,p,o,c,e[d+14],17,-1502002290),o=a(o,c=i(c,u,p,o,e[d+15],22,1236535329),u,p,e[d+1],5,-165796510),p=a(p,o,c,u,e[d+6],9,-1069501632),u=a(u,p,o,c,e[d+11],14,643717713),c=a(c,u,p,o,e[d],20,-373897302),o=a(o,c,u,p,e[d+5],5,-701558691),p=a(p,o,c,u,e[d+10],9,38016083),u=a(u,p,o,c,e[d+15],14,-660478335),c=a(c,u,p,o,e[d+4],20,-405537848),o=a(o,c,u,p,e[d+9],5,568446438),p=a(p,o,c,u,e[d+14],9,-1019803690),u=a(u,p,o,c,e[d+3],14,-187363961),c=a(c,u,p,o,e[d+8],20,1163531501),o=a(o,c,u,p,e[d+13],5,-1444681467),p=a(p,o,c,u,e[d+2],9,-51403784),u=a(u,p,o,c,e[d+7],14,1735328473),o=s(o,c=a(c,u,p,o,e[d+12],20,-1926607734),u,p,e[d+5],4,-378558),p=s(p,o,c,u,e[d+8],11,-2022574463),u=s(u,p,o,c,e[d+11],16,1839030562),c=s(c,u,p,o,e[d+14],23,-35309556),o=s(o,c,u,p,e[d+1],4,-1530992060),p=s(p,o,c,u,e[d+4],11,1272893353),u=s(u,p,o,c,e[d+7],16,-155497632),c=s(c,u,p,o,e[d+10],23,-1094730640),o=s(o,c,u,p,e[d+13],4,681279174),p=s(p,o,c,u,e[d],11,-358537222),u=s(u,p,o,c,e[d+3],16,-722521979),c=s(c,u,p,o,e[d+6],23,76029189),o=s(o,c,u,p,e[d+9],4,-640364487),p=s(p,o,c,u,e[d+12],11,-421815835),u=s(u,p,o,c,e[d+15],16,530742520),o=l(o,c=s(c,u,p,o,e[d+2],23,-995338651),u,p,e[d],6,-198630844),p=l(p,o,c,u,e[d+7],10,1126891415),u=l(u,p,o,c,e[d+14],15,-1416354905),c=l(c,u,p,o,e[d+5],21,-57434055),o=l(o,c,u,p,e[d+12],6,1700485571),p=l(p,o,c,u,e[d+3],10,-1894986606),u=l(u,p,o,c,e[d+10],15,-1051523),c=l(c,u,p,o,e[d+1],21,-2054922799),o=l(o,c,u,p,e[d+8],6,1873313359),p=l(p,o,c,u,e[d+15],10,-30611744),u=l(u,p,o,c,e[d+6],15,-1560198380),c=l(c,u,p,o,e[d+13],21,1309151649),o=l(o,c,u,p,e[d+4],6,-145523070),p=l(p,o,c,u,e[d+11],10,-1120210379),u=l(u,p,o,c,e[d+2],15,718787259),c=l(c,u,p,o,e[d+9],21,-343485551),o=r(o,h),c=r(c,f),u=r(u,g),p=r(p,v)}return[o,c,u,p]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(n(t)),o=0;o<t;o+=8)r[o>>5]|=(255&e[o/8])<<o%32;return r}(e),8*e.length))};t.default=c},7978:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};var n="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16)},5263:function(e,t){"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){var t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"===typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var a=0;a<i.length;++a)e.push(i.charCodeAt(a))}e.push(128);for(var s=e.length/4+2,l=Math.ceil(s/16),c=new Array(l),u=0;u<l;++u){for(var p=new Uint32Array(16),d=0;d<16;++d)p[d]=e[64*u+4*d]<<24|e[64*u+4*d+1]<<16|e[64*u+4*d+2]<<8|e[64*u+4*d+3];c[u]=p}c[l-1][14]=8*(e.length-1)/Math.pow(2,32),c[l-1][14]=Math.floor(c[l-1][14]),c[l-1][15]=8*(e.length-1)&4294967295;for(var h=0;h<l;++h){for(var f=new Uint32Array(80),g=0;g<16;++g)f[g]=c[h][g];for(var v=16;v<80;++v)f[v]=r(f[v-3]^f[v-8]^f[v-14]^f[v-16],1);for(var m=o[0],y=o[1],b=o[2],w=o[3],C=o[4],x=0;x<80;++x){var S=Math.floor(x/20),E=r(m,5)+n(S,y,b,w)+C+t[S]+f[x]>>>0;C=w,w=b,b=r(y,30)>>>0,y=m,m=E}o[0]=o[0]+m>>>0,o[1]=o[1]+y>>>0,o[2]=o[2]+b>>>0,o[3]=o[3]+w>>>0,o[4]=o[4]+C>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},2239:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o,i=s(n(7978)),a=s(n(1834));function s(e){return e&&e.__esModule?e:{default:e}}var l=0,c=0;var u=function(e,t,n){var s=t&&n||0,u=t||[],p=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==p||null==d){var h=e.random||(e.rng||i.default)();null==p&&(p=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=o=16383&(h[6]<<8|h[7]))}var f=void 0!==e.msecs?e.msecs:Date.now(),g=void 0!==e.nsecs?e.nsecs:c+1,v=f-l+(g-c)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||f>l)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=f,c=g,o=d;var m=(1e4*(268435455&(f+=122192928e5))+g)%4294967296;u[s++]=m>>>24&255,u[s++]=m>>>16&255,u[s++]=m>>>8&255,u[s++]=255&m;var y=f/4294967296*1e4&268435455;u[s++]=y>>>8&255,u[s++]=255&y,u[s++]=y>>>24&15|16,u[s++]=y>>>16&255,u[s++]=d>>>8|128,u[s++]=255&d;for(var b=0;b<6;++b)u[s+b]=p[b];return t||(0,a.default)(u)};t.default=u},3368:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(1504)),o=i(n(7473));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v3",48,o.default);t.default=a},1504:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){function r(e,r,i,a){var s=i&&a||0;if("string"===typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"===typeof r&&(r=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(r)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(r)||16!==r.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var l=n(r.concat(e));if(l[6]=15&l[6]|t,l[8]=63&l[8]|128,i)for(var c=0;c<16;++c)i[s+c]=l[c];return i||(0,o.default)(l)}try{r.name=e}catch(s){}return r.DNS=i,r.URL=a,r},t.URL=t.DNS=void 0;var r,o=(r=n(1834))&&r.__esModule?r:{default:r};var i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=i;var a="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=a},1673:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(7978)),o=i(n(1834));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e,t,n){"string"===typeof e&&(t="binary"===e?new Uint8Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||r.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){for(var a=n||0,s=0;s<16;++s)t[a+s]=i[s];return t}return(0,o.default)(i)};t.default=a},6166:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(1504)),o=i(n(5263));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v5",80,o.default);t.default=a},888:function(e,t,n){"use strict";var r=n(9047);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2007:function(e,t,n){e.exports=n(888)()},9047:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3496:function(e,t,n){"use strict";var r="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},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(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(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=u(n(8700)),s=n(2791),l=u(s),c=u(n(2007));function u(e){return e&&e.__esModule?e:{default:e}}window.ApexCharts=a.default;var p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return l.default.createRef?n.chartRef=l.default.createRef():n.setRef=function(e){return n.chartRef=e},n.chart=null,n}return 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)}(e,s.Component),i(e,[{key:"render",value:function(){var e=this.props,t=(e.type,e.height,e.width,e.series,e.options,function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["type","height","width","series","options"]));return l.default.createElement("div",o({ref:l.default.createRef?this.chartRef:this.setRef},t))}},{key:"componentDidMount",value:function(){var e=l.default.createRef?this.chartRef.current:this.chartRef;this.chart=new a.default(e,this.getConfig()),this.chart.render()}},{key:"getConfig",value:function(){var e=this.props,t=e.type,n=e.height,r=e.width,o=e.series,i=e.options,a={chart:{type:t,height:n,width:r},series:o};return this.extend(i,a)}},{key:"isObject",value:function(e){return e&&"object"===(void 0===e?"undefined":r(e))&&!Array.isArray(e)&&null!=e}},{key:"extend",value:function(e,t){var n=this;"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t});var r=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach((function(o){n.isObject(t[o])&&o in e?r[o]=n.extend(e[o],t[o]):Object.assign(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}({},o,t[o]))})),r}},{key:"componentDidUpdate",value:function(e){if(!this.chart)return null;var t=this.props,n=t.options,r=t.series,o=t.height,i=t.width,a=JSON.stringify(e.options),s=JSON.stringify(e.series),l=JSON.stringify(n),c=JSON.stringify(r);a===l&&s===c&&o===e.height&&i===e.width||(s===c?this.chart.updateOptions(this.getConfig()):a===l&&o===e.height&&i===e.width?this.chart.updateSeries(r):this.chart.updateOptions(this.getConfig()))}},{key:"componentWillUnmount",value:function(){this.chart&&"function"==typeof this.chart.destroy&&this.chart.destroy()}}]),e}();(t.Z=p).propTypes={type:c.default.string.isRequired,width:c.default.any,height:c.default.any,series:c.default.array.isRequired,options:c.default.object.isRequired},p.defaultProps={type:"line",width:"100%",height:"auto"}},4424:function(e,t,n){"use strict";var r=n(1725),o=n(2791);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=60106,s=60107,l=60108,c=60114,u=60109,p=60110,d=60112,h=60113,f=60120,g=60115,v=60116,m=60121,y=60117,b=60119,w=60129,C=60131;if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;a=x("react.portal"),s=x("react.fragment"),l=x("react.strict_mode"),c=x("react.profiler"),u=x("react.provider"),p=x("react.context"),d=x("react.forward_ref"),h=x("react.suspense"),f=x("react.suspense_list"),g=x("react.memo"),v=x("react.lazy"),m=x("react.block"),y=x("react.fundamental"),b=x("react.scope"),w=x("react.debug_trace_mode"),C=x("react.legacy_hidden")}function S(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case s:return"Fragment";case a:return"Portal";case c:return"Profiler";case l:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case p:return(e.displayName||"Context")+".Consumer";case u:return(e._context.displayName||"Context")+".Provider";case d:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case g:return S(e.type);case m:return S(e._render);case v:t=e._payload,e=e._init;try{return S(e(t))}catch(n){}}return null}var E=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_={};function R(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var O=new Uint16Array(16),A=0;15>A;A++)O[A]=A+1;O[15]=0;var P=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,T=Object.prototype.hasOwnProperty,D={},k={};function N(e){return!!T.call(k,e)||!T.call(D,e)&&(P.test(e)?k[e]=!0:(D[e]=!0,!1))}function M(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){I[e]=new M(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];I[t]=new M(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){I[e]=new M(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){I[e]=new M(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){I[e]=new M(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){I[e]=new M(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){I[e]=new M(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){I[e]=new M(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){I[e]=new M(e,5,!1,e.toLowerCase(),null,!1,!1)}));var L=/[\-:]([a-z])/g;function F(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(L,F);I[t]=new M(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(L,F);I[t]=new M(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(L,F);I[t]=new M(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){I[e]=new M(e,1,!1,e.toLowerCase(),null,!1,!1)})),I.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){I[e]=new M(e,1,!1,e.toLowerCase(),null,!0,!0)}));var G=/["'&<>]/;function H(e){if("boolean"===typeof e||"number"===typeof e)return""+e;e=""+e;var t=G.exec(e);if(t){var n,r="",o=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}o!==n&&(r+=e.substring(o,n)),o=n+1,r+=t}e=o!==n?r+e.substring(o,n):r}return e}function W(e,t){var n,r=I.hasOwnProperty(e)?I[e]:null;return(n="style"!==e)&&(n=null!==r?0===r.type:2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])),n||function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(e,t,r,!1)?"":null!==r?(e=r.attributeName,3===(n=r.type)||4===n&&!0===t?e+'=""':(r.sanitizeURL&&(t=""+t),e+'="'+H(t)+'"')):N(e)?e+'="'+H(t)+'"':""}var V="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},j=null,B=null,z=null,U=!1,Y=!1,X=null,q=0;function K(){if(null===j)throw Error(i(321));return j}function $(){if(0<q)throw Error(i(312));return{memoizedState:null,queue:null,next:null}}function Q(){return null===z?null===B?(U=!1,B=z=$()):(U=!0,z=B):null===z.next?(U=!1,z=z.next=$()):(U=!0,z=z.next),z}function Z(e,t,n,r){for(;Y;)Y=!1,q+=1,z=null,n=e(t,r);return J(),n}function J(){j=null,Y=!1,B=null,q=0,z=X=null}function ee(e,t){return"function"===typeof t?t(e):t}function te(e,t,n){if(j=K(),z=Q(),U){var r=z.queue;if(t=r.dispatch,null!==X&&void 0!==(n=X.get(r))){X.delete(r),r=z.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return z.memoizedState=r,[r,t]}return[z.memoizedState,t]}return e=e===ee?"function"===typeof t?t():t:void 0!==n?n(t):t,z.memoizedState=e,e=(e=z.queue={last:null,dispatch:null}).dispatch=re.bind(null,j,e),[z.memoizedState,e]}function ne(e,t){if(j=K(),t=void 0===t?null:t,null!==(z=Q())){var n=z.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!V(t[o],r[o])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),z.memoizedState=[e,t],e}function re(e,t,n){if(!(25>q))throw Error(i(301));if(e===j)if(Y=!0,e={action:n,next:null},null===X&&(X=new Map),void 0===(n=X.get(t)))X.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function oe(){}var ie=null,ae={readContext:function(e){var t=ie.threadID;return R(e,t),e[t]},useContext:function(e){K();var t=ie.threadID;return R(e,t),e[t]},useMemo:ne,useReducer:te,useRef:function(e){j=K();var t=(z=Q()).memoizedState;return null===t?(e={current:e},z.memoizedState=e):t},useState:function(e){return te(ee,e)},useLayoutEffect:function(){},useCallback:function(e,t){return ne((function(){return e}),t)},useImperativeHandle:oe,useEffect:oe,useDebugValue:oe,useDeferredValue:function(e){return K(),e},useTransition:function(){return K(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(ie.identifierPrefix||"")+"R:"+(ie.uniqueID++).toString(36)},useMutableSource:function(e,t){return K(),t(e._source)}},se="http://www.w3.org/1999/xhtml";function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var ce={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ue=r({menuitem:!0},ce),pe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},de=["Webkit","ms","Moz","O"];Object.keys(pe).forEach((function(e){de.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var he=/([A-Z])/g,fe=/^ms-/,ge=o.Children.toArray,ve=E.ReactCurrentDispatcher,me={listing:!0,pre:!0,textarea:!0},ye=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,be={},we={};var Ce=Object.prototype.hasOwnProperty,xe={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function Se(e,t){if(void 0===e)throw Error(i(152,S(t)||"Component"))}function Ee(e,t,n){function a(o,a){var s=a.prototype&&a.prototype.isReactComponent,l=function(e,t,n,r){if(r&&"object"===typeof(r=e.contextType)&&null!==r)return R(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=_;return t}(a,t,n,s),c=[],u=!1,p={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===c)return null},enqueueReplaceState:function(e,t){u=!0,c=[t]},enqueueSetState:function(e,t){if(null===c)return null;c.push(t)}};if(s){if(s=new a(o.props,l,p),"function"===typeof a.getDerivedStateFromProps){var d=a.getDerivedStateFromProps.call(null,o.props,s.state);null!=d&&(s.state=r({},s.state,d))}}else if(j={},s=a(o.props,l,p),null==(s=Z(a,o.props,s,l))||null==s.render)return void Se(e=s,a);if(s.props=o.props,s.context=l,s.updater=p,void 0===(p=s.state)&&(s.state=p=null),"function"===typeof s.UNSAFE_componentWillMount||"function"===typeof s.componentWillMount)if("function"===typeof s.componentWillMount&&"function"!==typeof a.getDerivedStateFromProps&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&"function"!==typeof a.getDerivedStateFromProps&&s.UNSAFE_componentWillMount(),c.length){p=c;var h=u;if(c=null,u=!1,h&&1===p.length)s.state=p[0];else{d=h?p[0]:s.state;var f=!0;for(h=h?1:0;h<p.length;h++){var g=p[h];null!=(g="function"===typeof g?g.call(s,d,o.props,l):g)&&(f?(f=!1,d=r({},d,g)):r(d,g))}s.state=d}}else c=null;if(Se(e=s.render(),a),"function"===typeof s.getChildContext&&"object"===typeof(o=a.childContextTypes)){var v=s.getChildContext();for(var m in v)if(!(m in o))throw Error(i(108,S(a)||"Unknown",m))}v&&(t=r({},t,v))}for(;o.isValidElement(e);){var s=e,l=s.type;if("function"!==typeof l)break;a(s,l)}return{child:e,context:t}}var _e=function(){function e(e,t,n){o.isValidElement(e)?e.type!==s?e=[e]:(e=e.props.children,e=o.isValidElement(e)?[e]:ge(e)):e=ge(e),e={type:null,domNamespace:se,children:e,childIndex:0,context:_,footer:""};var r=O[0];if(0===r){var a=O,l=2*(r=a.length);if(!(65536>=l))throw Error(i(304));var c=new Uint16Array(l);for(c.set(a),(O=c)[0]=r+1,a=r;a<l-1;a++)O[a]=a+1;O[l-1]=0}else O[0]=O[r];this.threadID=r,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[],this.uniqueID=0,this.identifierPrefix=n&&n.identifierPrefix||""}var t=e.prototype;return t.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var e=this.threadID;O[e]=O[0],O[0]=e}},t.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID;R(n,r);var o=n[r];this.contextStack[t]=n,this.contextValueStack[t]=o,n[r]=e.props.value},t.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},t.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},t.read=function(e){if(this.exhausted)return null;var t=ie;ie=this;var n=ve.current;ve.current=ae;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var a=this.threadID;O[a]=O[0],O[0]=a;break}var s=this.stack[this.stack.length-1];if(o||s.childIndex>=s.children.length){var l=s.footer;if(""!==l&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===s.type)this.currentSelectValue=null;else if(null!=s.type&&null!=s.type.type&&s.type.type.$$typeof===u)this.popProvider(s.type);else if(s.type===h){this.suspenseDepth--;var c=r.pop();if(o){o=!1;var p=s.fallbackFrame;if(!p)throw Error(i(303));this.stack.push(p),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=c}r[this.suspenseDepth]+=l}else{var d=s.children[s.childIndex++],f="";try{f+=this.render(d,s.context,s.domNamespace)}catch(g){if(null!=g&&"function"===typeof g.then)throw Error(i(294));throw g}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=f}}return r[0]}finally{ve.current=n,ie=t,J()}},t.render=function(e,t,n){if("string"===typeof e||"number"===typeof e)return""===(n=""+e)?"":this.makeStaticMarkup?H(n):this.previousWasTextNode?"\x3c!-- --\x3e"+H(n):(this.previousWasTextNode=!0,H(n));if(e=(t=Ee(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!o.isValidElement(e)){if(null!=e&&null!=e.$$typeof){if((n=e.$$typeof)===a)throw Error(i(257));throw Error(i(258,n.toString()))}return e=ge(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}var m=e.type;if("string"===typeof m)return this.renderDOM(e,t,n);switch(m){case C:case w:case l:case c:case f:case s:return e=ge(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case h:throw Error(i(294));case b:throw Error(i(343))}if("object"===typeof m&&null!==m)switch(m.$$typeof){case d:j={};var x=m.render(e.props,e.ref);return x=Z(m.render,e.props,x,e.ref),x=ge(x),this.stack.push({type:null,domNamespace:n,children:x,childIndex:0,context:t,footer:""}),"";case g:return e=[o.createElement(m.type,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case u:return n={type:e,domNamespace:n,children:m=ge(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case p:m=e.type,x=e.props;var S=this.threadID;return R(m,S),m=ge(x.children(m[S])),this.stack.push({type:e,domNamespace:n,children:m,childIndex:0,context:t,footer:""}),"";case y:throw Error(i(338));case v:return m=(x=(m=e.type)._init)(m._payload),e=[o.createElement(m,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}throw Error(i(130,null==m?m:typeof m,""))},t.renderDOM=function(e,t,n){var a=e.type.toLowerCase();if(n===se&&le(a),!be.hasOwnProperty(a)){if(!ye.test(a))throw Error(i(65,a));be[a]=!0}var s=e.props;if("input"===a)s=r({type:void 0},s,{defaultChecked:void 0,defaultValue:void 0,value:null!=s.value?s.value:s.defaultValue,checked:null!=s.checked?s.checked:s.defaultChecked});else if("textarea"===a){var l=s.value;if(null==l){l=s.defaultValue;var c=s.children;if(null!=c){if(null!=l)throw Error(i(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(i(93));c=c[0]}l=""+c}null==l&&(l="")}s=r({},s,{value:void 0,children:""+l})}else if("select"===a)this.currentSelectValue=null!=s.value?s.value:s.defaultValue,s=r({},s,{value:void 0});else if("option"===a){c=this.currentSelectValue;var u=function(e){if(void 0===e||null===e)return e;var t="";return o.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(s.children);if(null!=c){var p=null!=s.value?s.value+"":u;if(l=!1,Array.isArray(c)){for(var d=0;d<c.length;d++)if(""+c[d]===p){l=!0;break}}else l=""+c===p;s=r({selected:void 0,children:void 0},s,{selected:l,children:u})}}if(l=s){if(ue[a]&&(null!=l.children||null!=l.dangerouslySetInnerHTML))throw Error(i(137,a));if(null!=l.dangerouslySetInnerHTML){if(null!=l.children)throw Error(i(60));if("object"!==typeof l.dangerouslySetInnerHTML||!("__html"in l.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=l.style&&"object"!==typeof l.style)throw Error(i(62))}l=s,c=this.makeStaticMarkup,u=1===this.stack.length,p="<"+e.type;e:if(-1===a.indexOf("-"))d="string"===typeof l.is;else switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":d=!1;break e;default:d=!0}for(C in l)if(Ce.call(l,C)){var h=l[C];if(null!=h){if("style"===C){var f=void 0,g="",v="";for(f in h)if(h.hasOwnProperty(f)){var m=0===f.indexOf("--"),y=h[f];if(null!=y){if(m)var b=f;else if(b=f,we.hasOwnProperty(b))b=we[b];else{var w=b.replace(he,"-$1").toLowerCase().replace(fe,"-ms-");b=we[b]=w}g+=v+b+":",v=f,g+=m=null==y||"boolean"===typeof y||""===y?"":m||"number"!==typeof y||0===y||pe.hasOwnProperty(v)&&pe[v]?(""+y).trim():y+"px",v=";"}}h=g||null}f=null,d?xe.hasOwnProperty(C)||(f=N(f=C)&&null!=h?f+'="'+H(h)+'"':""):f=W(C,h),f&&(p+=" "+f)}}c||u&&(p+=' data-reactroot=""');var C=p;l="",ce.hasOwnProperty(a)?C+="/>":(C+=">",l="</"+e.type+">");e:{if(null!=(c=s.dangerouslySetInnerHTML)){if(null!=c.__html){c=c.__html;break e}}else if("string"===typeof(c=s.children)||"number"===typeof c){c=H(c);break e}c=null}return null!=c?(s=[],me.hasOwnProperty(a)&&"\n"===c.charAt(0)&&(C+="\n"),C+=c):s=ge(s.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?le(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:a,children:s,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,C},e}();t.renderToNodeStream=function(){throw Error(i(207))},t.renderToStaticMarkup=function(e,t){e=new _e(e,!0,t);try{return e.read(1/0)}finally{e.destroy()}},t.renderToStaticNodeStream=function(){throw Error(i(208))},t.renderToString=function(e,t){e=new _e(e,!1,t);try{return e.read(1/0)}finally{e.destroy()}},t.version="17.0.2"},4463:function(e,t,n){"use strict";var r=n(2791),o=n(1725),i=n(5296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,l={};function c(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(l[e]=t,e=0;e<t.length;e++)s.add(t[e])}var p=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h=Object.prototype.hasOwnProperty,f={},g={};function v(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var o=m.hasOwnProperty(t)?m[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!h.call(g,e)||!h.call(f,e)&&(d.test(e)?g[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);m[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);m[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);m[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var C=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,S=60106,E=60107,_=60108,R=60114,O=60109,A=60110,P=60112,T=60113,D=60120,k=60115,N=60116,M=60121,I=60128,L=60129,F=60130,G=60131;if("function"===typeof Symbol&&Symbol.for){var H=Symbol.for;x=H("react.element"),S=H("react.portal"),E=H("react.fragment"),_=H("react.strict_mode"),R=H("react.profiler"),O=H("react.provider"),A=H("react.context"),P=H("react.forward_ref"),T=H("react.suspense"),D=H("react.suspense_list"),k=H("react.memo"),N=H("react.lazy"),M=H("react.block"),H("react.scope"),I=H("react.opaque.id"),L=H("react.debug_trace_mode"),F=H("react.offscreen"),G=H("react.legacy_hidden")}var W,V="function"===typeof Symbol&&Symbol.iterator;function j(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=V&&e[V]||e["@@iterator"])?e:null}function B(e){if(void 0===W)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||""}return"\n"+W+e}var z=!1;function U(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var o=l.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function Y(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=U(e.type,!1);case 11:return e=U(e.type.render,!1);case 22:return e=U(e.type._render,!1);case 1:return e=U(e.type,!0);default:return""}}function X(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case E:return"Fragment";case S:return"Portal";case R:return"Profiler";case _:return"StrictMode";case T:return"Suspense";case D:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case k:return X(e.type);case M:return X(e._render);case N:t=e._payload,e=e._init;try{return X(e(t))}catch(n){}}return null}function q(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=q(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=q(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+q(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:q(n)}}function ce(e,t){var n=q(t.value),r=q(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ue(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var pe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function he(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?he(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ge,ve,me=(ve=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((ge=ge||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ge.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ve(e,t)}))}:ve);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function Ce(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=Ce(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(be).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Se=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ee(e,t){if(t){if(Se[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Re(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Oe=null,Ae=null,Pe=null;function Te(e){if(e=ro(e)){if("function"!==typeof Oe)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),Oe(e.stateNode,e.type,t))}}function De(e){Ae?Pe?Pe.push(e):Pe=[e]:Ae=e}function ke(){if(Ae){var e=Ae,t=Pe;if(Pe=Ae=null,Te(e),t)for(e=0;e<t.length;e++)Te(t[e])}}function Ne(e,t){return e(t)}function Me(e,t,n,r,o){return e(t,n,r,o)}function Ie(){}var Le=Ne,Fe=!1,Ge=!1;function He(){null===Ae&&null===Pe||(Ie(),ke())}function We(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Ve=!1;if(p)try{var je={};Object.defineProperty(je,"passive",{get:function(){Ve=!0}}),window.addEventListener("test",je,je),window.removeEventListener("test",je,je)}catch(ve){Ve=!1}function Be(e,t,n,r,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var ze=!1,Ue=null,Ye=!1,Xe=null,qe={onError:function(e){ze=!0,Ue=e}};function Ke(e,t,n,r,o,i,a,s,l){ze=!1,Ue=null,Be.apply(qe,arguments)}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ze(e){if($e(e)!==e)throw Error(a(188))}function Je(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Ze(o),e;if(i===r)return Ze(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],st=null,lt=null,ct=null,ut=new Map,pt=new Map,dt=[],ht="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ft(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function gt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":ut.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pt.delete(t.pointerId)}}function vt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ft(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function mt(e){var t=no(e.target);if(null!==t){var n=$e(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function wt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&yt(st)&&(st=null),null!==lt&&yt(lt)&&(lt=null),null!==ct&&yt(ct)&&(ct=null),ut.forEach(bt),pt.forEach(bt)}function Ct(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,wt)))}function xt(e){function t(t){return Ct(t,e)}if(0<at.length){Ct(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&Ct(st,e),null!==lt&&Ct(lt,e),null!==ct&&Ct(ct,e),ut.forEach(t),pt.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)mt(n),null===n.blockedOn&&dt.shift()}function St(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Et={animationend:St("Animation","AnimationEnd"),animationiteration:St("Animation","AnimationIteration"),animationstart:St("Animation","AnimationStart"),transitionend:St("Transition","TransitionEnd")},_t={},Rt={};function Ot(e){if(_t[e])return _t[e];if(!Et[e])return e;var t,n=Et[e];for(t in n)if(n.hasOwnProperty(t)&&t in Rt)return _t[e]=n[t];return e}p&&(Rt=document.createElement("div").style,"AnimationEvent"in window||(delete Et.animationend.animation,delete Et.animationiteration.animation,delete Et.animationstart.animation),"TransitionEvent"in window||delete Et.transitionend.transition);var At=Ot("animationend"),Pt=Ot("animationiteration"),Tt=Ot("animationstart"),Dt=Ot("transitionend"),kt=new Map,Nt=new Map,Mt=["abort","abort",At,"animationEnd",Pt,"animationIteration",Tt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Dt,"transitionEnd","waiting","waiting"];function It(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Nt.set(r,t),kt.set(r,o),c(o,[r])}}(0,i.unstable_now)();var Lt=8;function Ft(e){if(0!==(1&e))return Lt=15,1;if(0!==(2&e))return Lt=14,2;if(0!==(4&e))return Lt=13,4;var t=24&e;return 0!==t?(Lt=12,t):0!==(32&e)?(Lt=11,32):0!==(t=192&e)?(Lt=10,t):0!==(256&e)?(Lt=9,256):0!==(t=3584&e)?(Lt=8,t):0!==(4096&e)?(Lt=7,4096):0!==(t=4186112&e)?(Lt=6,t):0!==(t=62914560&e)?(Lt=5,t):67108864&e?(Lt=4,67108864):0!==(134217728&e)?(Lt=3,134217728):0!==(t=805306368&e)?(Lt=2,t):0!==(1073741824&e)?(Lt=1,1073741824):(Lt=8,e)}function Gt(e,t){var n=e.pendingLanes;if(0===n)return Lt=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=Lt=15;else if(0!==(i=134217727&n)){var l=i&~a;0!==l?(r=Ft(l),o=Lt):0!==(s&=i)&&(r=Ft(s),o=Lt)}else 0!==(i=n&~a)?(r=Ft(i),o=Lt):0!==s&&(r=Ft(s),o=Lt);if(0===r)return 0;if(r=n&((0>(r=31-zt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Ft(t),o<=Lt)return t;Lt=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-zt(t)),r|=e[n],t&=~o;return r}function Ht(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Wt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Vt(24&~t))?Wt(10,t):e;case 10:return 0===(e=Vt(192&~t))?Wt(8,t):e;case 8:return 0===(e=Vt(3584&~t))&&(0===(e=Vt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Vt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Vt(e){return e&-e}function jt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-zt(t)]=n}var zt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Ut(e)/Yt|0)|0},Ut=Math.log,Yt=Math.LN2;var Xt=i.unstable_UserBlockingPriority,qt=i.unstable_runWithPriority,Kt=!0;function $t(e,t,n,r){Fe||Ie();var o=Zt,i=Fe;Fe=!0;try{Me(o,e,t,n,r)}finally{(Fe=i)||He()}}function Qt(e,t,n,r){qt(Xt,Zt.bind(null,e,t,n,r))}function Zt(e,t,n,r){var o;if(Kt)if((o=0===(4&t))&&0<at.length&&-1<ht.indexOf(e))e=ft(null,e,t,n,r),at.push(e);else{var i=Jt(e,t,n,r);if(null===i)o&>(e,r);else{if(o){if(-1<ht.indexOf(e))return e=ft(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return st=vt(st,e,t,n,r,o),!0;case"dragenter":return lt=vt(lt,e,t,n,r,o),!0;case"mouseover":return ct=vt(ct,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ut.set(i,vt(ut.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,pt.set(i,vt(pt.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;gt(e,r)}Ir(e,t,r,null,n)}}}function Jt(e,t,n,r){var o=Re(r);if(null!==(o=no(o))){var i=$e(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Qe(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Ir(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function ln(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,un,pn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=ln(dn),fn=o({},dn,{view:0,detail:0}),gn=ln(fn),vn=o({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==pn&&(pn&&"mousemove"===e.type?(cn=e.screenX-pn.screenX,un=e.screenY-pn.screenY):un=cn=0,pn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:un}}),mn=ln(vn),yn=ln(o({},vn,{dataTransfer:0})),bn=ln(o({},fn,{relatedTarget:0})),wn=ln(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),Cn=o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=ln(Cn),Sn=ln(o({},dn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_n={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Rn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function On(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Rn[e])&&!!t[e]}function An(){return On}var Pn=o({},fn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_n[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=ln(Pn),Dn=ln(o({},vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=ln(o({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Nn=ln(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=o({},vn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),In=ln(Mn),Ln=[9,13,27,32],Fn=p&&"CompositionEvent"in window,Gn=null;p&&"documentMode"in document&&(Gn=document.documentMode);var Hn=p&&"TextEvent"in window&&!Gn,Wn=p&&(!Fn||Gn&&8<Gn&&11>=Gn),Vn=String.fromCharCode(32),jn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var Yn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Yn[e.type]:"textarea"===t}function qn(e,t,n,r){De(r),0<(t=Fr(t,"onChange")).length&&(n=new hn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,$n=null;function Qn(e){Pr(e,0)}function Zn(e){if(Q(oo(e)))return e}function Jn(e,t){if("change"===e)return t}var er=!1;if(p){var tr;if(p){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){Kn&&(Kn.detachEvent("onpropertychange",ir),$n=Kn=null)}function ir(e){if("value"===e.propertyName&&Zn($n)){var t=[];if(qn(t,$n,e,Re(e)),e=Qn,Fe)e(t);else{Fe=!0;try{Ne(e,t)}finally{Fe=!1,He()}}}}function ar(e,t,n){"focusin"===e?(or(),$n=n,(Kn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zn($n)}function lr(e,t){if("click"===e)return Zn(t)}function cr(e,t){if("input"===e||"change"===e)return Zn(t)}var ur="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},pr=Object.prototype.hasOwnProperty;function dr(e,t){if(ur(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!pr.call(t,n[r])||!ur(e[n[r]],t[n[r]]))return!1;return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=hr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=hr(r)}}function gr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?gr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function vr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var yr=p&&"documentMode"in document&&11>=document.documentMode,br=null,wr=null,Cr=null,xr=!1;function Sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==br||br!==Z(r)||("selectionStart"in(r=br)&&mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Cr&&dr(Cr,r)||(Cr=r,0<(r=Fr(wr,"onSelect")).length&&(t=new hn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}It("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),It("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),It(Mt,2);for(var Er="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),_r=0;_r<Er.length;_r++)Nt.set(Er[_r],0);u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Or=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rr));function Ar(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,l,c){if(Ke.apply(this,arguments),ze){if(!ze)throw Error(a(198));var u=Ue;ze=!1,Ue=null,Ye||(Ye=!0,Xe=u)}}(r,t,void 0,e),e.currentTarget=null}function Pr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Ar(o,s,c),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Ar(o,s,c),i=l}}}if(Ye)throw e=Xe,Ye=!1,Xe=null,e}function Tr(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Mr(t,e,2,!1),n.add(r))}var Dr="_reactListening"+Math.random().toString(36).slice(2);function kr(e){e[Dr]||(e[Dr]=!0,s.forEach((function(t){Or.has(t)||Nr(t,!1,e,null),Nr(t,!0,e,null)})))}function Nr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Or.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(o|=4),Mr(i,e,o,t),a.add(s))}function Mr(e,t,n,r){var o=Nt.get(t);switch(void 0===o?2:o){case 0:o=$t;break;case 1:o=Qt;break;default:o=Zt}n=o.bind(null,t,n,e),o=void 0,!Ve||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ir(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=no(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Ge)return e(t,n);Ge=!0;try{Le(e,t,n)}finally{Ge=!1,He()}}((function(){var r=i,o=Re(n),a=[];e:{var s=kt.get(e);if(void 0!==s){var l=hn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":l=Tn;break;case"focusin":c="focus",l=bn;break;case"focusout":c="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=kn;break;case At:case Pt:case Tt:l=wn;break;case Dt:l=Nn;break;case"scroll":l=gn;break;case"wheel":l=In;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Dn}var u=0!==(4&t),p=!u&&"scroll"===e,d=u?null!==s?s+"Capture":null:s;u=[];for(var h,f=r;null!==f;){var g=(h=f).stateNode;if(5===h.tag&&null!==g&&(h=g,null!==d&&(null!=(g=We(f,d))&&u.push(Lr(f,g,h)))),p)break;f=f.return}0<u.length&&(s=new l(s,c,null,n,o),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!no(c)&&!c[eo])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?no(c):null)&&(c!==(p=$e(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=mn,g="onMouseLeave",d="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=Dn,g="onPointerLeave",d="onPointerEnter",f="pointer"),p=null==l?s:oo(l),h=null==c?s:oo(c),(s=new u(g,f+"leave",l,n,o)).target=p,s.relatedTarget=h,g=null,no(o)===r&&((u=new u(d,f+"enter",c,n,o)).target=h,u.relatedTarget=p,g=u),p=g,l&&c)e:{for(d=c,f=0,h=u=l;h;h=Gr(h))f++;for(h=0,g=d;g;g=Gr(g))h++;for(;0<f-h;)u=Gr(u),f--;for(;0<h-f;)d=Gr(d),h--;for(;f--;){if(u===d||null!==d&&u===d.alternate)break e;u=Gr(u),d=Gr(d)}u=null}else u=null;null!==l&&Hr(a,s,l,u,!1),null!==c&&null!==p&&Hr(a,p,c,u,!0)}if("select"===(l=(s=r?oo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var v=Jn;else if(Xn(s))if(er)v=cr;else{v=sr;var m=ar}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=lr);switch(v&&(v=v(e,r))?qn(a,v,n,o):(m&&m(e,s,r),"focusout"===e&&(m=s._wrapperState)&&m.controlled&&"number"===s.type&&oe(s,"number",s.value)),m=r?oo(r):window,e){case"focusin":(Xn(m)||"true"===m.contentEditable)&&(br=m,wr=r,Cr=null);break;case"focusout":Cr=wr=br=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,Sr(a,n,o);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":Sr(a,n,o)}var y;if(Fn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?Bn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Wn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=rn()):(tn="value"in(en=o)?en.value:en.textContent,Un=!0)),0<(m=Fr(r,b)).length&&(b=new Sn(b,e,null,n,o),a.push({event:b,listeners:m}),y?b.data=y:null!==(y=zn(n))&&(b.data=y))),(y=Hn?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(jn=!0,Vn);case"textInput":return(e=t.data)===Vn&&jn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Fn&&Bn(e,t)?(e=rn(),nn=tn=en=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Fr(r,"onBeforeInput")).length&&(o=new Sn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Pr(a,t)}))}function Lr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=We(e,n))&&r.unshift(Lr(e,i,o)),null!=(i=We(e,t))&&r.push(Lr(e,i,o))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Hr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=We(n,i))&&a.unshift(Lr(n,l,s)):o||null!=(l=We(n,i))&&a.push(Lr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Wr(){}var Vr=null,jr=null;function Br(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function zr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ur="function"===typeof setTimeout?setTimeout:void 0,Yr="function"===typeof clearTimeout?clearTimeout:void 0;function Xr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function qr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Kr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var $r=0;var Qr=Math.random().toString(36).slice(2),Zr="__reactFiber$"+Qr,Jr="__reactProps$"+Qr,eo="__reactContainer$"+Qr,to="__reactEvents$"+Qr;function no(e){var t=e[Zr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[Zr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Kr(e);null!==e;){if(n=e[Zr])return n;e=Kr(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[Zr]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Jr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var so=[],lo=-1;function co(e){return{current:e}}function uo(e){0>lo||(e.current=so[lo],so[lo]=null,lo--)}function po(e,t){lo++,so[lo]=e.current,e.current=t}var ho={},fo=co(ho),go=co(!1),vo=ho;function mo(e,t){var n=e.type.contextTypes;if(!n)return ho;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function bo(){uo(go),uo(fo)}function wo(e,t,n){if(fo.current!==ho)throw Error(a(168));po(fo,t),po(go,n)}function Co(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,X(t)||"Unknown",i));return o({},n,r)}function xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ho,vo=fo.current,po(fo,e),po(go,go.current),!0}function So(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Co(e,t,vo),r.__reactInternalMemoizedMergedChildContext=e,uo(go),uo(fo),po(fo,e)):uo(go),po(go,n)}var Eo=null,_o=null,Ro=i.unstable_runWithPriority,Oo=i.unstable_scheduleCallback,Ao=i.unstable_cancelCallback,Po=i.unstable_shouldYield,To=i.unstable_requestPaint,Do=i.unstable_now,ko=i.unstable_getCurrentPriorityLevel,No=i.unstable_ImmediatePriority,Mo=i.unstable_UserBlockingPriority,Io=i.unstable_NormalPriority,Lo=i.unstable_LowPriority,Fo=i.unstable_IdlePriority,Go={},Ho=void 0!==To?To:function(){},Wo=null,Vo=null,jo=!1,Bo=Do(),zo=1e4>Bo?Do:function(){return Do()-Bo};function Uo(){switch(ko()){case No:return 99;case Mo:return 98;case Io:return 97;case Lo:return 96;case Fo:return 95;default:throw Error(a(332))}}function Yo(e){switch(e){case 99:return No;case 98:return Mo;case 97:return Io;case 96:return Lo;case 95:return Fo;default:throw Error(a(332))}}function Xo(e,t){return e=Yo(e),Ro(e,t)}function qo(e,t,n){return e=Yo(e),Oo(e,t,n)}function Ko(){if(null!==Vo){var e=Vo;Vo=null,Ao(e)}$o()}function $o(){if(!jo&&null!==Wo){jo=!0;var e=0;try{var t=Wo;Xo(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Wo=null}catch(n){throw null!==Wo&&(Wo=Wo.slice(e+1)),Oo(No,Ko),n}finally{jo=!1}}}var Qo=C.ReactCurrentBatchConfig;function Zo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Jo=co(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Jo.current;uo(Jo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Fa=!0),e.firstContext=null)}function si(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var li=!1;function ci(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ui(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function di(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function hi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fi(e,t,n,r){var i=e.updateQueue;li=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?a=u:s.next=u,s=c;var p=e.alternate;if(null!==p){var d=(p=p.updateQueue).lastBaseUpdate;d!==s&&(null===d?p.firstBaseUpdate=u:d.next=u,p.lastBaseUpdate=c)}}if(null!==a){for(d=i.baseState,s=0,p=u=c=null;;){l=a.lane;var h=a.eventTime;if((r&l)===l){null!==p&&(p=p.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var f=e,g=a;switch(l=t,h=n,g.tag){case 1:if("function"===typeof(f=g.payload)){d=f.call(h,d,l);break e}d=f;break e;case 3:f.flags=-4097&f.flags|64;case 0:if(null===(l="function"===typeof(f=g.payload)?f.call(h,d,l):f)||void 0===l)break e;d=o({},d,l);break e;case 2:li=!0}}null!==a.callback&&(e.flags|=32,null===(l=i.effects)?i.effects=[a]:l.push(a))}else h={eventTime:h,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===p?(u=p=h,c=d):p=p.next=h,s|=l;if(null===(a=a.next)){if(null===(l=i.shared.pending))break;a=l.next,l.next=null,i.lastBaseUpdate=l,i.shared.pending=null}}null===p&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=p,Vs|=s,e.lanes=s,e.memoizedState=d}}function gi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var vi=(new r.Component).refs;function mi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yi={isMounted:function(e){return!!(e=e._reactInternals)&&$e(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=dl(),o=hl(e),i=pi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),fl(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=dl(),o=hl(e),i=pi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),fl(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=dl(),r=hl(e),o=pi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),di(e,o),fl(e,r,n)}};function bi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(o,i))}function wi(e,t,n){var r=!1,o=ho,i=t.contextType;return"object"===typeof i&&null!==i?i=si(i):(o=yo(t)?vo:fo.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?mo(e,o):ho),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ci(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yi.enqueueReplaceState(t,t.state,null)}function xi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=vi,ci(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=si(i):(i=yo(t)?vo:fo.current,o.context=mo(e,i)),fi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(mi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&yi.enqueueReplaceState(o,o.state,null),fi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var Si=Array.isArray;function Ei(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===vi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function _i(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Ri(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Yl(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=$l(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Ei(e,t,n),r.return=e,r):((r=Xl(n.type,n.key,n.props,null,e.mode,r)).ref=Ei(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ql(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function p(e,t,n,r,i){return null===t||7!==t.tag?((t=ql(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=$l(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Xl(t.type,t.key,t.props,null,e.mode,n)).ref=Ei(e,null,t),n.return=e,n;case S:return(t=Ql(t,e.mode,n)).return=e,t}if(Si(t)||j(t))return(t=ql(t,e.mode,n,null)).return=e,t;_i(e,t)}return null}function h(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?n.type===E?p(e,t,n.props.children,r,o):c(e,t,n,r):null;case S:return n.key===o?u(e,t,n,r):null}if(Si(n)||j(n))return null!==o?null:p(e,t,n,r,null);_i(e,n)}return null}function f(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return e=e.get(null===r.key?n:r.key)||null,r.type===E?p(t,e,r.props.children,o,r.key):c(t,e,r,o);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Si(r)||j(r))return p(t,e=e.get(n)||null,r,o,null);_i(t,r)}return null}function g(o,a,s,l){for(var c=null,u=null,p=a,g=a=0,v=null;null!==p&&g<s.length;g++){p.index>g?(v=p,p=null):v=p.sibling;var m=h(o,p,s[g],l);if(null===m){null===p&&(p=v);break}e&&p&&null===m.alternate&&t(o,p),a=i(m,a,g),null===u?c=m:u.sibling=m,u=m,p=v}if(g===s.length)return n(o,p),c;if(null===p){for(;g<s.length;g++)null!==(p=d(o,s[g],l))&&(a=i(p,a,g),null===u?c=p:u.sibling=p,u=p);return c}for(p=r(o,p);g<s.length;g++)null!==(v=f(p,o,g,s[g],l))&&(e&&null!==v.alternate&&p.delete(null===v.key?g:v.key),a=i(v,a,g),null===u?c=v:u.sibling=v,u=v);return e&&p.forEach((function(e){return t(o,e)})),c}function v(o,s,l,c){var u=j(l);if("function"!==typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var p=u=null,g=s,v=s=0,m=null,y=l.next();null!==g&&!y.done;v++,y=l.next()){g.index>v?(m=g,g=null):m=g.sibling;var b=h(o,g,y.value,c);if(null===b){null===g&&(g=m);break}e&&g&&null===b.alternate&&t(o,g),s=i(b,s,v),null===p?u=b:p.sibling=b,p=b,g=m}if(y.done)return n(o,g),u;if(null===g){for(;!y.done;v++,y=l.next())null!==(y=d(o,y.value,c))&&(s=i(y,s,v),null===p?u=y:p.sibling=y,p=y);return u}for(g=r(o,g);!y.done;v++,y=l.next())null!==(y=f(g,o,v,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?v:y.key),s=i(y,s,v),null===p?u=y:p.sibling=y,p=y);return e&&g.forEach((function(e){return t(o,e)})),u}return function(e,r,i,l){var c="object"===typeof i&&null!==i&&i.type===E&&null===i.key;c&&(i=i.props.children);var u="object"===typeof i&&null!==i;if(u)switch(i.$$typeof){case x:e:{for(u=i.key,c=r;null!==c;){if(c.key===u){if(7===c.tag){if(i.type===E){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Ei(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===E?((r=ql(i.props.children,e.mode,l,i.key)).return=e,e=r):((l=Xl(i.type,i.key,i.props,null,e.mode,l)).ref=Ei(e,r,i),l.return=e,e=l)}return s(e);case S:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ql(i,e.mode,l)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=$l(i,e.mode,l)).return=e,e=r),s(e);if(Si(i))return g(e,r,i,l);if(j(i))return v(e,r,i,l);if(u&&_i(e,i),"undefined"===typeof i&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,X(e.type)||"Component"))}return n(e,r)}}var Oi=Ri(!0),Ai=Ri(!1),Pi={},Ti=co(Pi),Di=co(Pi),ki=co(Pi);function Ni(e){if(e===Pi)throw Error(a(174));return e}function Mi(e,t){switch(po(ki,t),po(Di,e),po(Ti,Pi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fe(null,"");break;default:t=fe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}uo(Ti),po(Ti,t)}function Ii(){uo(Ti),uo(Di),uo(ki)}function Li(e){Ni(ki.current);var t=Ni(Ti.current),n=fe(t,e.type);t!==n&&(po(Di,e),po(Ti,n))}function Fi(e){Di.current===e&&(uo(Ti),uo(Di))}var Gi=co(0);function Hi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wi=null,Vi=null,ji=!1;function Bi(e,t){var n=zl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function zi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ui(e){if(ji){var t=Vi;if(t){var n=t;if(!zi(e,t)){if(!(t=qr(n.nextSibling))||!zi(e,t))return e.flags=-1025&e.flags|2,ji=!1,void(Wi=e);Bi(Wi,n)}Wi=e,Vi=qr(t.firstChild)}else e.flags=-1025&e.flags|2,ji=!1,Wi=e}}function Yi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Wi=e}function Xi(e){if(e!==Wi)return!1;if(!ji)return Yi(e),ji=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!zr(t,e.memoizedProps))for(t=Vi;t;)Bi(e,t),t=qr(t.nextSibling);if(Yi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Vi=qr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Vi=null}}else Vi=Wi?qr(e.stateNode.nextSibling):null;return!0}function qi(){Vi=Wi=null,ji=!1}var Ki=[];function $i(){for(var e=0;e<Ki.length;e++)Ki[e]._workInProgressVersionPrimary=null;Ki.length=0}var Qi=C.ReactCurrentDispatcher,Zi=C.ReactCurrentBatchConfig,Ji=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,o,i){if(Ji=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qi.current=null===e||null===e.memoizedState?Na:Ma,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Qi.current=Ia,e=n(r,o)}while(oa)}if(Qi.current=ka,t=null!==ta&&null!==ta.next,Ji=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ca(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function ua(e,t){return"function"===typeof t?t(e):t}function pa(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var l=s=i=null,c=o;do{var u=c.lane;if((Ji&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var p={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=p,i=r):l=l.next=p,ea.lanes|=u,Vs|=u}c=c.next}while(null!==c&&c!==o);null===l?i=r:l.next=s,ur(r,t.memoizedState)||(Fa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);ur(i,t.memoizedState)||(Fa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ha(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Ji&e)===e)&&(t._workInProgressVersionPrimary=r,Ki.push(t))),e)return n(t._source);throw Ki.push(t),Error(a(350))}function fa(e,t,n,r){var o=Ns;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),l=Qi.current,c=l.useState((function(){return ha(o,t,n)})),u=c[1],p=c[0];c=na;var d=e.memoizedState,h=d.refs,f=h.getSnapshot,g=d.source;d=d.subscribe;var v=ea;return e.memoizedState={refs:h,source:t,subscribe:r},l.useEffect((function(){h.getSnapshot=n,h.setSnapshot=u;var e=i(t._source);if(!ur(s,e)){e=n(t._source),ur(p,e)||(u(e),e=hl(v),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var l=31-zt(a),c=1<<l;r[l]|=e,a&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=h.getSnapshot,n=h.setSnapshot;try{n(e(t._source));var r=hl(v);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),ur(f,n)&&ur(g,t)&&ur(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ua,lastRenderedState:p}).dispatch=u=Da.bind(null,ea,e),c.queue=e,c.baseQueue=null,p=ha(o,t,n),c.memoizedState=c.baseState=p),p}function ga(e,t,n){return fa(ca(),e,t,n)}function va(e){var t=la();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ua,lastRenderedState:e}).dispatch=Da.bind(null,ea,e),[t.memoizedState,e]}function ma(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ya(e){return e={current:e},la().memoizedState=e}function ba(){return ca().memoizedState}function wa(e,t,n,r){var o=la();ea.flags|=e,o.memoizedState=ma(1|t,n,void 0,void 0===r?null:r)}function Ca(e,t,n,r){var o=ca();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void ma(t,n,i,r)}ea.flags|=e,o.memoizedState=ma(1|t,n,i,r)}function xa(e,t){return wa(516,4,e,t)}function Sa(e,t){return Ca(516,4,e,t)}function Ea(e,t){return Ca(4,2,e,t)}function _a(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ra(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ca(4,2,_a.bind(null,t,e),n)}function Oa(){}function Aa(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Pa(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ta(e,t){var n=Uo();Xo(98>n?98:n,(function(){e(!0)})),Xo(97<n?97:n,(function(){var n=Zi.transition;Zi.transition=1;try{e(!1),t()}finally{Zi.transition=n}}))}function Da(e,t,n){var r=dl(),o=hl(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(i.eagerReducer=a,i.eagerState=l,ur(l,s))return}catch(c){}fl(e,o,r)}}var ka={readContext:si,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Na={readContext:si,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:si,useEffect:xa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,_a.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wa(4,2,e,t)},useMemo:function(e,t){var n=la();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=la();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Da.bind(null,ea,e),[r.memoizedState,e]},useRef:ya,useState:va,useDebugValue:Oa,useDeferredValue:function(e){var t=va(e),n=t[0],r=t[1];return xa((function(){var t=Zi.transition;Zi.transition=1;try{r(e)}finally{Zi.transition=t}}),[e]),n},useTransition:function(){var e=va(!1),t=e[0];return ya(e=Ta.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=la();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},fa(r,e,t,n)},useOpaqueIdentifier:function(){if(ji){var e=!1,t=function(e){return{$$typeof:I,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+($r++).toString(36))),Error(a(355))})),n=va(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ma(5,(function(){n("r:"+($r++).toString(36))}),void 0,null)),t}return va(t="r:"+($r++).toString(36)),t},unstable_isNewReconciler:!1},Ma={readContext:si,useCallback:Aa,useContext:si,useEffect:Sa,useImperativeHandle:Ra,useLayoutEffect:Ea,useMemo:Pa,useReducer:pa,useRef:ba,useState:function(){return pa(ua)},useDebugValue:Oa,useDeferredValue:function(e){var t=pa(ua),n=t[0],r=t[1];return Sa((function(){var t=Zi.transition;Zi.transition=1;try{r(e)}finally{Zi.transition=t}}),[e]),n},useTransition:function(){var e=pa(ua)[0];return[ba().current,e]},useMutableSource:ga,useOpaqueIdentifier:function(){return pa(ua)[0]},unstable_isNewReconciler:!1},Ia={readContext:si,useCallback:Aa,useContext:si,useEffect:Sa,useImperativeHandle:Ra,useLayoutEffect:Ea,useMemo:Pa,useReducer:da,useRef:ba,useState:function(){return da(ua)},useDebugValue:Oa,useDeferredValue:function(e){var t=da(ua),n=t[0],r=t[1];return Sa((function(){var t=Zi.transition;Zi.transition=1;try{r(e)}finally{Zi.transition=t}}),[e]),n},useTransition:function(){var e=da(ua)[0];return[ba().current,e]},useMutableSource:ga,useOpaqueIdentifier:function(){return da(ua)[0]},unstable_isNewReconciler:!1},La=C.ReactCurrentOwner,Fa=!1;function Ga(e,t,n,r){t.child=null===e?Ai(t,null,n,r):Oi(t,e.child,n,r)}function Ha(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=sa(e,t,n,r,i,o),null===e||Fa?(t.flags|=1,Ga(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function Wa(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||Ul(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Xl(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Va(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(o,r)&&e.ref===t.ref)?is(e,t,i):(t.flags|=1,(e=Yl(a,r)).ref=t.ref,e.return=t,t.child=e)}function Va(e,t,n,r,o,i){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Fa=!1,0===(i&o))return t.lanes=e.lanes,is(e,t,i);0!==(16384&e.flags)&&(Fa=!0)}return za(e,t,n,r,i)}function ja(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},xl(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},xl(t,e),null;t.memoizedState={baseLanes:0},xl(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,xl(t,r);return Ga(e,t,o,n),t.child}function Ba(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function za(e,t,n,r,o){var i=yo(n)?vo:fo.current;return i=mo(t,i),ai(t,o),n=sa(e,t,n,r,i,o),null===e||Fa?(t.flags|=1,Ga(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function Ua(e,t,n,r,o){if(yo(n)){var i=!0;xo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),wi(t,n,r),xi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=si(c):c=mo(t,c=yo(n)?vo:fo.current);var u=n.getDerivedStateFromProps,p="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;p||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&Ci(t,a,r,c),li=!1;var d=t.memoizedState;a.state=d,fi(t,r,a,o),l=t.memoizedState,s!==r||d!==l||go.current||li?("function"===typeof u&&(mi(t,n,u,r),l=t.memoizedState),(s=li||bi(t,n,s,r,d,l,c))?(p||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,ui(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Zo(t.type,s),a.props=c,p=t.pendingProps,d=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=si(l):l=mo(t,l=yo(n)?vo:fo.current);var h=n.getDerivedStateFromProps;(u="function"===typeof h||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==p||d!==l)&&Ci(t,a,r,l),li=!1,d=t.memoizedState,a.state=d,fi(t,r,a,o);var f=t.memoizedState;s!==p||d!==f||go.current||li?("function"===typeof h&&(mi(t,n,h,r),f=t.memoizedState),(c=li||bi(t,n,c,r,d,f,l))?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Ya(e,t,n,r,i,o)}function Ya(e,t,n,r,o,i){Ba(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&So(t,n,!1),is(e,t,i);r=t.stateNode,La.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Oi(t,e.child,null,i),t.child=Oi(t,null,s,i)):Ga(e,t,s,i),t.memoizedState=r.state,o&&So(t,n,!0),t.child}function Xa(e){var t=e.stateNode;t.pendingContext?wo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&wo(0,t.context,!1),Mi(e,t.containerInfo)}var qa,Ka,$a,Qa={dehydrated:null,retryLane:0};function Za(e,t,n){var r,o=t.pendingProps,i=Gi.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),po(Gi,1&i),null===e?(void 0!==o.fallback&&Ui(t),e=o.children,i=o.fallback,a?(e=Ja(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,e):"number"===typeof o.unstable_expectedLoadTime?(e=Ja(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,t.lanes=33554432,e):((n=Kl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=ts(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Qa,o):(n=es(e,t,o.children,n),t.memoizedState=null,n))}function Ja(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=Kl(t,o,0,null),n=ql(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function es(e,t,n,r){var o=e.child;return e=o.sibling,n=Yl(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Yl(a,s),null!==e?r=Yl(e,r):(r=ql(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function rs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function os(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ga(e,t,r.children,n),0!==(2&(r=Gi.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(po(Gi,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Hi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Hi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,i,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function is(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Vs|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Yl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Yl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!ji)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return yo(t.type)&&bo(),null;case 3:return Ii(),uo(go),uo(fo),$i(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Xi(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Fi(t);var i=Ni(ki.current);if(n=t.type,null!==e&&null!=t.stateNode)Ka(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ni(Ti.current),Xi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Zr]=t,r[Jr]=s,n){case"dialog":Tr("cancel",r),Tr("close",r);break;case"iframe":case"object":case"embed":Tr("load",r);break;case"video":case"audio":for(e=0;e<Rr.length;e++)Tr(Rr[e],r);break;case"source":Tr("error",r);break;case"img":case"image":case"link":Tr("error",r),Tr("load",r);break;case"details":Tr("toggle",r);break;case"input":ee(r,s),Tr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Tr("invalid",r);break;case"textarea":le(r,s),Tr("invalid",r)}for(var c in Ee(n,s),e=null,s)s.hasOwnProperty(c)&&(i=s[c],"children"===c?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):l.hasOwnProperty(c)&&null!=i&&"onScroll"===c&&Tr("scroll",r));switch(n){case"input":$(r),re(r,s,!0);break;case"textarea":$(r),ue(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Wr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===i.nodeType?i:i.ownerDocument,e===pe&&(e=he(n)),e===pe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Zr]=t,e[Jr]=r,qa(e,t),t.stateNode=e,c=_e(n,r),n){case"dialog":Tr("cancel",e),Tr("close",e),i=r;break;case"iframe":case"object":case"embed":Tr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Rr.length;i++)Tr(Rr[i],e);i=r;break;case"source":Tr("error",e),i=r;break;case"img":case"image":case"link":Tr("error",e),Tr("load",e),i=r;break;case"details":Tr("toggle",e),i=r;break;case"input":ee(e,r),i=J(e,r),Tr("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Tr("invalid",e);break;case"textarea":le(e,r),i=se(e,r),Tr("invalid",e);break;default:i=r}Ee(n,i);var u=i;for(s in u)if(u.hasOwnProperty(s)){var p=u[s];"style"===s?xe(e,p):"dangerouslySetInnerHTML"===s?null!=(p=p?p.__html:void 0)&&me(e,p):"children"===s?"string"===typeof p?("textarea"!==n||""!==p)&&ye(e,p):"number"===typeof p&&ye(e,""+p):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(l.hasOwnProperty(s)?null!=p&&"onScroll"===s&&Tr("scroll",e):null!=p&&w(e,s,p,c))}switch(n){case"input":$(e),re(e,r,!1);break;case"textarea":$(e),ue(e);break;case"option":null!=r.value&&e.setAttribute("value",""+q(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Wr)}Br(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)$a(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Ni(ki.current),Ni(Ti.current),Xi(t)?(r=t.stateNode,n=t.memoizedProps,r[Zr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Zr]=t,t.stateNode=r)}return null;case 13:return uo(Gi),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Xi(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Gi.current)?0===Gs&&(Gs=3):(0!==Gs&&3!==Gs||(Gs=4),null===Ns||0===(134217727&Vs)&&0===(134217727&js)||yl(Ns,Is))),(r||n)&&(t.flags|=4),null);case 4:return Ii(),null===e&&kr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(uo(Gi),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(c=r.rendering))if(s)as(r,!1);else{if(0!==Gs||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Hi(e))){for(t.flags|=64,as(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return po(Gi,1&Gi.current|2),t.child}e=e.sibling}null!==r.tail&&zo()>Ys&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Hi(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!ji)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*zo()-r.renderingStartTime>Ys&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=zo(),n.sibling=null,t=Gi.current,po(Gi,s?1&t|2:1&t),n):null;case 23:case 24:return Sl(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function ls(e){switch(e.tag){case 1:yo(e.type)&&bo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ii(),uo(go),uo(fo),$i(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Fi(e),null;case 13:return uo(Gi),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return uo(Gi),null;case 4:return Ii(),null;case 10:return oi(e),null;case 23:case 24:return Sl(),null;default:return null}}function cs(e,t){try{var n="",r=t;do{n+=Y(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function us(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}qa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ka=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ni(Ti.current);var a,s=null;switch(n){case"input":i=J(e,i),r=J(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Wr)}for(p in Ee(n,r),n=null,i)if(!r.hasOwnProperty(p)&&i.hasOwnProperty(p)&&null!=i[p])if("style"===p){var c=i[p];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==p&&"children"!==p&&"suppressContentEditableWarning"!==p&&"suppressHydrationWarning"!==p&&"autoFocus"!==p&&(l.hasOwnProperty(p)?s||(s=[]):(s=s||[]).push(p,null));for(p in r){var u=r[p];if(c=null!=i?i[p]:void 0,r.hasOwnProperty(p)&&u!==c&&(null!=u||null!=c))if("style"===p)if(c){for(a in c)!c.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&c[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(p,n)),n=u;else"dangerouslySetInnerHTML"===p?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(s=s||[]).push(p,u)):"children"===p?"string"!==typeof u&&"number"!==typeof u||(s=s||[]).push(p,""+u):"suppressContentEditableWarning"!==p&&"suppressHydrationWarning"!==p&&(l.hasOwnProperty(p)?(null!=u&&"onScroll"===p&&Tr("scroll",e),s||c===u||(s=[])):"object"===typeof u&&null!==u&&u.$$typeof===I?u.toString():(s=s||[]).push(p,u))}n&&(s=s||[]).push("style",n);var p=s;(t.updateQueue=p)&&(t.flags|=4)}},$a=function(e,t,n,r){n!==r&&(t.flags|=4)};var ps="function"===typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=pi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$s||($s=!0,Qs=r),us(0,t)},n}function hs(e,t,n){(n=pi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return us(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Zs?Zs=new Set([this]):Zs.add(this),us(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var fs="function"===typeof WeakSet?WeakSet:Set;function gs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Wl(e,n)}else t.current=null}function vs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Zo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Xr(t.stateNode.containerInfo))}throw Error(a(163))}function ms(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(Fl(n,e),Ll(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Zo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&gi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}gi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Br(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function ys(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=Ce("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(_o&&"function"===typeof _o.onCommitFiberUnmount)try{_o.onCommitFiberUnmount(Eo,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))Fl(t,n);else{r=t;try{o()}catch(i){Wl(r,i)}}n=n.next}while(n!==e)}break;case 1:if(gs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Wl(t,i)}break;case 5:gs(t);break;case 4:_s(e,t)}}function ws(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Cs(e){return 5===e.tag||3===e.tag||4===e.tag}function xs(e){e:{for(var t=e.return;null!==t;){if(Cs(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Cs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Ss(e,n,t):Es(e,n,t)}function Ss(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Wr));else if(4!==r&&null!==(e=e.child))for(Ss(e,t,n),e=e.sibling;null!==e;)Ss(e,t,n),e=e.sibling}function Es(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Es(e,t,n),e=e.sibling;null!==e;)Es(e,t,n),e=e.sibling}function _s(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,l=o,c=l;;)if(bs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,l=o.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(bs(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function Rs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Jr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),_e(e,o),t=_e(e,r),o=0;o<i.length;o+=2){var s=i[o],l=i[o+1];"style"===s?xe(n,l):"dangerouslySetInnerHTML"===s?me(n,l):"children"===s?ye(n,l):w(n,s,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Us=zo(),ys(t.child,!0)),void Os(t);case 19:return void Os(t);case 23:case 24:return void ys(t,null!==t.memoizedState)}throw Error(a(163))}function Os(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new fs),t.forEach((function(t){var r=jl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function As(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ps=Math.ceil,Ts=C.ReactCurrentDispatcher,Ds=C.ReactCurrentOwner,ks=0,Ns=null,Ms=null,Is=0,Ls=0,Fs=co(0),Gs=0,Hs=null,Ws=0,Vs=0,js=0,Bs=0,zs=null,Us=0,Ys=1/0;function Xs(){Ys=zo()+500}var qs,Ks=null,$s=!1,Qs=null,Zs=null,Js=!1,el=null,tl=90,nl=[],rl=[],ol=null,il=0,al=null,sl=-1,ll=0,cl=0,ul=null,pl=!1;function dl(){return 0!==(48&ks)?zo():-1!==sl?sl:sl=zo()}function hl(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Uo()?1:2;if(0===ll&&(ll=Ws),0!==Qo.transition){0!==cl&&(cl=null!==zs?zs.pendingLanes:0),e=ll;var t=4186112&~cl;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Uo(),0!==(4&ks)&&98===e?e=Wt(12,ll):e=Wt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ll),e}function fl(e,t,n){if(50<il)throw il=0,al=null,Error(a(185));if(null===(e=gl(e,t)))return null;Bt(e,t,n),e===Ns&&(js|=t,4===Gs&&yl(e,Is));var r=Uo();1===t?0!==(8&ks)&&0===(48&ks)?bl(e):(vl(e,n),0===ks&&(Xs(),Ko())):(0===(4&ks)||98!==r&&99!==r||(null===ol?ol=new Set([e]):ol.add(e)),vl(e,n)),zs=e}function gl(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function vl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-zt(s),c=1<<l,u=i[l];if(-1===u){if(0===(c&r)||0!==(c&o)){u=t,Ft(c);var p=Lt;i[l]=10<=p?u+250:6<=p?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);s&=~c}if(r=Gt(e,e===Ns?Is:0),t=Lt,0===r)null!==n&&(n!==Go&&Ao(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Go&&Ao(n)}15===t?(n=bl.bind(null,e),null===Wo?(Wo=[n],Vo=Oo(No,$o)):Wo.push(n),n=Go):14===t?n=qo(99,bl.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=qo(n,ml.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function ml(e){if(sl=-1,cl=ll=0,0!==(48&ks))throw Error(a(327));var t=e.callbackNode;if(Il()&&e.callbackNode!==t)return null;var n=Gt(e,e===Ns?Is:0);if(0===n)return null;var r=n,o=ks;ks|=16;var i=Rl();for(Ns===e&&Is===r||(Xs(),El(e,r));;)try{Pl();break}catch(l){_l(e,l)}if(ri(),Ts.current=i,ks=o,null!==Ms?r=0:(Ns=null,Is=0,r=Gs),0!==(Ws&js))El(e,0);else if(0!==r){if(2===r&&(ks|=64,e.hydrate&&(e.hydrate=!1,Xr(e.containerInfo)),0!==(n=Ht(e))&&(r=Ol(e,n))),1===r)throw t=Hs,El(e,0),yl(e,n),vl(e,zo()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:kl(e);break;case 3:if(yl(e,n),(62914560&n)===n&&10<(r=Us+500-zo())){if(0!==Gt(e,0))break;if(((o=e.suspendedLanes)&n)!==n){dl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ur(kl.bind(null,e),r);break}kl(e);break;case 4:if(yl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-zt(n);i=1<<s,(s=r[s])>o&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=zo()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ps(n/1960))-n)){e.timeoutHandle=Ur(kl.bind(null,e),n);break}kl(e);break;default:throw Error(a(329))}}return vl(e,zo()),e.callbackNode===t?ml.bind(null,e):null}function yl(e,t){for(t&=~Bs,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-zt(t),r=1<<n;e[n]=-1,t&=~r}}function bl(e){if(0!==(48&ks))throw Error(a(327));if(Il(),e===Ns&&0!==(e.expiredLanes&Is)){var t=Is,n=Ol(e,t);0!==(Ws&js)&&(n=Ol(e,t=Gt(e,t)))}else n=Ol(e,t=Gt(e,0));if(0!==e.tag&&2===n&&(ks|=64,e.hydrate&&(e.hydrate=!1,Xr(e.containerInfo)),0!==(t=Ht(e))&&(n=Ol(e,t))),1===n)throw n=Hs,El(e,0),yl(e,t),vl(e,zo()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,kl(e),vl(e,zo()),null}function wl(e,t){var n=ks;ks|=1;try{return e(t)}finally{0===(ks=n)&&(Xs(),Ko())}}function Cl(e,t){var n=ks;ks&=-2,ks|=8;try{return e(t)}finally{0===(ks=n)&&(Xs(),Ko())}}function xl(e,t){po(Fs,Ls),Ls|=t,Ws|=t}function Sl(){Ls=Fs.current,uo(Fs)}function El(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Yr(n)),null!==Ms)for(n=Ms.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&bo();break;case 3:Ii(),uo(go),uo(fo),$i();break;case 5:Fi(r);break;case 4:Ii();break;case 13:case 19:uo(Gi);break;case 10:oi(r);break;case 23:case 24:Sl()}n=n.return}Ns=e,Ms=Yl(e.current,null),Is=Ls=Ws=t,Gs=0,Hs=null,Bs=js=Vs=0}function _l(e,t){for(;;){var n=Ms;try{if(ri(),Qi.current=ka,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Ji=0,na=ta=ea=null,oa=!1,Ds.current=null,null===n||null===n.return){Gs=1,Hs=t,Ms=null;break}e:{var i=e,a=n.return,s=n,l=t;if(t=Is,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=l;if(0===(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var p=0!==(1&Gi.current),d=a;do{var h;if(h=13===d.tag){var f=d.memoizedState;if(null!==f)h=null!==f.dehydrated;else{var g=d.memoizedProps;h=void 0!==g.fallback&&(!0!==g.unstable_avoidThisFallback||!p)}}if(h){var v=d.updateQueue;if(null===v){var m=new Set;m.add(c),d.updateQueue=m}else v.add(c);if(0===(2&d.mode)){if(d.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=pi(-1,1);y.tag=2,di(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new ps,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(s)){l.add(s);var w=Vl.bind(null,i,c,s);c.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);l=Error((X(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Gs&&(Gs=2),l=cs(l,s),d=a;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t,hi(d,ds(0,i,t));break e;case 1:i=l;var C=d.type,x=d.stateNode;if(0===(64&d.flags)&&("function"===typeof C.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Zs||!Zs.has(x)))){d.flags|=4096,t&=-t,d.lanes|=t,hi(d,hs(d,i,t));break e}}d=d.return}while(null!==d)}Dl(n)}catch(S){t=S,Ms===n&&null!==n&&(Ms=n=n.return);continue}break}}function Rl(){var e=Ts.current;return Ts.current=ka,null===e?ka:e}function Ol(e,t){var n=ks;ks|=16;var r=Rl();for(Ns===e&&Is===t||El(e,t);;)try{Al();break}catch(o){_l(e,o)}if(ri(),ks=n,Ts.current=r,null!==Ms)throw Error(a(261));return Ns=null,Is=0,Gs}function Al(){for(;null!==Ms;)Tl(Ms)}function Pl(){for(;null!==Ms&&!Po();)Tl(Ms)}function Tl(e){var t=qs(e.alternate,e,Ls);e.memoizedProps=e.pendingProps,null===t?Dl(e):Ms=t,Ds.current=null}function Dl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Ls)))return void(Ms=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Ls)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ls(t)))return n.flags&=2047,void(Ms=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ms=t);Ms=t=e}while(null!==t);0===Gs&&(Gs=5)}function kl(e){var t=Uo();return Xo(99,Nl.bind(null,e,t)),null}function Nl(e,t){do{Il()}while(null!==el);if(0!==(48&ks))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<i;){var c=31-zt(i),u=1<<c;o[c]=0,s[c]=-1,l[c]=-1,i&=~u}if(null!==ol&&0===(24&r)&&ol.has(e)&&ol.delete(e),e===Ns&&(Ms=Ns=null,Is=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=ks,ks|=32,Ds.current=null,Vr=Kt,mr(s=vr())){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(u=l.getSelection&&l.getSelection())&&0!==u.rangeCount){l=u.anchorNode,i=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{l.nodeType,c.nodeType}catch(R){l=null;break e}var p=0,d=-1,h=-1,f=0,g=0,v=s,m=null;t:for(;;){for(var y;v!==l||0!==i&&3!==v.nodeType||(d=p+i),v!==c||0!==u&&3!==v.nodeType||(h=p+u),3===v.nodeType&&(p+=v.nodeValue.length),null!==(y=v.firstChild);)m=v,v=y;for(;;){if(v===s)break t;if(m===l&&++f===i&&(d=p),m===c&&++g===u&&(h=p),null!==(y=v.nextSibling))break;m=(v=m).parentNode}v=y}l=-1===d||-1===h?null:{start:d,end:h}}else l=null;l=l||{start:0,end:0}}else l=null;jr={focusedElem:s,selectionRange:l},Kt=!1,ul=null,pl=!1,Ks=r;do{try{Ml()}catch(R){if(null===Ks)throw Error(a(330));Wl(Ks,R),Ks=Ks.nextEffect}}while(null!==Ks);ul=null,Ks=r;do{try{for(s=e;null!==Ks;){var b=Ks.flags;if(16&b&&ye(Ks.stateNode,""),128&b){var w=Ks.alternate;if(null!==w){var C=w.ref;null!==C&&("function"===typeof C?C(null):C.current=null)}}switch(1038&b){case 2:xs(Ks),Ks.flags&=-3;break;case 6:xs(Ks),Ks.flags&=-3,Rs(Ks.alternate,Ks);break;case 1024:Ks.flags&=-1025;break;case 1028:Ks.flags&=-1025,Rs(Ks.alternate,Ks);break;case 4:Rs(Ks.alternate,Ks);break;case 8:_s(s,l=Ks);var x=l.alternate;ws(l),null!==x&&ws(x)}Ks=Ks.nextEffect}}catch(R){if(null===Ks)throw Error(a(330));Wl(Ks,R),Ks=Ks.nextEffect}}while(null!==Ks);if(C=jr,w=vr(),b=C.focusedElem,s=C.selectionRange,w!==b&&b&&b.ownerDocument&&gr(b.ownerDocument.documentElement,b)){null!==s&&mr(b)&&(w=s.start,void 0===(C=s.end)&&(C=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(C,b.value.length)):(C=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(C=C.getSelection(),l=b.textContent.length,x=Math.min(s.start,l),s=void 0===s.end?x:Math.min(s.end,l),!C.extend&&x>s&&(l=s,s=x,x=l),l=fr(b,x),i=fr(b,s),l&&i&&(1!==C.rangeCount||C.anchorNode!==l.node||C.anchorOffset!==l.offset||C.focusNode!==i.node||C.focusOffset!==i.offset)&&((w=w.createRange()).setStart(l.node,l.offset),C.removeAllRanges(),x>s?(C.addRange(w),C.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),C.addRange(w))))),w=[];for(C=b;C=C.parentNode;)1===C.nodeType&&w.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(C=w[b]).element.scrollLeft=C.left,C.element.scrollTop=C.top}Kt=!!Vr,jr=Vr=null,e.current=n,Ks=r;do{try{for(b=e;null!==Ks;){var S=Ks.flags;if(36&S&&ms(b,Ks.alternate,Ks),128&S){w=void 0;var E=Ks.ref;if(null!==E){var _=Ks.stateNode;Ks.tag,w=_,"function"===typeof E?E(w):E.current=w}}Ks=Ks.nextEffect}}catch(R){if(null===Ks)throw Error(a(330));Wl(Ks,R),Ks=Ks.nextEffect}}while(null!==Ks);Ks=null,Ho(),ks=o}else e.current=n;if(Js)Js=!1,el=e,tl=t;else for(Ks=r;null!==Ks;)t=Ks.nextEffect,Ks.nextEffect=null,8&Ks.flags&&((S=Ks).sibling=null,S.stateNode=null),Ks=t;if(0===(r=e.pendingLanes)&&(Zs=null),1===r?e===al?il++:(il=0,al=e):il=0,n=n.stateNode,_o&&"function"===typeof _o.onCommitFiberRoot)try{_o.onCommitFiberRoot(Eo,n,void 0,64===(64&n.current.flags))}catch(R){}if(vl(e,zo()),$s)throw $s=!1,e=Qs,Qs=null,e;return 0!==(8&ks)||Ko(),null}function Ml(){for(;null!==Ks;){var e=Ks.alternate;pl||null===ul||(0!==(8&Ks.flags)?et(Ks,ul)&&(pl=!0):13===Ks.tag&&As(e,Ks)&&et(Ks,ul)&&(pl=!0));var t=Ks.flags;0!==(256&t)&&vs(e,Ks),0===(512&t)||Js||(Js=!0,qo(97,(function(){return Il(),null}))),Ks=Ks.nextEffect}}function Il(){if(90!==tl){var e=97<tl?97:tl;return tl=90,Xo(e,Gl)}return!1}function Ll(e,t){nl.push(t,e),Js||(Js=!0,qo(97,(function(){return Il(),null})))}function Fl(e,t){rl.push(t,e),Js||(Js=!0,qo(97,(function(){return Il(),null})))}function Gl(){if(null===el)return!1;var e=el;if(el=null,0!==(48&ks))throw Error(a(331));var t=ks;ks|=32;var n=rl;rl=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===i)throw Error(a(330));Wl(i,c)}}for(n=nl,nl=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var l=o.create;o.destroy=l()}catch(c){if(null===i)throw Error(a(330));Wl(i,c)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return ks=t,Ko(),!0}function Hl(e,t,n){di(e,t=ds(0,t=cs(n,t),1)),t=dl(),null!==(e=gl(e,1))&&(Bt(e,1,t),vl(e,t))}function Wl(e,t){if(3===e.tag)Hl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Hl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Zs||!Zs.has(r))){var o=hs(n,e=cs(t,e),1);if(di(n,o),o=dl(),null!==(n=gl(n,1)))Bt(n,1,o),vl(n,o);else if("function"===typeof r.componentDidCatch&&(null===Zs||!Zs.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function Vl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=dl(),e.pingedLanes|=e.suspendedLanes&n,Ns===e&&(Is&n)===n&&(4===Gs||3===Gs&&(62914560&Is)===Is&&500>zo()-Us?El(e,0):Bs|=n),vl(e,t)}function jl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Uo()?1:2:(0===ll&&(ll=Ws),0===(t=Vt(62914560&~ll))&&(t=4194304))),n=dl(),null!==(e=gl(e,t))&&(Bt(e,t,n),vl(e,n))}function Bl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function zl(e,t,n,r){return new Bl(e,t,n,r)}function Ul(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Yl(e,t){var n=e.alternate;return null===n?((n=zl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xl(e,t,n,r,o,i){var s=2;if(r=e,"function"===typeof e)Ul(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case E:return ql(n.children,o,i,t);case L:s=8,o|=16;break;case _:s=8,o|=1;break;case R:return(e=zl(12,n,t,8|o)).elementType=R,e.type=R,e.lanes=i,e;case T:return(e=zl(13,n,t,o)).type=T,e.elementType=T,e.lanes=i,e;case D:return(e=zl(19,n,t,o)).elementType=D,e.lanes=i,e;case F:return Kl(n,o,i,t);case G:return(e=zl(24,n,t,o)).elementType=G,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case O:s=10;break e;case A:s=9;break e;case P:s=11;break e;case k:s=14;break e;case N:s=16,r=null;break e;case M:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=zl(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function ql(e,t,n,r){return(e=zl(7,e,r,t)).lanes=n,e}function Kl(e,t,n,r){return(e=zl(23,e,r,t)).elementType=F,e.lanes=n,e}function $l(e,t,n){return(e=zl(6,e,null,t)).lanes=n,e}function Ql(e,t,n){return(t=zl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=jt(0),this.expirationTimes=jt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jt(0),this.mutableSourceEagerHydrationData=null}function Jl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function ec(e,t,n,r){var o=t.current,i=dl(),s=hl(o);e:if(n){t:{if($e(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(yo(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(yo(c)){n=Co(n,c,l);break e}}n=l}else n=ho;return null===t.context?t.context=n:t.pendingContext=n,(t=pi(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),di(o,t),fl(o,s,i),s}function tc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rc(e,t){nc(e,t),(e=e.alternate)&&nc(e,t)}function oc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Zl(e,t,null!=n&&!0===n.hydrate),t=zl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ci(t),e[eo]=n.current,kr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function ic(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ac(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var s=o;o=function(){var e=tc(a);s.call(e)}}ec(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new oc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var l=o;o=function(){var e=tc(a);l.call(e)}}Cl((function(){ec(t,a,e,o)}))}return tc(a)}function sc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ic(t))throw Error(a(200));return Jl(e,t,null,n)}qs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||go.current)Fa=!0;else{if(0===(n&r)){switch(Fa=!1,t.tag){case 3:Xa(t),qi();break;case 5:Li(t);break;case 1:yo(t.type)&&xo(t);break;case 4:Mi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;po(Jo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Za(e,t,n):(po(Gi,1&Gi.current),null!==(t=is(e,t,n))?t.sibling:null);po(Gi,1&Gi.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return os(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),po(Gi,Gi.current),r)break;return null;case 23:case 24:return t.lanes=0,ja(e,t,n)}return is(e,t,n)}Fa=0!==(16384&e.flags)}else Fa=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=mo(t,fo.current),ai(t,n),o=sa(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,yo(r)){var i=!0;xo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ci(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&mi(t,r,s,e),o.updater=yi,t.stateNode=o,o._reactInternals=t,xi(t,r,e,n),t=Ya(null,t,r,!0,i,n)}else t.tag=0,Ga(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return Ul(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===P)return 11;if(e===k)return 14}return 2}(o),e=Zo(o,e),i){case 0:t=za(null,t,o,e,n);break e;case 1:t=Ua(null,t,o,e,n);break e;case 11:t=Ha(null,t,o,e,n);break e;case 14:t=Wa(null,t,o,Zo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,za(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ua(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 3:if(Xa(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ui(e,t),fi(t,r,null,n),(r=t.memoizedState.element)===o)qi(),t=is(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Vi=qr(t.stateNode.containerInfo.firstChild),Wi=t,i=ji=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],Ki.push(i);for(n=Ai(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Ga(e,t,r,n),qi();t=t.child}return t;case 5:return Li(t),null===e&&Ui(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,zr(r,o)?s=null:null!==i&&zr(r,i)&&(t.flags|=16),Ba(e,t),Ga(e,t,s,n),t.child;case 6:return null===e&&Ui(t),null;case 13:return Za(e,t,n);case 4:return Mi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Oi(t,null,r,n):Ga(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ha(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 7:return Ga(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ga(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var l=t.type._context;if(po(Jo,l._currentValue),l._currentValue=i,null!==s)if(l=s.value,0===(i=ur(l,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823))){if(s.children===o.children&&!go.current){t=is(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!==(u.observedBits&i)){1===l.tag&&((u=pi(-1,n&-n)).tag=2,di(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),ii(l.return,n),c.lanes|=n;break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Ga(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=si(o,i.unstable_observedBits)),t.flags|=1,Ga(e,t,r,n),t.child;case 14:return i=Zo(o=t.type,t.pendingProps),Wa(e,t,o,i=Zo(o.type,i),r,n);case 15:return Va(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,yo(r)?(e=!0,xo(t)):e=!1,ai(t,n),wi(t,r,o),xi(t,r,o,n),Ya(null,t,r,!0,e,n);case 19:return os(e,t,n);case 23:case 24:return ja(e,t,n)}throw Error(a(156,t.tag))},oc.prototype.render=function(e){ec(e,this._internalRoot,null,null)},oc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ec(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(fl(e,4,dl()),rc(e,4))},nt=function(e){13===e.tag&&(fl(e,67108864,dl()),rc(e,67108864))},rt=function(e){if(13===e.tag){var t=dl(),n=hl(e);fl(e,n,t),rc(e,n)}},ot=function(e,t){return t()},Oe=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));Q(r),ne(r,o)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Ne=wl,Me=function(e,t,n,r,o){var i=ks;ks|=4;try{return Xo(98,e.bind(null,t,n,r,o))}finally{0===(ks=i)&&(Xs(),Ko())}},Ie=function(){0===(49&ks)&&(function(){if(null!==ol){var e=ol;ol=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,vl(e,zo())}))}Ko()}(),Il())},Le=function(e,t){var n=ks;ks|=2;try{return e(t)}finally{0===(ks=n)&&(Xs(),Ko())}};var lc={Events:[ro,oo,io,De,ke,Il,{current:!1}]},cc={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},uc={bundleType:cc.bundleType,version:cc.version,rendererPackageName:cc.rendererPackageName,rendererConfig:cc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Je(e))?null:e.stateNode},findFiberByHostInstance:cc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var pc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pc.isDisabled&&pc.supportsFiber)try{Eo=pc.inject(uc),_o=pc}catch(ve){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lc,t.createPortal=sc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Je(t))?null:e.stateNode},t.flushSync=function(e,t){var n=ks;if(0!==(48&n))return e(t);ks|=1;try{if(e)return Xo(99,e.bind(null,t))}finally{ks=n,Ko()}},t.hydrate=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!0,n)},t.render=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ic(e))throw Error(a(40));return!!e._reactRootContainer&&(Cl((function(){ac(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=wl,t.unstable_createPortal=function(e,t){return sc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ic(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ac(e,t,n,!1,r)},t.version="17.0.2"},4164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4463)},8340:function(e,t,n){"use strict";e.exports=n(4424)},77:function(e){"use strict";var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,o="undefined"!==typeof Element;function i(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){var s,l,c,u=t(e),p=t(a);if(u&&p){if((l=e.length)!=a.length)return!1;for(s=l;0!==s--;)if(!i(e[s],a[s]))return!1;return!0}if(u!=p)return!1;var d=e instanceof Date,h=a instanceof Date;if(d!=h)return!1;if(d&&h)return e.getTime()==a.getTime();var f=e instanceof RegExp,g=a instanceof RegExp;if(f!=g)return!1;if(f&&g)return e.toString()==a.toString();var v=n(e);if((l=v.length)!==n(a).length)return!1;for(s=l;0!==s--;)if(!r.call(a,v[s]))return!1;if(o&&e instanceof Element&&a instanceof Element)return e===a;for(s=l;0!==s--;)if(("_owner"!==(c=v[s])||!e.$$typeof)&&!i(e[c],a[c]))return!1;return!0}return e!==e&&a!==a}e.exports=function(e,t){try{return i(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},1372:function(e,t){"use strict";var n=60103,r=60106,o=60107,i=60108,a=60114,s=60109,l=60110,c=60112,u=60113,p=60120,d=60115,h=60116,f=60121,g=60122,v=60117,m=60129,y=60131;if("function"===typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),r=b("react.portal"),o=b("react.fragment"),i=b("react.strict_mode"),a=b("react.profiler"),s=b("react.provider"),l=b("react.context"),c=b("react.forward_ref"),u=b("react.suspense"),p=b("react.suspense_list"),d=b("react.memo"),h=b("react.lazy"),f=b("react.block"),g=b("react.server.block"),v=b("react.fundamental"),m=b("react.debug_trace_mode"),y=b("react.legacy_hidden")}function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case u:case p:return e;default:switch(e=e&&e.$$typeof){case l:case c:case h:case d:case s:return e;default:return t}}case r:return t}}}},7441:function(e,t,n){"use strict";n(1372)},6374:function(e,t,n){"use strict";n(1725);var r=n(2791),o=60103;if(60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},9117:function(e,t,n){"use strict";var r=n(1725),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var c=60115,u=60116;if("function"===typeof Symbol&&Symbol.for){var p=Symbol.for;o=p("react.element"),i=p("react.portal"),t.Fragment=p("react.fragment"),t.StrictMode=p("react.strict_mode"),t.Profiler=p("react.profiler"),a=p("react.provider"),s=p("react.context"),l=p("react.forward_ref"),t.Suspense=p("react.suspense"),c=p("react.memo"),u=p("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function m(){}function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(h(85));this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=v.prototype;var b=y.prototype=new m;b.constructor=y,r(b,v.prototype),b.isPureReactComponent=!0;var w={current:null},C=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)C.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:w.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var _=/\/+/g;function R(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function O(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case o:case i:l=!0}}if(l)return a=a(l=e),e=""===r?"."+R(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(_,"$&/")+"/"),O(a,t,n,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(_,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var u=r+R(s=e[c],c);l+=O(s,t,n,u,a)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=O(s=s.value,t,n,u=r+R(s,c++),a);else if("object"===s)throw t=""+e,Error(h(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function A(e,t,n){if(null==e)return e;var r=[],o=0;return O(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function P(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var T={current:null};function D(){var e=T.current;if(null===e)throw Error(h(321));return e}var k={ReactCurrentDispatcher:T,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error(h(143));return e}},t.Component=v,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(h(267,e));var i=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)C.call(t,u)&&!x.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){c=Array(u);for(var p=0;p<u;p++)c[p]=arguments[p+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return D().useCallback(e,t)},t.useContext=function(e,t){return D().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return D().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return D().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return D().useLayoutEffect(e,t)},t.useMemo=function(e,t){return D().useMemo(e,t)},t.useReducer=function(e,t,n){return D().useReducer(e,t,n)},t.useRef=function(e){return D().useRef(e)},t.useState=function(e){return D().useState(e)},t.version="17.0.2"},2791:function(e,t,n){"use strict";e.exports=n(9117)},184:function(e,t,n){"use strict";e.exports=n(6374)},3349:function(e){e.exports=function(e,t,n){for(var r=0,o=e.length,i=3==arguments.length?n:e[r++];r<o;)i=t.call(null,i,e[r],++r,e);return i}},6813:function(e,t){"use strict";var n,r,o,i;if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,u=null,p=function e(){if(null!==c)try{var n=t.unstable_now();c(!0,n),c=null}catch(r){throw setTimeout(e,0),r}};n=function(e){null!==c?setTimeout(n,0,e):(c=e,setTimeout(p,0))},r=function(e,t){u=setTimeout(e,t)},o=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var f=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof f&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,v=null,m=-1,y=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,C=w.port2;w.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();b=e+y;try{v(!0,e)?C.postMessage(null):(g=!1,v=null)}catch(n){throw C.postMessage(null),n}}else g=!1},n=function(e){v=e,g||(g=!0,C.postMessage(null))},r=function(e,n){m=d((function(){e(t.unstable_now())}),n)},o=function(){h(m),m=-1}}function x(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<_(o,t)))break e;e[r]=t,e[n]=o,n=r}}function S(e){return void 0===(e=e[0])?null:e}function E(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,l=e[s];if(void 0!==a&&0>_(a,n))void 0!==l&&0>_(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>_(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function _(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var R=[],O=[],A=1,P=null,T=3,D=!1,k=!1,N=!1;function M(e){for(var t=S(O);null!==t;){if(null===t.callback)E(O);else{if(!(t.startTime<=e))break;E(O),t.sortIndex=t.expirationTime,x(R,t)}t=S(O)}}function I(e){if(N=!1,M(e),!k)if(null!==S(R))k=!0,n(L);else{var t=S(O);null!==t&&r(I,t.startTime-e)}}function L(e,n){k=!1,N&&(N=!1,o()),D=!0;var i=T;try{for(M(n),P=S(R);null!==P&&(!(P.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=P.callback;if("function"===typeof a){P.callback=null,T=P.priorityLevel;var s=a(P.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?P.callback=s:P===S(R)&&E(R),M(n)}else E(R);P=S(R)}if(null!==P)var l=!0;else{var c=S(O);null!==c&&r(I,c.startTime-n),l=!1}return l}finally{P=null,T=i,D=!1}}var F=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){k||D||(k=!0,n(L))},t.unstable_getCurrentPriorityLevel=function(){return T},t.unstable_getFirstCallbackNode=function(){return S(R)},t.unstable_next=function(e){switch(T){case 1:case 2:case 3:var t=3;break;default:t=T}var n=T;T=t;try{return e()}finally{T=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=T;T=e;try{return t()}finally{T=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:A++,callback:i,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,x(O,e),null===S(R)&&e===S(O)&&(N?o():N=!0,r(I,a-s))):(e.sortIndex=l,x(R,e),k||D||(k=!0,n(L))),e},t.unstable_wrapCallback=function(e){var t=T;return function(){var n=T;T=t;try{return e.apply(this,arguments)}finally{T=n}}}},5296:function(e,t,n){"use strict";e.exports=n(6813)},9833:function(e){e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],o=e[2],i=e[3];r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&o)+t[1]-389564586|0)<<12|i>>>20)+n|0)&n|~i&r)+t[2]+606105819|0)<<17|o>>>15)+i|0)&i|~o&n)+t[3]-1044525330|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&o)+t[5]+1200080426|0)<<12|i>>>20)+n|0)&n|~i&r)+t[6]-1473231341|0)<<17|o>>>15)+i|0)&i|~o&n)+t[7]-45705983|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&o)+t[9]-1958414417|0)<<12|i>>>20)+n|0)&n|~i&r)+t[10]-42063|0)<<17|o>>>15)+i|0)&i|~o&n)+t[11]-1990404162|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&o)+t[13]-40341101|0)<<12|i>>>20)+n|0)&n|~i&r)+t[14]-1502002290|0)<<17|o>>>15)+i|0)&i|~o&n)+t[15]+1236535329|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[1]-165796510|0)<<5|n>>>27)+r|0)&o|r&~o)+t[6]-1069501632|0)<<9|i>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|o>>>18)+i|0)&n|i&~n)+t[0]-373897302|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[5]-701558691|0)<<5|n>>>27)+r|0)&o|r&~o)+t[10]+38016083|0)<<9|i>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|o>>>18)+i|0)&n|i&~n)+t[4]-405537848|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[9]+568446438|0)<<5|n>>>27)+r|0)&o|r&~o)+t[14]-1019803690|0)<<9|i>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|o>>>18)+i|0)&n|i&~n)+t[8]+1163531501|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&o|r&~o)+t[2]-51403784|0)<<9|i>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|o>>>18)+i|0)&n|i&~n)+t[12]-1926607734|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^o)+t[8]-2022574463|0)<<11|i>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|o>>>16)+i|0)^i^n)+t[14]-35309556|0)<<23|r>>>9)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^o)+t[4]+1272893353|0)<<11|i>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|o>>>16)+i|0)^i^n)+t[10]-1094730640|0)<<23|r>>>9)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^o)+t[0]-358537222|0)<<11|i>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|o>>>16)+i|0)^i^n)+t[6]+76029189|0)<<23|r>>>9)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^o)+t[12]-421815835|0)<<11|i>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|o>>>16)+i|0)^i^n)+t[2]-995338651|0)<<23|r>>>9)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~o))+t[7]+1126891415|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[14]-1416354905|0)<<15|o>>>17)+i|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~o))+t[3]-1894986606|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[10]-1051523|0)<<15|o>>>17)+i|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~o))+t[15]-30611744|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[6]-1560198380|0)<<15|o>>>17)+i|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~o))+t[11]-1120210379|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[2]+718787259|0)<<15|o>>>17)+i|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+o|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=o+e[2]|0,e[3]=i+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function o(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function i(e){var t,o,i,a,s,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(u,r(e.substring(t-64,t)));for(o=(e=e.substring(t-64)).length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<o;t+=1)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(n(u,i),t=0;t<16;t+=1)i[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),l=parseInt(a[1],16)||0,i[14]=s,i[15]=l,n(u,i),u}function a(e){var t,r,i,a,s,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(u,o(e.subarray(t-64,t)));for(r=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)i[t>>2]|=e[t]<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(n(u,i),t=0;t<16;t+=1)i[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),l=parseInt(a[1],16)||0,i[14]=s,i[15]=l,n(u,i),u}function s(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function l(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function u(e,t){var n,r=e.length,o=new ArrayBuffer(r),i=new Uint8Array(o);for(n=0;n<r;n+=1)i[n]=e.charCodeAt(n);return t?i:o}function p(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function d(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function h(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function f(){this.reset()}return l(i("hello")),"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var o,i,a,s,l=this.byteLength,c=t(n,l),u=l;return r!==e&&(u=t(r,l)),c>u?new ArrayBuffer(0):(o=u-c,i=new ArrayBuffer(o),a=new Uint8Array(i),s=new Uint8Array(this,c,o),a.set(s),i)}}(),f.prototype.append=function(e){return this.appendBinary(c(e)),this},f.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,o=this._buff.length;for(t=64;t<=o;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},f.prototype.end=function(e){var t,n,r=this._buff,o=r.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)i[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(i,o),n=l(this._hash),e&&(n=h(n)),this.reset(),n},f.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},f.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},f.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},f.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},f.prototype._finish=function(e,t){var r,o,i,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,e),a=0;a<16;a+=1)e[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(r[2],16),i=parseInt(r[1],16)||0,e[14]=o,e[15]=i,n(this._hash,e)},f.hash=function(e,t){return f.hashBinary(c(e),t)},f.hashBinary=function(e,t){var n=l(i(e));return t?h(n):n},f.ArrayBuffer=function(){this.reset()},f.ArrayBuffer.prototype.append=function(e){var t,r=d(this._buff.buffer,e,!0),i=r.length;for(this._length+=e.byteLength,t=64;t<=i;t+=64)n(this._hash,o(r.subarray(t-64,t)));return this._buff=t-64<i?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},f.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,o=r.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)i[t>>2]|=r[t]<<(t%4<<3);return this._finish(i,o),n=l(this._hash),e&&(n=h(n)),this.reset(),n},f.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},f.ArrayBuffer.prototype.getState=function(){var e=f.prototype.getState.call(this);return e.buff=p(e.buff),e},f.ArrayBuffer.prototype.setState=function(e){return e.buff=u(e.buff,!0),f.prototype.setState.call(this,e)},f.ArrayBuffer.prototype.destroy=f.prototype.destroy,f.ArrayBuffer.prototype._finish=f.prototype._finish,f.ArrayBuffer.hash=function(e,t){var n=l(a(new Uint8Array(e)));return t?h(n):n},f}()},7004:function(e,t,n){var r,o=n(9773),i=n(3349),a=n(3430),s=n(7827);function l(){}function c(e){switch({}.toString.call(e)){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}r="undefined"!==typeof window?window:"undefined"!==typeof self?self:this;var u=e.exports=n(4987).bind(null,m);u.getXHR=function(){if(!(!r.XMLHttpRequest||r.location&&"file:"==r.location.protocol&&r.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var p="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function d(e){if(!s(e))return e;var t=[];for(var n in e)null!=e[n]&&h(t,n,e[n]);return t.join("&")}function h(e,t,n){if(Array.isArray(n))return n.forEach((function(n){h(e,t,n)}));e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}function f(e){for(var t,n={},r=e.split("&"),o=0,i=r.length;o<i;++o)t=r[o].split("="),n[decodeURIComponent(t[0])]=decodeURIComponent(t[1]);return n}function g(e){return/[\/+]json\b/.test(e)}function v(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"===typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=function(e){var t,n,r,o,i=e.split(/\r?\n/),a={};i.pop();for(var s=0,l=i.length;s<l;++s)t=(n=i[s]).indexOf(":"),r=n.slice(0,t).toLowerCase(),o=p(n.slice(t+1)),a[r]=o;return a}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function m(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e=null,t=null;try{t=new v(n)}catch(o){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=o,e.rawResponse=n.xhr&&n.xhr.responseText?n.xhr.responseText:null,e.statusCode=n.xhr&&n.xhr.status?n.xhr.status:null,n.callback(e)}if(n.emit("response",t),e)return n.callback(e,t);if(t.status>=200&&t.status<300)return n.callback(e,t);var r=new Error(t.statusText||"Unsuccessful HTTP response");r.original=e,r.response=t,r.status=t.status,n.callback(r,t)}))}for(var y in u.serializeObject=d,u.parseString=f,u.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},u.serialize={"application/x-www-form-urlencoded":d,"application/json":JSON.stringify},u.parse={"application/x-www-form-urlencoded":f,"application/json":JSON.parse},v.prototype.get=function(e){return this.header[e.toLowerCase()]},v.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=t.split(/ *; */).shift();var n=function(e){return i(e.split(/ *; */),(function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e}),{})}(t);for(var r in n)this[r]=n[r]},v.prototype.parseBody=function(e){var t=u.parse[this.type];return!t&&g(this.type)&&(t=u.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},v.prototype.setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},v.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},u.Response=v,o(m.prototype),a)m.prototype[y]=a[y];function b(e,t){var n=u("DELETE",e);return t&&n.end(t),n}m.prototype.abort=function(){if(!this.aborted)return this.aborted=!0,this.xhr&&this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this},m.prototype.type=function(e){return this.set("Content-Type",u.types[e]||e),this},m.prototype.responseType=function(e){return this._responseType=e,this},m.prototype.accept=function(e){return this.set("Accept",u.types[e]||e),this},m.prototype.auth=function(e,t,n){switch(n||(n={type:"basic"}),n.type){case"basic":var r=btoa(e+":"+t);this.set("Authorization","Basic "+r);break;case"auto":this.username=e,this.password=t}return this},m.prototype.query=function(e){return"string"!=typeof e&&(e=d(e)),e&&this._query.push(e),this},m.prototype.attach=function(e,t,n){return this._getFormData().append(e,t,n||t.name),this},m.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},m.prototype.send=function(e){var t=s(e),n=this._header["content-type"];if(t&&s(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||c(e)||n||this.type("json"),this},v.prototype.parse=function(e){return r.console&&console.warn("Client-side parse() method has been renamed to serialize(). This method is not compatible with superagent v2.0"),this.serialize(e),this},v.prototype.serialize=function(e){return this._parser=e,this},m.prototype.callback=function(e,t){var n=this._callback;this.clearTimeout(),n(e,t)},m.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},m.prototype.timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},m.prototype.withCredentials=function(){return this._withCredentials=!0,this},m.prototype.end=function(e){var t=this,n=this.xhr=u.getXHR(),r=this._query.join("&"),o=this._timeout,i=this._formData||this._data;this._callback=e||l,n.onreadystatechange=function(){if(4==n.readyState){var e;try{e=n.status}catch(r){e=0}if(0==e){if(t.timedout)return t.timeoutError();if(t.aborted)return;return t.crossDomainError()}t.emit("end")}};var a=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),e.direction="download",t.emit("progress",e)};this.hasListeners("progress")&&(n.onprogress=a);try{n.upload&&this.hasListeners("progress")&&(n.upload.onprogress=a)}catch(h){}if(o&&!this._timer&&(this._timer=setTimeout((function(){t.timedout=!0,t.abort()}),o)),r&&(r=u.serializeObject(r),this.url+=~this.url.indexOf("?")?"&"+r:"?"+r),this.username&&this.password?n.open(this.method,this.url,!0,this.username,this.password):n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof i&&!c(i)){var s=this._header["content-type"],p=this._parser||u.serialize[s?s.split(";")[0]:""];!p&&g(s)&&(p=u.serialize["application/json"]),p&&(i=p(i))}for(var d in this.header)null!=this.header[d]&&n.setRequestHeader(d,this.header[d]);return this._responseType&&(n.responseType=this._responseType),this.emit("request",this),n.send("undefined"!==typeof i?i:null),this},u.Request=m,u.get=function(e,t,n){var r=u("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},u.head=function(e,t,n){var r=u("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},u.del=b,u.delete=b,u.patch=function(e,t,n){var r=u("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},u.post=function(e,t,n){var r=u("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},u.put=function(e,t,n){var r=u("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},7827:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},3430:function(e,t,n){var r=n(7827);t.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},t.parse=function(e){return this._parser=e,this},t.timeout=function(e){return this._timeout=e,this},t.then=function(e,t){return this.end((function(n,r){n?t(n):e(r)}))},t.use=function(e){return e(this),this},t.get=function(e){return this._header[e.toLowerCase()]},t.getHeader=t.get,t.set=function(e,t){if(r(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},t.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},t.field=function(e,t){return this._getFormData().append(e,t),this}},4987:function(e){e.exports=function(e,t,n){return"function"==typeof n?new e("GET",t).end(n):2==arguments.length?new e("GET",t):new e(t,n)}},8977:function(e,t){"use strict";function n(e,t,n){var r=n[n.length-1];e===r.element&&(n.pop(),r=n[n.length-1]);var o=r.element,i=r.index;if(Array.isArray(o))o.push(e);else if(i===t.length-2){o[t.pop()]=e}else t.push(e)}t.stringify=function(e){var t=[];t.push({obj:e});for(var n,r,o,i,a,s,l,c,u,p,d="";n=t.pop();)if(r=n.obj,d+=n.prefix||"",o=n.val||"")d+=o;else if("object"!==typeof r)d+="undefined"===typeof r?null:JSON.stringify(r);else if(null===r)d+="null";else if(Array.isArray(r)){for(t.push({val:"]"}),i=r.length-1;i>=0;i--)a=0===i?"":",",t.push({obj:r[i],prefix:a});t.push({val:"["})}else{for(l in s=[],r)r.hasOwnProperty(l)&&s.push(l);for(t.push({val:"}"}),i=s.length-1;i>=0;i--)u=r[c=s[i]],p=i>0?",":"",p+=JSON.stringify(c)+":",t.push({obj:u,prefix:p});t.push({val:"{"})}return d},t.parse=function(e){for(var t,r,o,i,a,s,l,c,u,p=[],d=[],h=0;;)if("}"!==(t=e[h++])&&"]"!==t&&"undefined"!==typeof t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":h+=3,n(null,p,d);break;case"t":h+=3,n(!0,p,d);break;case"f":h+=4,n(!1,p,d);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(r="",h--;;){if(o=e[h++],!/[\d\.\-e\+]/.test(o)){h--;break}r+=o}n(parseFloat(r),p,d);break;case'"':for(i="",a=void 0,s=0;'"'!==(l=e[h++])||"\\"===a&&s%2===1;)i+=l,"\\"===(a=l)?s++:s=0;n(JSON.parse('"'+i+'"'),p,d);break;case"[":c={element:[],index:p.length},p.push(c.element),d.push(c);break;case"{":u={element:{},index:p.length},p.push(u.element),d.push(u);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===p.length)return p.pop();n(p.pop(),p,d)}}},5525:function(){}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},n.d(i,a),i}}(),n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+".f3328bc8.chunk.js"},n.miniCssF=function(e){},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="webserver:";n.l=function(r,o,i,a){if(e[r])e[r].push(o);else{var s,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var p=c[u];if(p.getAttribute("src")==r||p.getAttribute("data-webpack")==t+i){s=p;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[o];var d=function(t,n){s.onerror=s.onload=null,clearTimeout(h);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((function(e){return e(n)})),t)return t(n)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",function(){var e={179:0};n.f.j=function(t,r){var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise((function(n,r){o=e[t]=[n,r]}));r.push(o[2]=i);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var o,i,a=r[0],s=r[1],l=r[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(l)l(n)}for(t&&t(r);c<a.length;c++)i=a[c],n.o(e,i)&&e[i]&&e[i][0](),e[a[c]]=0},r=self.webpackChunkwebserver=self.webpackChunkwebserver||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var r={};!function(){"use strict";var e=n(2791),t=n.t(e,2),r=n(4164);n.p;function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(e){return c="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},c(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if(t&&("object"===c(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}var h=n(184),f=function(e){return(0,h.jsxs)("button",{className:"drawer_button",onClick:e.click,children:[(0,h.jsx)("div",{className:"drawer_button_line"}),(0,h.jsx)("div",{className:"drawer_button_line"}),(0,h.jsx)("div",{className:"drawer_button_line"})]})};function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){if(e){if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}var b,w=b||(b={});w.Pop="POP",w.Push="PUSH",w.Replace="REPLACE";var C=function(e){return e};function x(e){e.preventDefault(),e.returnValue=""}function S(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function E(){return Math.random().toString(36).substr(2,8)}function _(e){var t=e.pathname;t=void 0===t?"/":t;var n=e.search;return n=void 0===n?"":n,e=void 0===(e=e.hash)?"":e,n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),e&&"#"!==e&&(t+="#"===e.charAt(0)?e:"#"+e),t}function R(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function O(e,t){if(!e)throw new Error(t)}var A=(0,e.createContext)(null);var P=(0,e.createContext)(null);var T=(0,e.createContext)({outlet:null,matches:[]});function D(t){return function(t){var n=(0,e.useContext)(T).outlet;if(n)return(0,e.createElement)(H.Provider,{value:t},n);return n}(t.context)}function k(e){O(!1)}function N(t){var n=t.basename,r=void 0===n?"/":n,o=t.children,i=void 0===o?null:o,a=t.location,s=t.navigationType,l=void 0===s?b.Pop:s,c=t.navigator,u=t.static,p=void 0!==u&&u;L()&&O(!1);var d=Z(r),h=(0,e.useMemo)((function(){return{basename:d,navigator:c,static:p}}),[d,c,p]);"string"===typeof a&&(a=R(a));var f=a,g=f.pathname,v=void 0===g?"/":g,m=f.search,y=void 0===m?"":m,w=f.hash,C=void 0===w?"":w,x=f.state,S=void 0===x?null:x,E=f.key,_=void 0===E?"default":E,T=(0,e.useMemo)((function(){var e=$(v,d);return null==e?null:{pathname:e,search:y,hash:C,state:S,key:_}}),[d,v,y,C,S,_]);return null==T?null:(0,e.createElement)(A.Provider,{value:h},(0,e.createElement)(P.Provider,{children:i,value:{location:T,navigationType:l}}))}function M(t){var n=t.children,r=t.location;return function(t,n){L()||O(!1);var r=(0,e.useContext)(T).matches,o=r[r.length-1],i=o?o.params:{},a=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;0;var s,l=F();if(n){var c,u="string"===typeof n?R(n):n;"/"===a||(null==(c=u.pathname)?void 0:c.startsWith(a))||O(!1),s=u}else s=l;var p=s.pathname||"/",d="/"===a?p:p.slice(a.length)||"/",h=function(e,t,n){void 0===n&&(n="/");var r=$(("string"===typeof t?R(t):t).pathname||"/",n);if(null==r)return null;var o=j(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(o);for(var i=null,a=0;null==i&&a<o.length;++a)i=Y(o[a],r);return i}(t,{pathname:d});0;return X(h&&h.map((function(e){return Object.assign({},e,{params:Object.assign({},i,e.params),pathname:Q([a,e.pathname]),pathnameBase:"/"===e.pathnameBase?a:Q([a,e.pathnameBase])})})),r)}(V(n),r)}function I(t){L()||O(!1);var n=(0,e.useContext)(A),r=n.basename,o=n.navigator,i=W(t),a=i.hash,s=i.pathname,l=i.search,c=s;if("/"!==r){var u=function(e){return""===e||""===e.pathname?"/":"string"===typeof e?R(e).pathname:e.pathname}(t),p=null!=u&&u.endsWith("/");c="/"===s?r+(p?"/":""):Q([r,s])}return o.createHref({pathname:c,search:l,hash:a})}function L(){return null!=(0,e.useContext)(P)}function F(){return L()||O(!1),(0,e.useContext)(P).location}function G(){L()||O(!1);var t=(0,e.useContext)(A),n=t.basename,r=t.navigator,o=(0,e.useContext)(T).matches,i=F().pathname,a=JSON.stringify(o.map((function(e){return e.pathnameBase}))),s=(0,e.useRef)(!1);return(0,e.useEffect)((function(){s.current=!0})),(0,e.useCallback)((function(e,t){if(void 0===t&&(t={}),s.current)if("number"!==typeof e){var o=K(e,JSON.parse(a),i);"/"!==n&&(o.pathname=Q([n,o.pathname])),(t.replace?r.replace:r.push)(o,t.state)}else r.go(e)}),[n,r,a,i])}var H=(0,e.createContext)(null);function W(t){var n=(0,e.useContext)(T).matches,r=F().pathname,o=JSON.stringify(n.map((function(e){return e.pathnameBase})));return(0,e.useMemo)((function(){return K(t,JSON.parse(o),r)}),[t,o,r])}function V(t){var n=[];return e.Children.forEach(t,(function(t){if((0,e.isValidElement)(t))if(t.type!==e.Fragment){t.type!==k&&O(!1);var r={caseSensitive:t.props.caseSensitive,element:t.props.element,index:t.props.index,path:t.props.path};t.props.children&&(r.children=V(t.props.children)),n.push(r)}else n.push.apply(n,V(t.props.children))})),n}function j(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=""),e.forEach((function(e,o){var i={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(i.relativePath.startsWith(r)||O(!1),i.relativePath=i.relativePath.slice(r.length));var a=Q([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(!0===e.index&&O(!1),j(e.children,t,s,a)),(null!=e.path||e.index)&&t.push({path:a,score:U(a,e.index),routesMeta:s})})),t}var B=/^:\w+$/,z=function(e){return"*"===e};function U(e,t){var n=e.split("/"),r=n.length;return n.some(z)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!z(e)})).reduce((function(e,t){return e+(B.test(t)?3:""===t?1:10)}),r)}function Y(e,t){for(var n=e.routesMeta,r={},o="/",i=[],a=0;a<n.length;++a){var s=n[a],l=a===n.length-1,c="/"===o?t:t.slice(o.length)||"/",u=q({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c);if(!u)return null;Object.assign(r,u.params);var p=s.route;i.push({params:r,pathname:Q([o,u.pathname]),pathnameBase:Q([o,u.pathnameBase]),route:p}),"/"!==u.pathnameBase&&(o=Q([o,u.pathnameBase]))}return i}function X(t,n){return void 0===n&&(n=[]),null==t?null:t.reduceRight((function(r,o,i){return(0,e.createElement)(T.Provider,{children:void 0!==o.route.element?o.route.element:(0,e.createElement)(D,null),value:{outlet:r,matches:n.concat(t.slice(0,i+1))}})}),null)}function q(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);var r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(function(e,t){return r.push(t),"([^\\/]+)"}));e.endsWith("*")?(r.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):o+=n?"\\/*$":"(?:\\b|\\/|$)";return[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),r=m(n,2),o=r[0],i=r[1],a=t.match(o);if(!a)return null;var s=a[0],l=s.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:i.reduce((function(e,t,n){if("*"===t){var r=c[n]||"";l=s.slice(0,s.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return e}}(c[n]||""),e}),{}),pathname:s,pathnameBase:l,pattern:e}}function K(e,t,n){var r,o="string"===typeof e?R(e):e,i=""===e||""===o.pathname?"/":o.pathname;if(null==i)r=n;else{var a=t.length-1;if(i.startsWith("..")){for(var s=i.split("/");".."===s[0];)s.shift(),a-=1;o.pathname=s.join("/")}r=a>=0?t[a]:"/"}var l=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?R(e):e,r=n.pathname,o=n.search,i=void 0===o?"":o,a=n.hash,s=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:J(i),hash:ee(s)}}(o,r);return i&&"/"!==i&&i.endsWith("/")&&!l.pathname.endsWith("/")&&(l.pathname+="/"),l}function $(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}var Q=function(e){return e.join("/").replace(/\/\/+/g,"/")},Z=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},J=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},ee=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};function te(){return te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},te.apply(this,arguments)}function ne(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var re=["onClick","reloadDocument","replace","state","target","to"];function oe(t){var n=t.basename,r=t.children,o=t.window,i=(0,e.useRef)();null==i.current&&(i.current=function(e){function t(){var e=a.location,t=s.state||{};return[t.idx,C({pathname:e.pathname,search:e.search,hash:e.hash,state:t.usr||null,key:t.key||"default"})]}function n(e){return"string"===typeof e?e:_(e)}function r(e,t){return void 0===t&&(t=null),C(y({pathname:p.pathname,hash:"",search:""},"string"===typeof e?R(e):e,{state:t,key:E()}))}function o(e){c=e,e=t(),u=e[0],p=e[1],d.call({action:c,location:p})}function i(e){s.go(e)}void 0===e&&(e={});var a=void 0===(e=e.window)?document.defaultView:e,s=a.history,l=null;a.addEventListener("popstate",(function(){if(l)h.call(l),l=null;else{var e=b.Pop,n=t(),r=n[0];if(n=n[1],h.length){if(null!=r){var a=u-r;a&&(l={action:e,location:n,retry:function(){i(-1*a)}},i(a))}}else o(e)}}));var c=b.Pop,u=(e=t())[0],p=e[1],d=S(),h=S();return null==u&&(u=0,s.replaceState(y({},s.state,{idx:u}),"")),{get action(){return c},get location(){return p},createHref:n,push:function e(t,i){var l=b.Push,c=r(t,i);if(!h.length||(h.call({action:l,location:c,retry:function(){e(t,i)}}),0)){var p=[{usr:c.state,key:c.key,idx:u+1},n(c)];c=p[0],p=p[1];try{s.pushState(c,"",p)}catch(d){a.location.assign(p)}o(l)}},replace:function e(t,i){var a=b.Replace,l=r(t,i);h.length&&(h.call({action:a,location:l,retry:function(){e(t,i)}}),1)||(l=[{usr:l.state,key:l.key,idx:u},n(l)],s.replaceState(l[0],"",l[1]),o(a))},go:i,back:function(){i(-1)},forward:function(){i(1)},listen:function(e){return d.push(e)},block:function(e){var t=h.push(e);return 1===h.length&&a.addEventListener("beforeunload",x),function(){t(),h.length||a.removeEventListener("beforeunload",x)}}}}({window:o}));var a=i.current,s=m((0,e.useState)({action:a.action,location:a.location}),2),l=s[0],c=s[1];return(0,e.useLayoutEffect)((function(){return a.listen(c)}),[a]),(0,e.createElement)(N,{basename:n,children:r,location:l.location,navigationType:l.action,navigator:a})}var ie=(0,e.forwardRef)((function(t,n){var r=t.onClick,o=t.reloadDocument,i=t.replace,a=void 0!==i&&i,s=t.state,l=t.target,c=t.to,u=ne(t,re),p=I(c),d=function(t,n){var r=void 0===n?{}:n,o=r.target,i=r.replace,a=r.state,s=G(),l=F(),c=W(t);return(0,e.useCallback)((function(e){if(0===e.button&&(!o||"_self"===o)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)){e.preventDefault();var n=!!i||_(l)===_(c);s(t,{replace:n,state:a})}}),[l,s,c,i,a,o,t])}(c,{replace:a,state:s,target:l});return(0,e.createElement)("a",te({},u,{href:p,onClick:function(e){r&&r(e),e.defaultPrevented||o||d(e)},ref:n,target:l}))}));var ae,se,le=function(e){return(0,h.jsxs)("ul",{children:[(0,h.jsx)("li",{children:(0,h.jsx)(ie,{onClick:e.click,to:"/Schedule",children:"Schedule"})}),(0,h.jsx)("li",{children:(0,h.jsx)(ie,{onClick:e.click,to:"/TeamList",children:"Teams"})}),(0,h.jsx)("li",{children:(0,h.jsx)(ie,{onClick:e.click,to:"/Dashboard",children:"Dashboard"})})]})},ce=function(e){return(0,h.jsx)("header",{className:"toolbar",children:(0,h.jsxs)("nav",{className:"toolbar_navigation",children:[(0,h.jsx)(f,{click:e.drawerClickHandler}),(0,h.jsx)("div",{className:"toolbar_logo",children:(0,h.jsx)(ie,{to:"/",children:"Ridgebotics Scouting"})}),(0,h.jsx)("div",{className:"toolbar_spacer"}),(0,h.jsx)("div",{className:"toolbar_items",children:(0,h.jsx)(le,{})})]})})},ue=function(e){var t="side_drawer";return e.show&&(t="side_drawer open"),(0,h.jsx)("nav",{className:t,children:(0,h.jsx)(le,{click:e.drawerClickHandler})})},pe=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e);var t=d(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).state={sideDrawerOpen:!1},e.drawerToggleClickHandler=function(){e.setState((function(e){return{sideDrawerOpen:!e.sideDrawerOpen}}))},e}return a(n,[{key:"render",value:function(){return(0,h.jsxs)("div",{className:"Navigation",children:[(0,h.jsx)(ce,{drawerClickHandler:this.drawerToggleClickHandler}),(0,h.jsx)(ue,{show:this.state.sideDrawerOpen,drawerClickHandler:this.drawerToggleClickHandler})]})}}]),n}(e.Component),de=pe,he=n(37),fe=n.n(he),ge=n(2020),ve=(ge.v1,ge.v3,ge.v4),me=(ge.v5,n(9833)),ye=n.n(me),be=n(8977),we=n(8991),Ce=n.n(we),xe=n(2534),Se=n.n(xe),Ee=n(7465),_e=n.n(Ee);function Re(e){return"$"+e}function Oe(e){return e.substring(1)}function Ae(){this._store={}}function Pe(e){if(this._store=new Ae,e&&Array.isArray(e))for(var t=0,n=e.length;t<n;t++)this.add(e[t])}function Te(e){if(e instanceof ArrayBuffer)return function(e){if("function"===typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),n=new Uint8Array(t),r=new Uint8Array(e);return n.set(r),t}(e);var t=e.size,n=e.type;return"function"===typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n)}Ae.prototype.get=function(e){var t=Re(e);return this._store[t]},Ae.prototype.set=function(e,t){var n=Re(e);return this._store[n]=t,!0},Ae.prototype.has=function(e){return Re(e)in this._store},Ae.prototype.delete=function(e){var t=Re(e),n=t in this._store;return delete this._store[t],n},Ae.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,r=t.length;n<r;n++){var o=t[n];e(this._store[o],o=Oe(o))}},Object.defineProperty(Ae.prototype,"size",{get:function(){return Object.keys(this._store).length}}),Pe.prototype.add=function(e){return this._store.set(e,!0)},Pe.prototype.has=function(e){return this._store.has(e)},Pe.prototype.forEach=function(e){this._store.forEach((function(t,n){e(n)}))},Object.defineProperty(Pe.prototype,"size",{get:function(){return this._store.size}}),!function(){if("undefined"===typeof Symbol||"undefined"===typeof Map||"undefined"===typeof Set)return!1;var e=Object.getOwnPropertyDescriptor(Map,Symbol.species);return e&&"get"in e&&Map[Symbol.species]===Map}()?(ae=Pe,se=Ae):(ae=Set,se=Map);var De=Function.prototype.toString,ke=De.call(Object);function Ne(e){var t,n,r;if(!e||"object"!==typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,r=e.length;n<r;n++)t[n]=Ne(e[n]);return t}if(e instanceof Date)return e.toISOString();if(function(e){return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!==typeof Blob&&e instanceof Blob}(e))return Te(e);if(!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==ke}(e))return e;for(n in t={},e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=Ne(e[n]);"undefined"!==typeof o&&(t[n]=o)}return t}function Me(e){var t=!1;return Ce()((function(n){if(t)throw new Error("once called more than once");t=!0,e.apply(this,n)}))}function Ie(e){return Ce()((function(t){t=Ne(t);var n=this,r="function"===typeof t[t.length-1]&&t.pop(),o=new Promise((function(r,o){var i;try{var a=Me((function(e,t){e?o(e):r(t)}));t.push(a),(i=e.apply(n,t))&&"function"===typeof i.then&&r(i)}catch(s){o(s)}}));return r&&o.then((function(e){r(null,e)}),r),o}))}function Le(e,t){return Ie(Ce()((function(n){if(this._closed)return Promise.reject(new Error("database is closed"));if(this._destroyed)return Promise.reject(new Error("database is destroyed"));var r=this;return function(e,t,n){if(e.constructor.listeners("debug").length){for(var r=["api",e.name,t],o=0;o<n.length-1;o++)r.push(n[o]);e.constructor.emit("debug",r);var i=n[n.length-1];n[n.length-1]=function(n,r){var o=["api",e.name,t];o=o.concat(n?["error",n]:["success",r]),e.constructor.emit("debug",o),i(n,r)}}}(r,e,n),this.taskqueue.isReady?t.apply(this,n):new Promise((function(t,o){r.taskqueue.addTask((function(i){i?o(i):t(r[e].apply(r,n))}))}))})))}function Fe(e,t){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];i in e&&(n[i]=e[i])}return n}var Ge,He;function We(e){return e}function Ve(e){return[{ok:e}]}function je(e,t,n){var r=t.docs,o=new se;r.forEach((function(e){o.has(e.id)?o.get(e.id).push(e):o.set(e.id,[e])}));var i=o.size,a=0,s=new Array(i);function l(){++a===i&&function(){var e=[];s.forEach((function(t){t.docs.forEach((function(n){e.push({id:t.id,docs:[n]})}))})),n(null,{results:e})}()}var c=[];o.forEach((function(e,t){c.push(t)}));var u=0;function p(){if(!(u>=c.length)){var n=Math.min(u+6,c.length),r=c.slice(u,n);!function(n,r){n.forEach((function(n,i){var a=r+i,c=o.get(n),u=Fe(c[0],["atts_since","attachments"]);u.open_revs=c.map((function(e){return e.rev})),u.open_revs=u.open_revs.filter(We);var d=We;0===u.open_revs.length&&(delete u.open_revs,d=Ve),["revs","attachments","binary","ajax","latest"].forEach((function(e){e in t&&(u[e]=t[e])})),e.get(n,u,(function(e,t){var r,o,i;r=e?[{error:e}]:d(t),o=n,i=r,s[a]={id:o,docs:i},l(),p()}))}))}(r,u),u+=r.length}}p()}try{localStorage.setItem("_pouch_check_localstorage",1),Ge=!!localStorage.getItem("_pouch_check_localstorage")}catch(Xw){Ge=!1}function Be(){return Ge}function ze(){_e().call(this),this._listeners={},function(e){Be()&&addEventListener("storage",(function(t){e.emit(t.key)}))}(this)}function Ue(e){if("undefined"!==typeof console&&"function"===typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function Ye(e){var t=0;return e||(t=2e3),function(e,t){var n=6e5;return e=parseInt(e,10)||0,(t=parseInt(t,10))!==t||t<=e?t=(e||1)<<1:t+=1,t>n&&(e=3e5,t=n),~~((t-e)*Math.random()+e)}(e,t)}function Xe(e,t){Ue("info","The above "+e+" is totally normal. "+t)}Se()(ze,_e()),ze.prototype.addListener=function(e,t,n,r){if(!this._listeners[t]){var o=this,i=!1;this._listeners[t]=a,this.on(e,a)}function a(){if(o._listeners[t])if(i)i="waiting";else{i=!0;var e=Fe(r,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]);n.changes(e).on("change",(function(e){e.seq>r.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))})).on("complete",(function(){"waiting"===i&&fe()(a),i=!1})).on("error",(function(){i=!1}))}}},ze.prototype.removeListener=function(e,t){t in this._listeners&&(_e().prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},ze.prototype.notifyLocalWindows=function(e){Be()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},ze.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)},He="function"===typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};var qe=He;function Ke(e,t,n){Error.call(this,n),this.status=e,this.name=t,this.message=n,this.error=!0}Se()(Ke,Error),Ke.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})};new Ke(401,"unauthorized","Name or password is incorrect.");var $e=new Ke(400,"bad_request","Missing JSON list of 'docs'"),Qe=new Ke(404,"not_found","missing"),Ze=new Ke(409,"conflict","Document update conflict"),Je=new Ke(400,"bad_request","_id field must contain a string"),et=new Ke(412,"missing_id","_id is required for puts"),tt=new Ke(400,"bad_request","Only reserved document ids may start with underscore."),nt=(new Ke(412,"precondition_failed","Database not open"),new Ke(500,"unknown_error","Database encountered an unknown error")),rt=new Ke(500,"badarg","Some query argument is invalid"),ot=(new Ke(400,"invalid_request","Request was invalid"),new Ke(400,"query_parse_error","Some query parameter is invalid")),it=new Ke(500,"doc_validation","Bad special document member"),at=new Ke(400,"bad_request","Something wrong with the request"),st=new Ke(400,"bad_request","Document must be a JSON object"),lt=(new Ke(404,"not_found","Database not found"),new Ke(500,"indexed_db_went_bad","unknown")),ct=(new Ke(500,"web_sql_went_bad","unknown"),new Ke(500,"levelDB_went_went_bad","unknown"),new Ke(403,"forbidden","Forbidden by design doc validate_doc_update function"),new Ke(400,"bad_request","Invalid rev format")),ut=(new Ke(412,"file_exists","The database could not be created, the file already exists."),new Ke(412,"missing_stub","A pre-existing attachment stub wasn't found"));new Ke(413,"invalid_url","Provided URL is invalid");function pt(e,t){function n(t){for(var n=Object.getOwnPropertyNames(e),r=0,o=n.length;r<o;r++)"function"!==typeof e[n[r]]&&(this[n[r]]=e[n[r]]);void 0!==t&&(this.reason=t)}return n.prototype=Ke.prototype,new n(t)}function dt(e){if("object"!==typeof e){var t=e;(e=nt).data=t}return"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),e}function ht(e){var t={},n=e.filter&&"function"===typeof e.filter;return t.query=e.query_params,function(r){r.doc||(r.doc={});var o=n&&function(e,t,n){try{return!e(t,n)}catch(o){var r="Filter function threw: "+o.toString();return pt(at,r)}}(e.filter,r.doc,t);if("object"===typeof o)return o;if(o)return!1;if(e.include_docs){if(!e.attachments)for(var i in r.doc._attachments)r.doc._attachments.hasOwnProperty(i)&&(r.doc._attachments[i].stub=!0)}else delete r.doc;return!0}}function ft(e){for(var t=[],n=0,r=e.length;n<r;n++)t=t.concat(e[n]);return t}function gt(e){var t;if(e?"string"!==typeof e?t=pt(Je):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=pt(tt)):t=pt(et),t)throw t}function vt(e){return"boolean"===typeof e._remote?e._remote:"function"===typeof e.type&&(Ue("warn","db.type() is deprecated and will be removed in a future version of PouchDB"),"http"===e.type())}function mt(e){if(!e)return null;var t=e.split("/");return 2===t.length?t:1===t.length?[e,e]:null}function yt(e){var t=mt(e);return t?t.join("/"):null}var bt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],wt="queryKey",Ct=/(?:^|&)([^&=]*)=?([^&]*)/g,xt=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;function St(e){for(var t=xt.exec(e),n={},r=14;r--;){var o=bt[r],i=t[r]||"",a=-1!==["user","password"].indexOf(o);n[o]=a?decodeURIComponent(i):i}return n[wt]={},n[bt[12]].replace(Ct,(function(e,t,r){t&&(n[wt][t]=r)})),n}function Et(e,t){var n=[],r=[];for(var o in t)t.hasOwnProperty(o)&&(n.push(o),r.push(t[o]));return n.push(e),Function.apply(null,n).apply(null,r)}function _t(e,t,n){return new Promise((function(r,o){e.get(t,(function(i,a){if(i){if(404!==i.status)return o(i);a={}}var s=a._rev,l=n(a);if(!l)return r({updated:!1,rev:s});l._id=t,l._rev=s,r(function(e,t,n){return e.put(t).then((function(e){return{updated:!0,rev:e.rev}}),(function(r){if(409!==r.status)throw r;return _t(e,t._id,n)}))}(e,l,n))}))}))}var Rt=function(e){return atob(e)},Ot=function(e){return btoa(e)};function At(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(Xw){if("TypeError"!==Xw.name)throw Xw;for(var n=new("undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof MSBlobBuilder?MSBlobBuilder:"undefined"!==typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}function Pt(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o<t;o++)r[o]=e.charCodeAt(o);return n}function Tt(e,t){return At([Pt(e)],{type:t})}function Dt(e,t){return Tt(Rt(e),t)}function kt(e,t){var n=new FileReader,r="function"===typeof n.readAsBinaryString;n.onloadend=function(e){var n=e.target.result||"";if(r)return t(n);t(function(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,o=0;o<r;o++)t+=String.fromCharCode(n[o]);return t}(n))},r?n.readAsBinaryString(e):n.readAsArrayBuffer(e)}function Nt(e,t){kt(e,(function(e){t(e)}))}function Mt(e,t){Nt(e,(function(e){t(Ot(e))}))}var It=self.setImmediate||self.setTimeout;function Lt(e,t,n,r,o){(n>0||r<t.size)&&(t=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.slice(t,n)}(t,n,r)),function(e,t){var n=new FileReader;n.onloadend=function(e){var n=e.target.result||new ArrayBuffer(0);t(n)},n.readAsArrayBuffer(e)}(t,(function(t){e.append(t),o()}))}function Ft(e,t,n,r,o){(n>0||r<t.length)&&(t=t.substring(n,r)),e.appendBinary(t),o()}function Gt(e,t){var n="string"===typeof e,r=n?e.length:e.size,o=Math.min(32768,r),i=Math.ceil(r/o),a=0,s=n?new(ye()):new(ye().ArrayBuffer),l=n?Ft:Lt;function c(){It(p)}function u(){var e=function(e){return Ot(e)}(s.end(!0));t(e),s.destroy()}function p(){var t=a*o,n=t+o;a++,l(s,e,t,n,a<i?c:u)}p()}function Ht(e){return ye().hash(e)}function Wt(e,t){var n=Ne(e);return t?(delete n._rev_tree,Ht(JSON.stringify(n))):ve().replace(/-/g,"").toLowerCase()}var Vt=ve;function jt(e){for(var t,n,r,o,i=e.rev_tree.slice();o=i.pop();){var a=o.ids,s=a[2],l=o.pos;if(s.length)for(var c=0,u=s.length;c<u;c++)i.push({pos:l+1,ids:s[c]});else{var p=!!a[1].deleted,d=a[0];t&&!(r!==p?r:n!==l?n<l:t<d)||(t=d,n=l,r=p)}}return n+"-"+t}function Bt(e,t){for(var n,r=e.slice();n=r.pop();)for(var o=n.pos,i=n.ids,a=i[2],s=t(0===a.length,o,i[0],n.ctx,i[1]),l=0,c=a.length;l<c;l++)r.push({pos:o+1,ids:a[l],ctx:s})}function zt(e,t){return e.pos-t.pos}function Ut(e){var t=[];Bt(e,(function(e,n,r,o,i){e&&t.push({rev:n+"-"+r,pos:n,opts:i})})),t.sort(zt).reverse();for(var n=0,r=t.length;n<r;n++)delete t[n].pos;return t}function Yt(e){for(var t=jt(e),n=Ut(e.rev_tree),r=[],o=0,i=n.length;o<i;o++){var a=n[o];a.rev===t||a.opts.deleted||r.push(a.rev)}return r}function Xt(e){for(var t,n=[],r=e.slice();t=r.pop();){var o=t.pos,i=t.ids,a=i[0],s=i[1],l=i[2],c=0===l.length,u=t.history?t.history.slice():[];u.push({id:a,opts:s}),c&&n.push({pos:o+1-u.length,ids:u});for(var p=0,d=l.length;p<d;p++)r.push({pos:o+1,ids:l[p],history:u})}return n.reverse()}function qt(e,t){return e.pos-t.pos}function Kt(e,t,n){var r=function(e,t,n){for(var r,o=0,i=e.length;o<i;)n(e[r=o+i>>>1],t)<0?o=r+1:i=r;return o}(e,t,n);e.splice(r,0,t)}function $t(e,t){for(var n,r,o=t,i=e.length;o<i;o++){var a=e[o],s=[a.id,a.opts,[]];r?(r[2].push(s),r=s):n=r=s}return n}function Qt(e,t){return e[0]<t[0]?-1:1}function Zt(e,t){for(var n=[{tree1:e,tree2:t}],r=!1;n.length>0;){var o=n.pop(),i=o.tree1,a=o.tree2;(i[1].status||a[1].status)&&(i[1].status="available"===i[1].status||"available"===a[1].status?"available":"missing");for(var s=0;s<a[2].length;s++)if(i[2][0]){for(var l=!1,c=0;c<i[2].length;c++)i[2][c][0]===a[2][s][0]&&(n.push({tree1:i[2][c],tree2:a[2][s]}),l=!0);l||(r="new_branch",Kt(i[2],a[2][s],Qt))}else r="new_leaf",i[2][0]=a[2][s]}return{conflicts:r,tree:e}}function Jt(e,t,n){var r,o=[],i=!1,a=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var s=0,l=e.length;s<l;s++){var c=e[s];if(c.pos===t.pos&&c.ids[0]===t.ids[0])r=Zt(c.ids,t.ids),o.push({pos:c.pos,ids:r.tree}),i=i||r.conflicts,a=!0;else if(!0!==n){var u=c.pos<t.pos?c:t,p=c.pos<t.pos?t:c,d=p.pos-u.pos,h=[],f=[];for(f.push({ids:u.ids,diff:d,parent:null,parentIdx:null});f.length>0;){var g=f.pop();if(0!==g.diff)for(var v=g.ids[2],m=0,y=v.length;m<y;m++)f.push({ids:v[m],diff:g.diff-1,parent:g.ids,parentIdx:m});else g.ids[0]===p.ids[0]&&h.push(g)}var b=h[0];b?(r=Zt(b.ids,p.ids),b.parent[2][b.parentIdx]=r.tree,o.push({pos:u.pos,ids:u.ids}),i=i||r.conflicts,a=!0):o.push(c)}else o.push(c)}return a||o.push(t),o.sort(qt),{tree:o,conflicts:i||"internal_node"}}function en(e,t,n){var r=Jt(e,t),o=function(e,t){for(var n,r,o=Xt(e),i=0,a=o.length;i<a;i++){var s,l=o[i],c=l.ids;if(c.length>t){n||(n={});var u=c.length-t;s={pos:l.pos+u,ids:$t(c,u)};for(var p=0;p<u;p++){var d=l.pos+p+"-"+c[p].id;n[d]=!0}}else s={pos:l.pos,ids:$t(c,0)};r=r?Jt(r,s,!0).tree:[s]}return n&&Bt(r,(function(e,t,r){delete n[t+"-"+r]})),{tree:r,revs:n?Object.keys(n):[]}}(r.tree,n);return{tree:o.tree,stemmedRevs:o.revs,conflicts:r.conflicts}}function tn(e){return e.ids}function nn(e,t){t||(t=jt(e));for(var n,r=t.substring(t.indexOf("-")+1),o=e.rev_tree.map(tn);n=o.pop();){if(n[0]===r)return!!n[1].deleted;o=o.concat(n[2])}}function rn(e){return/^_local/.test(e)}function on(e,t,n){_e().call(this);var r=this;this.db=e;var o=(t=t?Ne(t):{}).complete=Me((function(t,n){var o,a;t?(a="error",("listenerCount"in(o=r)?o.listenerCount(a):_e().listenerCount(o,a))>0&&r.emit("error",t)):r.emit("complete",n),r.removeAllListeners(),e.removeListener("destroyed",i)}));function i(){r.cancel()}n&&(r.on("complete",(function(e){n(null,e)})),r.on("error",n)),e.once("destroyed",i),t.onChange=function(e,t,n){r.isCancelled||function(e,t,n,r){try{e.emit("change",t,n,r)}catch(Xw){Ue("error",'Error in .on("change", function):',Xw)}}(r,e,t,n)};var a=new Promise((function(e,n){t.complete=function(t,r){t?n(t):e(r)}}));r.once("cancel",(function(){e.removeListener("destroyed",i),t.complete(null,{status:"cancelled"})})),this.then=a.then.bind(a),this.catch=a.catch.bind(a),this.then((function(e){o(null,e)}),o),e.taskqueue.isReady?r.validateChanges(t):e.taskqueue.addTask((function(e){e?t.complete(e):r.isCancelled?r.emit("cancel"):r.validateChanges(t)}))}function an(e,t,n){var r=[{rev:e._rev}];"all_docs"===n.style&&(r=Ut(t.rev_tree).map((function(e){return{rev:e.rev}})));var o={id:t.id,changes:r,doc:e};return nn(t,e._rev)&&(o.deleted=!0),n.conflicts&&(o.doc._conflicts=Yt(t),o.doc._conflicts.length||delete o.doc._conflicts),o}function sn(e,t){return e<t?-1:e>t?1:0}function ln(e,t){return function(n,r){n||r[0]&&r[0].error?((n=n||r[0]).docId=t,e(n)):e(null,r.length?r[0]:r)}}function cn(e,t){var n=sn(e._id,t._id);return 0!==n?n:sn(e._revisions?e._revisions.start:0,t._revisions?t._revisions.start:0)}function un(e){var t=e._compactionQueue[0],n=t.opts,r=t.callback;e.get("_local/compaction").catch((function(){return!1})).then((function(t){t&&t.last_seq&&(n.last_seq=t.last_seq),e._compact(n,(function(t,n){t?r(t):r(null,n),fe()((function(){e._compactionQueue.shift(),e._compactionQueue.length&&un(e)}))}))}))}function pn(){for(var e in _e().call(this),pn.prototype)"function"===typeof this[e]&&(this[e]=this[e].bind(this))}function dn(){this.isReady=!1,this.failed=!1,this.queue=[]}function hn(e,t){if(!(this instanceof hn))return new hn(e,t);var n=this;if(t=t||{},e&&"object"===typeof e&&(e=(t=e).name,delete t.name),void 0===t.deterministic_revs&&(t.deterministic_revs=!0),this.__opts=t=Ne(t),n.auto_compaction=t.auto_compaction,n.prefix=hn.prefix,"string"!==typeof e)throw new Error("Missing/invalid DB name");var r=function(e,t){var n=e.match(/([a-z-]*):\/\/(.*)/);if(n)return{name:/https?/.test(n[1])?n[1]+"://"+n[2]:n[2],adapter:n[1]};var r=hn.adapters,o=hn.preferredAdapters,i=hn.prefix,a=t.adapter;if(!a)for(var s=0;s<o.length&&"idb"===(a=o[s])&&"websql"in r&&Be()&&localStorage["_pouch__websqldb_"+i+e];++s)Ue("log",'PouchDB is downgrading "'+e+'" to WebSQL to avoid data loss, because it was already opened with WebSQL.');var l=r[a];return{name:l&&"use_prefix"in l&&!l.use_prefix?e:i+e,adapter:a}}((t.prefix||"")+e,t);if(t.name=r.name,t.adapter=t.adapter||r.adapter,n.name=e,n._adapter=t.adapter,hn.emit("debug",["adapter","Picked adapter: ",t.adapter]),!hn.adapters[t.adapter]||!hn.adapters[t.adapter].valid())throw new Error("Invalid Adapter: "+t.adapter);pn.call(n),n.taskqueue=new dn,n.adapter=t.adapter,hn.adapters[t.adapter].call(n,t,(function(e){if(e)return n.taskqueue.fail(e);!function(e){function t(t){e.removeListener("closed",n),t||e.constructor.emit("destroyed",e.name)}function n(){e.removeListener("destroyed",t),e.constructor.emit("unref",e)}e.once("destroyed",t),e.once("closed",n),e.constructor.emit("ref",e)}(n),n.emit("created",n),hn.emit("created",n.name),n.taskqueue.ready(n)}))}Se()(on,_e()),on.prototype.cancel=function(){this.isCancelled=!0,this.db.taskqueue.isReady&&this.emit("cancel")},on.prototype.validateChanges=function(e){var t=e.complete,n=this;hn._changesFilterPlugin?hn._changesFilterPlugin.validate(e,(function(r){if(r)return t(r);n.doChanges(e)})):n.doChanges(e)},on.prototype.doChanges=function(e){var t=this,n=e.complete;if("live"in(e=Ne(e))&&!("continuous"in e)&&(e.continuous=e.live),e.processChange=an,"latest"===e.since&&(e.since="now"),e.since||(e.since=0),"now"!==e.since){if(hn._changesFilterPlugin){if(hn._changesFilterPlugin.normalize(e),hn._changesFilterPlugin.shouldFilter(this,e))return hn._changesFilterPlugin.filter(this,e)}else["doc_ids","filter","selector","view"].forEach((function(t){t in e&&Ue("warn",'The "'+t+'" option was passed in to changes/replicate, but pouchdb-changes-filter plugin is not installed, so it was ignored. Please install the plugin to enable filtering.')}));"descending"in e||(e.descending=!1),e.limit=0===e.limit?1:e.limit,e.complete=n;var r=this.db._changes(e);if(r&&"function"===typeof r.cancel){var o=t.cancel;t.cancel=Ce()((function(e){r.cancel(),o.apply(this,e)}))}}else this.db.info().then((function(r){t.isCancelled?n(null,{status:"cancelled"}):(e.since=r.update_seq,t.doChanges(e))}),n)},Se()(pn,_e()),pn.prototype.post=Le("post",(function(e,t,n){if("function"===typeof t&&(n=t,t={}),"object"!==typeof e||Array.isArray(e))return n(pt(st));this.bulkDocs({docs:[e]},t,ln(n,e._id))})),pn.prototype.put=Le("put",(function(e,t,n){if("function"===typeof t&&(n=t,t={}),"object"!==typeof e||Array.isArray(e))return n(pt(st));if(gt(e._id),rn(e._id)&&"function"===typeof this._putLocal)return e._deleted?this._removeLocal(e,n):this._putLocal(e,n);var r=this;function o(n){"function"===typeof r._put&&!1!==t.new_edits?r._put(e,t,n):r.bulkDocs({docs:[e]},t,ln(n,e._id))}t.force&&e._rev?(!function(){var n=e._rev.split("-"),r=n[1],o=parseInt(n[0],10)+1,i=Wt();e._revisions={start:o,ids:[i,r]},e._rev=o+"-"+i,t.new_edits=!1}(),o((function(t){var r=t?null:{ok:!0,id:e._id,rev:e._rev};n(t,r)}))):o(n)})),pn.prototype.putAttachment=Le("putAttachment",(function(e,t,n,r,o){var i=this;function a(e){var n="_rev"in e?parseInt(e._rev,10):0;return e._attachments=e._attachments||{},e._attachments[t]={content_type:o,data:r,revpos:++n},i.put(e)}return"function"===typeof o&&(o=r,r=n,n=null),"undefined"===typeof o&&(o=r,r=n,n=null),o||Ue("warn","Attachment",t,"on document",e,"is missing content_type"),i.get(e).then((function(e){if(e._rev!==n)throw pt(Ze);return a(e)}),(function(t){if(t.reason===Qe.message)return a({_id:e});throw t}))})),pn.prototype.removeAttachment=Le("removeAttachment",(function(e,t,n,r){var o=this;o.get(e,(function(e,i){if(e)r(e);else if(i._rev===n){if(!i._attachments)return r();delete i._attachments[t],0===Object.keys(i._attachments).length&&delete i._attachments,o.put(i,r)}else r(pt(Ze))}))})),pn.prototype.remove=Le("remove",(function(e,t,n,r){var o;"string"===typeof t?(o={_id:e,_rev:t},"function"===typeof n&&(r=n,n={})):(o=e,"function"===typeof t?(r=t,n={}):(r=n,n=t)),(n=n||{}).was_delete=!0;var i={_id:o._id,_rev:o._rev||n.rev,_deleted:!0};if(rn(i._id)&&"function"===typeof this._removeLocal)return this._removeLocal(o,r);this.bulkDocs({docs:[i]},n,ln(r,i._id))})),pn.prototype.revsDiff=Le("revsDiff",(function(e,t,n){"function"===typeof t&&(n=t,t={});var r=Object.keys(e);if(!r.length)return n(null,{});var o=0,i=new se;function a(e,t){i.has(e)||i.set(e,{missing:[]}),i.get(e).missing.push(t)}r.map((function(t){this._getRevisionTree(t,(function(s,l){if(s&&404===s.status&&"missing"===s.message)i.set(t,{missing:e[t]});else{if(s)return n(s);!function(t,n){var r=e[t].slice(0);Bt(n,(function(e,n,o,i,s){var l=n+"-"+o,c=r.indexOf(l);-1!==c&&(r.splice(c,1),"available"!==s.status&&a(t,l))})),r.forEach((function(e){a(t,e)}))}(t,l)}if(++o===r.length){var c={};return i.forEach((function(e,t){c[t]=e})),n(null,c)}}))}),this)})),pn.prototype.bulkGet=Le("bulkGet",(function(e,t){je(this,e,t)})),pn.prototype.compactDocument=Le("compactDocument",(function(e,t,n){var r=this;this._getRevisionTree(e,(function(o,i){if(o)return n(o);var a=function(e){var t={},n=[];return Bt(e,(function(e,r,o,i){var a=r+"-"+o;return e&&(t[a]=0),void 0!==i&&n.push({from:i,to:a}),a})),n.reverse(),n.forEach((function(e){void 0===t[e.from]?t[e.from]=1+t[e.to]:t[e.from]=Math.min(t[e.from],1+t[e.to])})),t}(i),s=[],l=[];Object.keys(a).forEach((function(e){a[e]>t&&s.push(e)})),Bt(i,(function(e,t,n,r,o){var i=t+"-"+n;"available"===o.status&&-1!==s.indexOf(i)&&l.push(i)})),r._doCompaction(e,l,n)}))})),pn.prototype.compact=Le("compact",(function(e,t){"function"===typeof e&&(t=e,e={});var n=this;e=e||{},n._compactionQueue=n._compactionQueue||[],n._compactionQueue.push({opts:e,callback:t}),1===n._compactionQueue.length&&un(n)})),pn.prototype._compact=function(e,t){var n=this,r={return_docs:!1,last_seq:e.last_seq||0},o=[];n.changes(r).on("change",(function(e){o.push(n.compactDocument(e.id,0))})).on("complete",(function(e){var r=e.last_seq;Promise.all(o).then((function(){return _t(n,"_local/compaction",(function(e){return(!e.last_seq||e.last_seq<r)&&(e.last_seq=r,e)}))})).then((function(){t(null,{ok:!0})})).catch(t)})).on("error",t)},pn.prototype.get=Le("get",(function(e,t,n){if("function"===typeof t&&(n=t,t={}),"string"!==typeof e)return n(pt(Je));if(rn(e)&&"function"===typeof this._getLocal)return this._getLocal(e,n);var r=[],o=this;function i(){var i=[],a=r.length;if(!a)return n(null,i);r.forEach((function(r){o.get(e,{rev:r,revs:t.revs,latest:t.latest,attachments:t.attachments,binary:t.binary},(function(e,t){if(e)i.push({missing:r});else{for(var o,s=0,l=i.length;s<l;s++)if(i[s].ok&&i[s].ok._rev===t._rev){o=!0;break}o||i.push({ok:t})}--a||n(null,i)}))}))}if(!t.open_revs)return this._get(e,t,(function(r,i){if(r)return r.docId=e,n(r);var a=i.doc,s=i.metadata,l=i.ctx;if(t.conflicts){var c=Yt(s);c.length&&(a._conflicts=c)}if(nn(s,a._rev)&&(a._deleted=!0),t.revs||t.revs_info){for(var u=a._rev.split("-"),p=parseInt(u[0],10),d=u[1],h=Xt(s.rev_tree),f=null,g=0;g<h.length;g++){var v=h[g],m=v.ids.map((function(e){return e.id})).indexOf(d);(m===p-1||!f&&-1!==m)&&(f=v)}if(!f)return(r=new Error("invalid rev tree")).docId=e,n(r);var y=f.ids.map((function(e){return e.id})).indexOf(a._rev.split("-")[1])+1,b=f.ids.length-y;if(f.ids.splice(y,b),f.ids.reverse(),t.revs&&(a._revisions={start:f.pos+f.ids.length-1,ids:f.ids.map((function(e){return e.id}))}),t.revs_info){var w=f.pos+f.ids.length;a._revs_info=f.ids.map((function(e){return{rev:--w+"-"+e.id,status:e.opts.status}}))}}if(t.attachments&&a._attachments){var C=a._attachments,x=Object.keys(C).length;if(0===x)return n(null,a);Object.keys(C).forEach((function(e){this._getAttachment(a._id,e,C[e],{rev:a._rev,binary:t.binary,ctx:l},(function(t,r){var o=a._attachments[e];o.data=r,delete o.stub,delete o.length,--x||n(null,a)}))}),o)}else{if(a._attachments)for(var S in a._attachments)a._attachments.hasOwnProperty(S)&&(a._attachments[S].stub=!0);n(null,a)}}));if("all"===t.open_revs)this._getRevisionTree(e,(function(e,t){if(e)return n(e);r=Ut(t).map((function(e){return e.rev})),i()}));else{if(!Array.isArray(t.open_revs))return n(pt(nt,"function_clause"));r=t.open_revs;for(var a=0;a<r.length;a++){var s=r[a];if("string"!==typeof s||!/^\d+-/.test(s))return n(pt(ct))}i()}})),pn.prototype.getAttachment=Le("getAttachment",(function(e,t,n,r){var o=this;n instanceof Function&&(r=n,n={}),this._get(e,n,(function(i,a){return i?r(i):a.doc._attachments&&a.doc._attachments[t]?(n.ctx=a.ctx,n.binary=!0,void o._getAttachment(e,t,a.doc._attachments[t],n,r)):r(pt(Qe))}))})),pn.prototype.allDocs=Le("allDocs",(function(e,t){if("function"===typeof e&&(t=e,e={}),e.skip="undefined"!==typeof e.skip?e.skip:0,e.start_key&&(e.startkey=e.start_key),e.end_key&&(e.endkey=e.end_key),"keys"in e){if(!Array.isArray(e.keys))return t(new TypeError("options.keys must be an array"));var n=["startkey","endkey","key"].filter((function(t){return t in e}))[0];if(n)return void t(pt(ot,"Query parameter `"+n+"` is not compatible with multi-get"));if(!vt(this)&&(function(e){var t="limit"in e?e.keys.slice(e.skip,e.limit+e.skip):e.skip>0?e.keys.slice(e.skip):e.keys;e.keys=t,e.skip=0,delete e.limit,e.descending&&(t.reverse(),e.descending=!1)}(e),0===e.keys.length))return this._allDocs({limit:0},t)}return this._allDocs(e,t)})),pn.prototype.changes=function(e,t){return"function"===typeof e&&(t=e,e={}),(e=e||{}).return_docs="return_docs"in e?e.return_docs:!e.live,new on(this,e,t)},pn.prototype.close=Le("close",(function(e){return this._closed=!0,this.emit("closed"),this._close(e)})),pn.prototype.info=Le("info",(function(e){var t=this;this._info((function(n,r){if(n)return e(n);r.db_name=r.db_name||t.name,r.auto_compaction=!(!t.auto_compaction||vt(t)),r.adapter=t.adapter,e(null,r)}))})),pn.prototype.id=Le("id",(function(e){return this._id(e)})),pn.prototype.type=function(){return"function"===typeof this._type?this._type():this.adapter},pn.prototype.bulkDocs=Le("bulkDocs",(function(e,t,n){if("function"===typeof t&&(n=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return n(pt($e));for(var r=0;r<e.docs.length;++r)if("object"!==typeof e.docs[r]||Array.isArray(e.docs[r]))return n(pt(st));var o;if(e.docs.forEach((function(e){e._attachments&&Object.keys(e._attachments).forEach((function(t){o=o||function(e){return"_"===e.charAt(0)&&e+" is not a valid attachment name, attachment names cannot start with '_'"}(t),e._attachments[t].content_type||Ue("warn","Attachment",t,"on document",e._id,"is missing content_type")}))})),o)return n(pt(at,o));"new_edits"in t||(t.new_edits=!("new_edits"in e)||e.new_edits);var i=this;t.new_edits||vt(i)||e.docs.sort(cn),function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n._deleted)delete n._attachments;else if(n._attachments)for(var r=Object.keys(n._attachments),o=0;o<r.length;o++){var i=r[o];n._attachments[i]=Fe(n._attachments[i],["data","digest","content_type","length","revpos","stub"])}}}(e.docs);var a=e.docs.map((function(e){return e._id}));return this._bulkDocs(e,t,(function(e,r){if(e)return n(e);if(t.new_edits||(r=r.filter((function(e){return e.error}))),!vt(i))for(var o=0,s=r.length;o<s;o++)r[o].id=r[o].id||a[o];n(null,r)}))})),pn.prototype.registerDependentDatabase=Le("registerDependentDatabase",(function(e,t){var n=new this.constructor(e,this.__opts);_t(this,"_local/_pouch_dependentDbs",(function(t){return t.dependentDbs=t.dependentDbs||{},!t.dependentDbs[e]&&(t.dependentDbs[e]=!0,t)})).then((function(){t(null,{db:n})})).catch(t)})),pn.prototype.destroy=Le("destroy",(function(e,t){"function"===typeof e&&(t=e,e={});var n=this,r=!("use_prefix"in n)||n.use_prefix;function o(){n._destroy(e,(function(e,r){if(e)return t(e);n._destroyed=!0,n.emit("destroyed"),t(null,r||{ok:!0})}))}if(vt(n))return o();n.get("_local/_pouch_dependentDbs",(function(e,i){if(e)return 404!==e.status?t(e):o();var a=i.dependentDbs,s=n.constructor,l=Object.keys(a).map((function(e){var t=r?e.replace(new RegExp("^"+s.prefix),""):e;return new s(t,n.__opts).destroy()}));Promise.all(l).then(o,t)}))})),dn.prototype.execute=function(){var e;if(this.failed)for(;e=this.queue.shift();)e(this.failed);else for(;e=this.queue.shift();)e()},dn.prototype.fail=function(e){this.failed=e,this.execute()},dn.prototype.ready=function(e){this.isReady=!0,this.db=e,this.execute()},dn.prototype.addTask=function(e){this.queue.push(e),this.failed&&this.execute()},Se()(hn,pn);var fn="undefined"!==typeof AbortController?AbortController:function(){return{abort:function(){}}},gn=fetch,vn=Headers;hn.adapters={},hn.preferredAdapters=[],hn.prefix="_pouch_";var mn=new(_e());!function(e){Object.keys(_e().prototype).forEach((function(t){"function"===typeof _e().prototype[t]&&(e[t]=mn[t].bind(mn))}));var t=e._destructionListeners=new se;e.on("ref",(function(e){t.has(e.name)||t.set(e.name,[]),t.get(e.name).push(e)})),e.on("unref",(function(e){if(t.has(e.name)){var n=t.get(e.name),r=n.indexOf(e);r<0||(n.splice(r,1),n.length>1?t.set(e.name,n):t.delete(e.name))}})),e.on("destroyed",(function(e){if(t.has(e)){var n=t.get(e);t.delete(e),n.forEach((function(e){e.emit("destroyed",!0)}))}}))}(hn),hn.adapter=function(e,t,n){t.valid()&&(hn.adapters[e]=t,n&&hn.preferredAdapters.push(e))},hn.plugin=function(e){if("function"===typeof e)e(hn);else{if("object"!==typeof e||0===Object.keys(e).length)throw new Error('Invalid plugin: got "'+e+'", expected an object or a function');Object.keys(e).forEach((function(t){hn.prototype[t]=e[t]}))}return this.__defaults&&(hn.__defaults=qe({},this.__defaults)),hn},hn.defaults=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);n=n||{},e&&"object"===typeof e&&(e=(n=e).name,delete n.name),n=qe({},t.__defaults,n),hn.call(this,e,n)}return Se()(t,hn),t.preferredAdapters=hn.preferredAdapters.slice(),Object.keys(hn).forEach((function(e){e in t||(t[e]=hn[e])})),t.__defaults=qe({},this.__defaults,e),t},hn.fetch=function(e,t){return gn(e,t)};function yn(e,t){for(var n=e,r=0,o=t.length;r<o;r++){if(!(n=n[t[r]]))break}return n}function bn(e){for(var t=[],n="",r=0,o=e.length;r<o;r++){var i=e[r];"."===i?r>0&&"\\"===e[r-1]?n=n.substring(0,n.length-1)+".":(t.push(n),n=""):n+=i}return t.push(n),t}var wn=["$or","$nor","$not"];function Cn(e){return wn.indexOf(e)>-1}function xn(e){return Object.keys(e)[0]}function Sn(e){var t={};return e.forEach((function(e){Object.keys(e).forEach((function(n){var r=e[n];if("object"!==typeof r&&(r={$eq:r}),Cn(n))t[n]=r instanceof Array?r.map((function(e){return Sn([e])})):Sn([r]);else{var o=t[n]=t[n]||{};Object.keys(r).forEach((function(e){var t=r[e];return"$gt"===e||"$gte"===e?function(e,t,n){if("undefined"!==typeof n.$eq)return;"undefined"!==typeof n.$gte?"$gte"===e?t>n.$gte&&(n.$gte=t):t>=n.$gte&&(delete n.$gte,n.$gt=t):"undefined"!==typeof n.$gt?"$gte"===e?t>n.$gt&&(delete n.$gt,n.$gte=t):t>n.$gt&&(n.$gt=t):n[e]=t}(e,t,o):"$lt"===e||"$lte"===e?function(e,t,n){if("undefined"!==typeof n.$eq)return;"undefined"!==typeof n.$lte?"$lte"===e?t<n.$lte&&(n.$lte=t):t<=n.$lte&&(delete n.$lte,n.$lt=t):"undefined"!==typeof n.$lt?"$lte"===e?t<n.$lt&&(delete n.$lt,n.$lte=t):t<n.$lt&&(n.$lt=t):n[e]=t}(e,t,o):"$ne"===e?function(e,t){"$ne"in t?t.$ne.push(e):t.$ne=[e]}(t,o):"$eq"===e?function(e,t){delete t.$gt,delete t.$gte,delete t.$lt,delete t.$lte,delete t.$ne,t.$eq=e}(t,o):void(o[e]=t)}))}}))})),t}function En(e){for(var t in e){if(Array.isArray(e))for(var n in e)e[n].$and&&(e[n]=Sn(e[n].$and));var r=e[t];"object"===typeof r&&En(r)}return e}function _n(e,t){for(var n in e){"$and"===n&&(t=!0);var r=e[n];"object"===typeof r&&(t=_n(r,t))}return t}function Rn(e){var t=Ne(e),n=!1;_n(t,!1)&&("$and"in(t=En(t))&&(t=Sn(t.$and)),n=!0),["$or","$nor"].forEach((function(e){e in t&&t[e].forEach((function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var r=t[n],o=e[r];"object"===typeof o&&null!==o||(e[r]={$eq:o})}}))})),"$not"in t&&(t.$not=Sn([t.$not]));for(var r=Object.keys(t),o=0;o<r.length;o++){var i=r[o],a=t[i];"object"!==typeof a||null===a?a={$eq:a}:"$ne"in a&&!n&&(a.$ne=[a.$ne]),t[i]=a}return t}var On=-324;function An(e,t){if(e===t)return 0;e=Pn(e),t=Pn(t);var n=Mn(e),r=Mn(t);if(n-r!==0)return n-r;switch(typeof e){case"number":return e-t;case"boolean":return e<t?-1:1;case"string":return function(e,t){return e===t?0:e>t?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var o=An(e[r],t[r]);if(0!==o)return o}return e.length===t.length?0:e.length>t.length?1:-1}(e,t):function(e,t){for(var n=Object.keys(e),r=Object.keys(t),o=Math.min(n.length,r.length),i=0;i<o;i++){var a=An(n[i],r[i]);if(0!==a)return a;if(0!==(a=An(e[n[i]],t[r[i]])))return a}return n.length===r.length?0:n.length>r.length?1:-1}(e,t)}function Pn(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var n=e.length;e=new Array(n);for(var r=0;r<n;r++)e[r]=Pn(t[r])}else{if(e instanceof Date)return e.toJSON();if(null!==e)for(var o in e={},t)if(t.hasOwnProperty(o)){var i=t[o];"undefined"!==typeof i&&(e[o]=Pn(i))}}}return e}function Tn(e){if(null!==e)switch(typeof e){case"boolean":return e?1:0;case"number":return function(e){if(0===e)return"1";var t=e.toExponential().split(/e\+?/),n=parseInt(t[1],10),r=e<0,o=r?"0":"2",i=function(e,t,n){var r=function(e,t,n){for(var r="",o=n-e.length;r.length<o;)r+=t;return r}(e,t,n);return r+e}(((r?-n:n)-On).toString(),"0",3);o+=""+i;var a=Math.abs(parseFloat(t[0]));r&&(a=10-a);var s=a.toFixed(20);return s=s.replace(/\.?0+$/,""),o+=""+s}(e);case"string":return e.replace(/\u0002/g,"\x02\x02").replace(/\u0001/g,"\x01\x02").replace(/\u0000/g,"\x01\x01");case"object":var t=Array.isArray(e),n=t?e:Object.keys(e),r=-1,o=n.length,i="";if(t)for(;++r<o;)i+=Dn(n[r]);else for(;++r<o;){var a=n[r];i+=Dn(a)+Dn(e[a])}return i}return""}function Dn(e){return Mn(e=Pn(e))+""+Tn(e)+"\0"}function kn(e,t){var n,r=t;if("1"===e[t])n=0,t++;else{var o="0"===e[t];t++;var i="",a=e.substring(t,t+3),s=parseInt(a,10)+On;for(o&&(s=-s),t+=3;;){var l=e[t];if("\0"===l)break;i+=l,t++}n=1===(i=i.split(".")).length?parseInt(i,10):parseFloat(i[0]+"."+i[1]),o&&(n-=10),0!==s&&(n=parseFloat(n+"e"+s))}return{num:n,length:t-r}}function Nn(e,t){var n=e.pop();if(t.length){var r=t[t.length-1];n===r.element&&(t.pop(),r=t[t.length-1]);var o=r.element,i=r.index;if(Array.isArray(o))o.push(n);else if(i===e.length-2){o[e.pop()]=n}else e.push(n)}}function Mn(e){var t=["boolean","number","string","object"].indexOf(typeof e);return~t?null===e?1:Array.isArray(e)?5:t<3?t+2:t+3:Array.isArray(e)?5:void 0}function In(e,t,n){if(e=e.filter((function(e){return Ln(e.doc,t.selector,n)})),t.sort){var r=function(e){function t(t){return e.map((function(e){var n=bn(xn(e));return yn(t,n)}))}return function(e,n){var r=An(t(e.doc),t(n.doc));return 0!==r?r:function(e,t){return e<t?-1:e>t?1:0}(e.doc._id,n.doc._id)}}(t.sort);e=e.sort(r),"string"!==typeof t.sort[0]&&"desc"===(o=t.sort[0])[xn(o)]&&(e=e.reverse())}var o;if("limit"in t||"skip"in t){var i=t.skip||0,a=("limit"in t?t.limit:e.length)+i;e=e.slice(i,a)}return e}function Ln(e,t,n){return n.every((function(n){var r=t[n],o=bn(n),i=yn(e,o);return Cn(n)?function(e,t,n){if("$or"===e)return t.some((function(e){return Ln(n,e,Object.keys(e))}));if("$not"===e)return!Ln(n,t,Object.keys(t));return!t.find((function(e){return Ln(n,e,Object.keys(e))}))}(n,r,e):Fn(r,e,o,i)}))}function Fn(e,t,n,r){return!e||("object"===typeof e?Object.keys(e).every((function(o){var i=e[o];return function(e,t,n,r,o){if(!Vn[e])throw new Error('unknown operator "'+e+'" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, $nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all');return Vn[e](t,n,r,o)}(o,t,i,n,r)})):e===r)}function Gn(e){return"undefined"!==typeof e&&null!==e}function Hn(e){return"undefined"!==typeof e}function Wn(e,t){return t.some((function(t){return e instanceof Array?e.indexOf(t)>-1:e===t}))}var Vn={$elemMatch:function(e,t,n,r){return!!Array.isArray(r)&&(0!==r.length&&("object"===typeof r[0]?r.some((function(e){return Ln(e,t,Object.keys(t))})):r.some((function(r){return Fn(t,e,n,r)}))))},$allMatch:function(e,t,n,r){return!!Array.isArray(r)&&(0!==r.length&&("object"===typeof r[0]?r.every((function(e){return Ln(e,t,Object.keys(t))})):r.every((function(r){return Fn(t,e,n,r)}))))},$eq:function(e,t,n,r){return Hn(r)&&0===An(r,t)},$gte:function(e,t,n,r){return Hn(r)&&An(r,t)>=0},$gt:function(e,t,n,r){return Hn(r)&&An(r,t)>0},$lte:function(e,t,n,r){return Hn(r)&&An(r,t)<=0},$lt:function(e,t,n,r){return Hn(r)&&An(r,t)<0},$exists:function(e,t,n,r){return t?Hn(r):!Hn(r)},$mod:function(e,t,n,r){return Gn(r)&&function(e,t){var n=t[0],r=t[1];if(0===n)throw new Error("Bad divisor, cannot divide by zero");if(parseInt(n,10)!==n)throw new Error("Divisor is not an integer");if(parseInt(r,10)!==r)throw new Error("Modulus is not an integer");return parseInt(e,10)===e&&e%n===r}(r,t)},$ne:function(e,t,n,r){return t.every((function(e){return 0!==An(r,e)}))},$in:function(e,t,n,r){return Gn(r)&&Wn(r,t)},$nin:function(e,t,n,r){return Gn(r)&&!Wn(r,t)},$size:function(e,t,n,r){return Gn(r)&&function(e,t){return e.length===t}(r,t)},$all:function(e,t,n,r){return Array.isArray(r)&&function(e,t){return t.every((function(t){return e.indexOf(t)>-1}))}(r,t)},$regex:function(e,t,n,r){return Gn(r)&&function(e,t){return new RegExp(t).test(e)}(r,t)},$type:function(e,t,n,r){return function(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"===typeof e;case"number":return"number"===typeof e;case"string":return"string"===typeof e;case"array":return e instanceof Array;case"object":return"[object Object]"==={}.toString.call(e)}throw new Error(t+" not supported as a type.Please use one of object, string, array, number, boolean or null.")}(r,t)}};function jn(e,t){if(e.selector&&e.filter&&"_selector"!==e.filter){var n="string"===typeof e.filter?e.filter:"function";return t(new Error('selector invalid for filter "'+n+'"'))}t()}function Bn(e){e.view&&!e.filter&&(e.filter="_view"),e.selector&&!e.filter&&(e.filter="_selector"),e.filter&&"string"===typeof e.filter&&("_view"===e.filter?e.view=yt(e.view):e.filter=yt(e.filter))}function zn(e,t){return t.filter&&"string"===typeof t.filter&&!t.doc_ids&&!vt(e.db)}function Un(e,t){var n=t.complete;if("_view"===t.filter){if(!t.view||"string"!==typeof t.view){var r=pt(at,"`view` filter parameter not found or invalid.");return n(r)}var o=mt(t.view);e.db.get("_design/"+o[0],(function(r,i){if(e.isCancelled)return n(null,{status:"cancelled"});if(r)return n(dt(r));var a=i&&i.views&&i.views[o[1]]&&i.views[o[1]].map;if(!a)return n(pt(Qe,i.views?"missing json key: "+o[1]:"missing json key: views"));t.filter=Et(["return function(doc) {",' "use strict";'," var emitted = false;"," var emit = function (a, b) {"," emitted = true;"," };"," var view = "+a+";"," view(doc);"," if (emitted) {"," return true;"," }","};"].join("\n"),{}),e.doChanges(t)}))}else if(t.selector)t.filter=function(e){return function(e,t){if("object"!==typeof t)throw new Error("Selector error: expected a JSON object");var n=In([{doc:e}],{selector:t=Rn(t)},Object.keys(t));return n&&1===n.length}(e,t.selector)},e.doChanges(t);else{var i=mt(t.filter);e.db.get("_design/"+i[0],(function(r,o){if(e.isCancelled)return n(null,{status:"cancelled"});if(r)return n(dt(r));var a=o&&o.filters&&o.filters[i[1]];if(!a)return n(pt(Qe,o&&o.filters?"missing json key: "+i[1]:"missing json key: filters"));t.filter=Et('"use strict";\nreturn '+a+";",{}),e.doChanges(t)}))}}function Yn(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})}hn.plugin((function(e){e._changesFilterPlugin={validate:jn,normalize:Bn,shouldFilter:zn,filter:Un}})),hn.version="7.2.2";var Xn=Yn(["_id","_rev","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),qn=Yn(["_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function Kn(e){if(!/^\d+-/.test(e))return pt(ct);var t=e.indexOf("-"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:parseInt(n,10),id:r}}function $n(e,t,n){var r,o,i;n||(n={deterministic_revs:!0});var a={status:"available"};if(e._deleted&&(a.deleted=!0),t)if(e._id||(e._id=Vt()),o=Wt(e,n.deterministic_revs),e._rev){if((i=Kn(e._rev)).error)return i;e._rev_tree=[{pos:i.prefix,ids:[i.id,{status:"missing"},[[o,a,[]]]]}],r=i.prefix+1}else e._rev_tree=[{pos:1,ids:[o,a,[]]}],r=1;else if(e._revisions&&(e._rev_tree=function(e,t){for(var n=e.start-e.ids.length+1,r=e.ids,o=[r[0],t,[]],i=1,a=r.length;i<a;i++)o=[r[i],{status:"missing"},[o]];return[{pos:n,ids:o}]}(e._revisions,a),r=e._revisions.start,o=e._revisions.ids[0]),!e._rev_tree){if((i=Kn(e._rev)).error)return i;r=i.prefix,o=i.id,e._rev_tree=[{pos:r,ids:[o,a,[]]}]}gt(e._id),e._rev=r+"-"+o;var s={metadata:{},data:{}};for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var c="_"===l[0];if(c&&!Xn[l]){var u=pt(it,l);throw u.message=it.message+": "+l,u}c&&!qn[l]?s.metadata[l.slice(1)]=e[l]:s.data[l]=e[l]}return s}function Qn(e,t,n){var r=function(e){try{return Rt(e)}catch(Xw){return{error:pt(rt,"Attachment is not a valid base64 string")}}}(e.data);if(r.error)return n(r.error);e.length=r.length,e.data="blob"===t?Tt(r,e.content_type):"base64"===t?Ot(r):r,Gt(r,(function(t){e.digest="md5-"+t,n()}))}function Zn(e,t,n){if(e.stub)return n();"string"===typeof e.data?Qn(e,t,n):function(e,t,n){Gt(e.data,(function(r){e.digest="md5-"+r,e.length=e.data.size||e.data.length||0,"binary"===t?Nt(e.data,(function(t){e.data=t,n()})):"base64"===t?Mt(e.data,(function(t){e.data=t,n()})):n()}))}(e,t,n)}function Jn(e,t,n,r,o,i,a,s){if(function(e,t){for(var n,r=e.slice(),o=t.split("-"),i=parseInt(o[0],10),a=o[1];n=r.pop();){if(n.pos===i&&n.ids[0]===a)return!0;for(var s=n.ids[2],l=0,c=s.length;l<c;l++)r.push({pos:n.pos+1,ids:s[l]})}return!1}(t.rev_tree,n.metadata.rev)&&!s)return r[o]=n,i();var l=t.winningRev||jt(t),c="deleted"in t?t.deleted:nn(t,l),u="deleted"in n.metadata?n.metadata.deleted:nn(n.metadata),p=/^1-/.test(n.metadata.rev);if(c&&!u&&s&&p){var d=n.data;d._rev=l,d._id=n.metadata.id,n=$n(d,s)}var h=en(t.rev_tree,n.metadata.rev_tree[0],e);if(s&&(c&&u&&"new_leaf"!==h.conflicts||!c&&"new_leaf"!==h.conflicts||c&&!u&&"new_branch"===h.conflicts)){var f=pt(Ze);return r[o]=f,i()}var g=n.metadata.rev;n.metadata.rev_tree=h.tree,n.stemmedRevs=h.stemmedRevs||[],t.rev_map&&(n.metadata.rev_map=t.rev_map);var v=jt(n.metadata),m=nn(n.metadata,v),y=c===m?0:c<m?-1:1;a(n,v,m,g===v?m:nn(n.metadata,g),!0,y,o,i)}function er(e,t,n,r,o,i,a,s,l){e=e||1e3;var c=s.new_edits,u=new se,p=0,d=t.length;function h(){++p===d&&l&&l()}t.forEach((function(e,t){if(e._id&&rn(e._id)){var r=e._deleted?"_removeLocal":"_putLocal";n[r](e,{ctx:o},(function(e,n){i[t]=e||n,h()}))}else{var a=e.metadata.id;u.has(a)?(d--,u.get(a).push([e,t])):u.set(a,[[e,t]])}})),u.forEach((function(t,n){var o=0;function l(){++o<t.length?u():h()}function u(){var u=t[o],p=u[0],d=u[1];if(r.has(n))Jn(e,r.get(n),p,i,d,l,a,c);else{var h=en([],p.metadata.rev_tree[0],e);p.metadata.rev_tree=h.tree,p.stemmedRevs=h.stemmedRevs||[],function(e,t,n){var r=jt(e.metadata),o=nn(e.metadata,r);if("was_delete"in s&&o)return i[t]=pt(Qe,"deleted"),n();var l=c&&function(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}(e);if(l){var u=pt(Ze);return i[t]=u,n()}a(e,r,o,o,!1,o?0:1,t,n)}(p,d,l)}}u()}))}var tr="document-store",nr="by-sequence",rr="attach-store",or="attach-seq-store",ir="meta-store",ar="local-store",sr="detect-blob-support";function lr(e){try{return JSON.stringify(e)}catch(Xw){return be.stringify(e)}}function cr(e){return function(t){var n="unknown_error";t.target&&t.target.error&&(n=t.target.error.name||t.target.error.message),e(pt(lt,n,t.type))}}function ur(e,t,n){return{data:lr(e),winningRev:t,deletedOrLocal:n?"1":"0",seq:e.seq,id:e.id}}function pr(e){if(!e)return null;var t=function(e){try{return JSON.parse(e)}catch(Xw){return be.parse(e)}}(e.data);return t.winningRev=e.winningRev,t.deleted="1"===e.deletedOrLocal,t.seq=e.seq,t}function dr(e){if(!e)return e;var t=e._doc_id_rev.lastIndexOf(":");return e._id=e._doc_id_rev.substring(0,t-1),e._rev=e._doc_id_rev.substring(t+1),delete e._doc_id_rev,e}function hr(e,t,n,r){n?r(e?"string"!==typeof e?e:Dt(e,t):At([""],{type:t})):e?"string"!==typeof e?kt(e,(function(e){r(Ot(e))})):r(e):r("")}function fr(e,t,n,r){var o=Object.keys(e._attachments||{});if(!o.length)return r&&r();var i=0;function a(){++i===o.length&&r&&r()}o.forEach((function(r){t.attachments&&t.include_docs?function(e,t){var r=e._attachments[t],o=r.digest;n.objectStore(rr).get(o).onsuccess=function(e){r.body=e.target.result.body,a()}}(e,r):(e._attachments[r].stub=!0,a())}))}function gr(e,t){return Promise.all(e.map((function(e){if(e.doc&&e.doc._attachments){var n=Object.keys(e.doc._attachments);return Promise.all(n.map((function(n){var r=e.doc._attachments[n];if("body"in r){var o=r.body,i=r.content_type;return new Promise((function(a){hr(o,i,t,(function(t){e.doc._attachments[n]=qe(Fe(r,["digest","content_type"]),{data:t}),a()}))}))}})))}})))}function vr(e,t,n){var r=[],o=n.objectStore(nr),i=n.objectStore(rr),a=n.objectStore(or),s=e.length;function l(){--s||function(){if(!r.length)return;r.forEach((function(e){a.index("digestSeq").count(IDBKeyRange.bound(e+"::",e+"::\uffff",!1,!1)).onsuccess=function(t){t.target.result||i.delete(e)}}))}()}e.forEach((function(e){var n=o.index("_doc_id_rev"),i=t+"::"+e;n.getKey(i).onsuccess=function(e){var t=e.target.result;if("number"!==typeof t)return l();o.delete(t),a.index("seq").openCursor(IDBKeyRange.only(t)).onsuccess=function(e){var t=e.target.result;if(t){var n=t.value.digestSeq.split("::")[0];r.push(n),a.delete(t.primaryKey),t.continue()}else l()}}}))}function mr(e,t,n){try{return{txn:e.transaction(t,n)}}catch(r){return{error:r}}}var yr=new ze;function br(e,t,n,r,o,i){for(var a,s,l,c,u,p,d,h,f=t.docs,g=0,v=f.length;g<v;g++){var m=f[g];m._id&&rn(m._id)||(m=f[g]=$n(m,n.new_edits,e)).error&&!d&&(d=m)}if(d)return i(d);var y=!1,b=0,w=new Array(f.length),C=new se,x=!1,S=r._meta.blobSupport?"blob":"base64";function E(){y=!0,_()}function _(){h&&y&&(h.docCount+=b,p.put(h))}function R(){x||(yr.notify(r._meta.name),i(null,w))}function O(e,t,n,r,o,i,a,s){e.metadata.winningRev=t,e.metadata.deleted=n;var l=e.data;if(l._id=e.metadata.id,l._rev=e.metadata.rev,r&&(l._deleted=!0),l._attachments&&Object.keys(l._attachments).length)return function(e,t,n,r,o,i){var a=e.data,s=0,l=Object.keys(a._attachments);function u(){s===l.length&&A(e,t,n,r,o,i)}function p(){s++,u()}l.forEach((function(n){var r=e.data._attachments[n];if(r.stub)s++,u();else{var o=r.data;delete r.data,r.revpos=parseInt(t,10),function(e,t,n){c.count(e).onsuccess=function(r){if(r.target.result)return n();var o={digest:e,body:t};c.put(o).onsuccess=n}}(r.digest,o,p)}}))}(e,t,n,o,a,s);b+=i,_(),A(e,t,n,o,a,s)}function A(e,t,n,o,i,c){var p=e.data,d=e.metadata;function h(i){var l=e.stemmedRevs||[];o&&r.auto_compaction&&(l=l.concat(function(e){var t=[];return Bt(e.rev_tree,(function(e,n,r,o,i){"available"!==i.status||e||(t.push(n+"-"+r),i.status="missing")})),t}(e.metadata))),l&&l.length&&vr(l,e.metadata.id,a),d.seq=i.target.result;var c=ur(d,t,n);s.put(c).onsuccess=f}function f(){w[i]={ok:!0,id:d.id,rev:d.rev},C.set(e.metadata.id,e.metadata),function(e,t,n){var r=0,o=Object.keys(e.data._attachments||{});if(!o.length)return n();function i(){++r===o.length&&n()}function a(n){var r=e.data._attachments[n].digest,o=u.put({seq:t,digestSeq:r+"::"+t});o.onsuccess=i,o.onerror=function(e){e.preventDefault(),e.stopPropagation(),i()}}for(var s=0;s<o.length;s++)a(o[s])}(e,d.seq,c)}p._doc_id_rev=d.id+"::"+d.rev,delete p._id,delete p._rev;var g=l.put(p);g.onsuccess=h,g.onerror=function(e){e.preventDefault(),e.stopPropagation(),l.index("_doc_id_rev").getKey(p._doc_id_rev).onsuccess=function(e){l.put(p,e.target.result).onsuccess=h}}}!function(e,t,n){if(!e.length)return n();var r,o=0;function i(){o++,e.length===o&&(r?n(r):n())}e.forEach((function(e){var n=e.data&&e.data._attachments?Object.keys(e.data._attachments):[],o=0;if(!n.length)return i();function a(e){r=e,++o===n.length&&i()}for(var s in e.data._attachments)e.data._attachments.hasOwnProperty(s)&&Zn(e.data._attachments[s],t,a)}))}(f,S,(function(t){if(t)return i(t);!function(){var t=mr(o,[tr,nr,rr,ar,or,ir],"readwrite");if(t.error)return i(t.error);(a=t.txn).onabort=cr(i),a.ontimeout=cr(i),a.oncomplete=R,s=a.objectStore(tr),l=a.objectStore(nr),c=a.objectStore(rr),u=a.objectStore(or),(p=a.objectStore(ir)).get(ir).onsuccess=function(e){h=e.target.result,_()},function(e){var t=[];if(f.forEach((function(e){e.data&&e.data._attachments&&Object.keys(e.data._attachments).forEach((function(n){var r=e.data._attachments[n];r.stub&&t.push(r.digest)}))})),!t.length)return e();var n,r=0;function o(){++r===t.length&&e(n)}t.forEach((function(e){!function(e,t){c.get(e).onsuccess=function(n){if(n.target.result)t();else{var r=pt(ut,"unknown stub attachment with digest "+e);r.status=412,t(r)}}}(e,(function(e){e&&!n&&(n=e),o()}))}))}((function(t){if(t)return x=!0,i(t);!function(){if(!f.length)return;var t=0;function o(){++t===f.length&&er(e.revs_limit,f,r,C,a,w,O,n,E)}function i(e){var t=pr(e.target.result);t&&C.set(t.id,t),o()}for(var l=0,c=f.length;l<c;l++){var u=f[l];if(u._id&&rn(u._id))o();else s.get(u.metadata.id).onsuccess=i}}()}))}()}))}function wr(e,t,n,r,o){var i,a,s;function l(e){a=e.target.result,i&&o(i,a,s)}function c(e){i=e.target.result,a&&o(i,a,s)}function u(e){var t=e.target.result;if(!t)return o();o([t.key],[t.value],t)}-1===r&&(r=1e3),"function"===typeof e.getAll&&"function"===typeof e.getAllKeys&&r>1&&!n?(s={continue:function(){if(!i.length)return o();var n,s=i[i.length-1];if(t&&t.upper)try{n=IDBKeyRange.bound(s,t.upper,!0,t.upperOpen)}catch(Xw){if("DataError"===Xw.name&&0===Xw.code)return o()}else n=IDBKeyRange.lowerBound(s,!0);t=n,i=null,a=null,e.getAll(t,r).onsuccess=l,e.getAllKeys(t,r).onsuccess=c}},e.getAll(t,r).onsuccess=l,e.getAllKeys(t,r).onsuccess=c):n?e.openCursor(t,"prev").onsuccess=u:e.openCursor(t).onsuccess=u}function Cr(e,t,n){var r,o,i="startkey"in e&&e.startkey,a="endkey"in e&&e.endkey,s="key"in e&&e.key,l="keys"in e&&e.keys,c=e.skip||0,u="number"===typeof e.limit?e.limit:-1,p=!1!==e.inclusive_end;if(!l&&(r=function(e,t,n,r,o){try{if(e&&t)return o?IDBKeyRange.bound(t,e,!n,!1):IDBKeyRange.bound(e,t,!1,!n);if(e)return o?IDBKeyRange.upperBound(e):IDBKeyRange.lowerBound(e);if(t)return o?IDBKeyRange.lowerBound(t,!n):IDBKeyRange.upperBound(t,!n);if(r)return IDBKeyRange.only(r)}catch(Xw){return{error:Xw}}return null}(i,a,p,s,e.descending),(o=r&&r.error)&&("DataError"!==o.name||0!==o.code)))return n(pt(lt,o.name,o.message));var d=[tr,nr,ir];e.attachments&&d.push(rr);var h=mr(t,d,"readonly");if(h.error)return n(h.error);var f=h.txn;f.oncomplete=function(){e.attachments?gr(C,e.binary).then(_):_()},f.onabort=cr(n);var g,v,m=f.objectStore(tr),y=f.objectStore(nr),b=f.objectStore(ir),w=y.index("_doc_id_rev"),C=[];function x(t,n){var r={id:n.id,key:n.id,value:{rev:t}};n.deleted?l&&(C.push(r),r.value.deleted=!0,r.doc=null):c--<=0&&(C.push(r),e.include_docs&&function(t,n,r){var o=t.id+"::"+r;w.get(o).onsuccess=function(r){if(n.doc=dr(r.target.result)||{},e.conflicts){var o=Yt(t);o.length&&(n.doc._conflicts=o)}fr(n.doc,e,f)}}(n,r,t))}function S(e){for(var t=0,n=e.length;t<n&&C.length!==u;t++){var r=e[t];if(r.error&&l)C.push(r);else{var o=pr(r);x(o.winningRev,o)}}}function E(e,t,n){n&&(S(t),C.length<u&&n.continue())}function _(){var t={total_rows:g,offset:e.skip,rows:C};e.update_seq&&void 0!==v&&(t.update_seq=v),n(null,t)}return b.get(ir).onsuccess=function(e){g=e.target.result.docCount},e.update_seq&&function(e,t){function n(e){var n=e.target.result,r=void 0;return n&&n.key&&(r=n.key),t({target:{result:[r]}})}e.openCursor(null,"prev").onsuccess=n}(y,(function(e){e.target.result&&e.target.result.length>0&&(v=e.target.result[0])})),o||0===u?void 0:l?function(e,t,n){var r=new Array(e.length),o=0;e.forEach((function(i,a){t.get(i).onsuccess=function(t){t.target.result?r[a]=t.target.result:r[a]={key:i,error:"not_found"},++o===e.length&&n(e,r,{})}}))}(e.keys,m,E):-1===u?function(e,t,n){if("function"!==typeof e.getAll){var r=[];e.openCursor(t).onsuccess=function(e){var t=e.target.result;t?(r.push(t.value),t.continue()):n({target:{result:r}})}}else e.getAll(t).onsuccess=n}(m,r,(function(t){var n=t.target.result;e.descending&&(n=n.reverse()),S(n)})):void wr(m,r,e.descending,u+c,E)}var xr=!1,Sr=[];function Er(){!xr&&Sr.length&&(xr=!0,Sr.shift()())}function _r(e,t,n,r){if((e=Ne(e)).continuous){var o=n+":"+Vt();return yr.addListener(n,o,t,e),yr.notify(n),{cancel:function(){yr.removeListener(n,o)}}}var i=e.doc_ids&&new ae(e.doc_ids);e.since=e.since||0;var a=e.since,s="limit"in e?e.limit:-1;0===s&&(s=1);var l,c,u,p,d=[],h=0,f=ht(e),g=new se;function v(e,t,n,r){if(n.seq!==t)return r();if(n.winningRev===e._rev)return r(n,e);var o=e._id+"::"+n.winningRev;p.get(o).onsuccess=function(e){r(n,dr(e.target.result))}}function m(){e.complete(null,{results:d,last_seq:a})}var y=[tr,nr];e.attachments&&y.push(rr);var b=mr(r,y,"readonly");if(b.error)return e.complete(b.error);(l=b.txn).onabort=cr(e.complete),l.oncomplete=function(){!e.continuous&&e.attachments?gr(d).then(m):m()},c=l.objectStore(nr),u=l.objectStore(tr),p=c.index("_doc_id_rev"),wr(c,e.since&&!e.descending?IDBKeyRange.lowerBound(e.since,!0):null,e.descending,s,(function(t,n,r){if(r&&t.length){var o=new Array(t.length),c=new Array(t.length),p=0;n.forEach((function(n,a){!function(e,t,n){if(i&&!i.has(e._id))return n();var r=g.get(e._id);if(r)return v(e,t,r,n);u.get(e._id).onsuccess=function(o){r=pr(o.target.result),g.set(e._id,r),v(e,t,r,n)}}(dr(n),t[a],(function(n,i){c[a]=n,o[a]=i,++p===t.length&&function(){for(var t=[],n=0,i=o.length;n<i&&h!==s;n++){var a=o[n];if(a){var l=c[n];t.push(m(l,a))}}Promise.all(t).then((function(t){for(var n=0,r=t.length;n<r;n++)t[n]&&e.onChange(t[n])})).catch(e.complete),h!==s&&r.continue()}()}))}))}function m(t,n){var r=e.processChange(n,t,e);a=r.seq=t.seq;var o=f(r);return"object"===typeof o?Promise.reject(o):o?(h++,e.return_docs&&d.push(r),e.attachments&&e.include_docs?new Promise((function(t){fr(n,e,l,(function(){gr([r],e.binary).then((function(){t(r)}))}))})):Promise.resolve(r)):Promise.resolve()}}))}var Rr,Or=new se,Ar=new se;function Pr(e,t){var n=this;!function(e,t,n){Sr.push((function(){e((function(e,r){!function(e,t,n,r){try{e(t,n)}catch(t){r.emit("error",t)}}(t,e,r,n),xr=!1,fe()((function(){Er()}))}))})),Er()}((function(t){!function(e,t,n){var r=t.name,o=null;function i(e){var t=e.createObjectStore(tr,{keyPath:"id"});e.createObjectStore(nr,{autoIncrement:!0}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0}),e.createObjectStore(rr,{keyPath:"digest"}),e.createObjectStore(ir,{keyPath:"id",autoIncrement:!1}),e.createObjectStore(sr),t.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),e.createObjectStore(ar,{keyPath:"_id"});var n=e.createObjectStore(or,{autoIncrement:!0});n.createIndex("seq","seq"),n.createIndex("digestSeq","digestSeq",{unique:!0})}function a(e,t){var n=e.objectStore(tr);n.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),n.openCursor().onsuccess=function(e){var r=e.target.result;if(r){var o=r.value,i=nn(o);o.deletedOrLocal=i?"1":"0",n.put(o),r.continue()}else t()}}function s(e){e.createObjectStore(ar,{keyPath:"_id"}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0})}function l(e,t){var n=e.objectStore(ar),r=e.objectStore(tr),o=e.objectStore(nr);r.openCursor().onsuccess=function(e){var i=e.target.result;if(i){var a=i.value,s=a.id,l=rn(s),c=jt(a);if(l){var u=s+"::"+c,p=s+"::",d=s+"::~",h=o.index("_doc_id_rev"),f=IDBKeyRange.bound(p,d,!1,!1),g=h.openCursor(f);g.onsuccess=function(e){if(g=e.target.result){var t=g.value;t._doc_id_rev===u&&n.put(t),o.delete(g.primaryKey),g.continue()}else r.delete(i.primaryKey),i.continue()}}else i.continue()}else t&&t()}}function c(e){var t=e.createObjectStore(or,{autoIncrement:!0});t.createIndex("seq","seq"),t.createIndex("digestSeq","digestSeq",{unique:!0})}function u(e,t){var n=e.objectStore(nr),r=e.objectStore(rr),o=e.objectStore(or);r.count().onsuccess=function(e){if(!e.target.result)return t();n.openCursor().onsuccess=function(e){var n=e.target.result;if(!n)return t();for(var r=n.value,i=n.primaryKey,a=Object.keys(r._attachments||{}),s={},l=0;l<a.length;l++){s[r._attachments[a[l]].digest]=!0}var c=Object.keys(s);for(l=0;l<c.length;l++){var u=c[l];o.put({seq:i,digestSeq:u+"::"+i})}n.continue()}}}function p(e){function t(e){return e.data?pr(e):(e.deleted="1"===e.deletedOrLocal,e)}var n=e.objectStore(nr),r=e.objectStore(tr);r.openCursor().onsuccess=function(e){var o=e.target.result;if(o){var i=t(o.value);if(i.winningRev=i.winningRev||jt(i),i.seq)return s();a()}function a(){var e=i.id+"::",t=i.id+"::\uffff",r=n.index("_doc_id_rev").openCursor(IDBKeyRange.bound(e,t)),o=0;r.onsuccess=function(e){var t=e.target.result;if(!t)return i.seq=o,s();var n=t.primaryKey;n>o&&(o=n),t.continue()}}function s(){var e=ur(i,i.winningRev,i.deleted);r.put(e).onsuccess=function(){o.continue()}}}}e._meta=null,e._remote=!1,e.type=function(){return"idb"},e._id=Ie((function(t){t(null,e._meta.instanceId)})),e._bulkDocs=function(n,r,i){br(t,n,r,e,o,i)},e._get=function(e,t,n){var r,i,a,s=t.ctx;if(!s){var l=mr(o,[tr,nr,rr],"readonly");if(l.error)return n(l.error);s=l.txn}function c(){n(a,{doc:r,metadata:i,ctx:s})}s.objectStore(tr).get(e).onsuccess=function(e){if(!(i=pr(e.target.result)))return a=pt(Qe,"missing"),c();var n;if(t.rev)n=t.latest?function(e,t){for(var n,r=t.rev_tree.slice();n=r.pop();){var o=n.pos,i=n.ids,a=i[0],s=i[1],l=i[2],c=0===l.length,u=n.history?n.history.slice():[];if(u.push({id:a,pos:o,opts:s}),c)for(var p=0,d=u.length;p<d;p++){var h=u[p];if(h.pos+"-"+h.id===e)return o+"-"+a}for(var f=0,g=l.length;f<g;f++)r.push({pos:o+1,ids:l[f],history:u})}throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}(t.rev,i):t.rev;else if(n=i.winningRev,nn(i))return a=pt(Qe,"deleted"),c();var o=s.objectStore(nr),l=i.id+"::"+n;o.index("_doc_id_rev").get(l).onsuccess=function(e){if((r=e.target.result)&&(r=dr(r)),!r)return a=pt(Qe,"missing"),c();c()}}},e._getAttachment=function(e,t,n,r,i){var a;if(r.ctx)a=r.ctx;else{var s=mr(o,[tr,nr,rr],"readonly");if(s.error)return i(s.error);a=s.txn}var l=n.digest,c=n.content_type;a.objectStore(rr).get(l).onsuccess=function(e){hr(e.target.result.body,c,r.binary,(function(e){i(null,e)}))}},e._info=function(t){var n,r,i=mr(o,[ir,nr],"readonly");if(i.error)return t(i.error);var a=i.txn;a.objectStore(ir).get(ir).onsuccess=function(e){r=e.target.result.docCount},a.objectStore(nr).openCursor(null,"prev").onsuccess=function(e){var t=e.target.result;n=t?t.key:0},a.oncomplete=function(){t(null,{doc_count:r,update_seq:n,idb_attachment_format:e._meta.blobSupport?"binary":"base64"})}},e._allDocs=function(e,t){Cr(e,o,t)},e._changes=function(t){return _r(t,e,r,o)},e._close=function(e){o.close(),Or.delete(r),e()},e._getRevisionTree=function(e,t){var n=mr(o,[tr],"readonly");if(n.error)return t(n.error);n.txn.objectStore(tr).get(e).onsuccess=function(e){var n=pr(e.target.result);n?t(null,n.rev_tree):t(pt(Qe))}},e._doCompaction=function(e,t,n){var r=mr(o,[tr,nr,rr,or],"readwrite");if(r.error)return n(r.error);var i=r.txn;i.objectStore(tr).get(e).onsuccess=function(n){var r=pr(n.target.result);Bt(r.rev_tree,(function(e,n,r,o,i){var a=n+"-"+r;-1!==t.indexOf(a)&&(i.status="missing")})),vr(t,e,i);var o=r.winningRev,a=r.deleted;i.objectStore(tr).put(ur(r,o,a))},i.onabort=cr(n),i.oncomplete=function(){n()}},e._getLocal=function(e,t){var n=mr(o,[ar],"readonly");if(n.error)return t(n.error);var r=n.txn.objectStore(ar).get(e);r.onerror=cr(t),r.onsuccess=function(e){var n=e.target.result;n?(delete n._doc_id_rev,t(null,n)):t(pt(Qe))}},e._putLocal=function(e,t,n){"function"===typeof t&&(n=t,t={}),delete e._revisions;var r=e._rev,i=e._id;e._rev=r?"0-"+(parseInt(r.split("-")[1],10)+1):"0-1";var a,s=t.ctx;if(!s){var l=mr(o,[ar],"readwrite");if(l.error)return n(l.error);(s=l.txn).onerror=cr(n),s.oncomplete=function(){a&&n(null,a)}}var c,u=s.objectStore(ar);r?(c=u.get(i)).onsuccess=function(o){var i=o.target.result;i&&i._rev===r?u.put(e).onsuccess=function(){a={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,a)}:n(pt(Ze))}:((c=u.add(e)).onerror=function(e){n(pt(Ze)),e.preventDefault(),e.stopPropagation()},c.onsuccess=function(){a={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,a)})},e._removeLocal=function(e,t,n){"function"===typeof t&&(n=t,t={});var r,i=t.ctx;if(!i){var a=mr(o,[ar],"readwrite");if(a.error)return n(a.error);(i=a.txn).oncomplete=function(){r&&n(null,r)}}var s=e._id,l=i.objectStore(ar),c=l.get(s);c.onerror=cr(n),c.onsuccess=function(o){var i=o.target.result;i&&i._rev===e._rev?(l.delete(s),r={ok:!0,id:s,rev:"0-0"},t.ctx&&n(null,r)):n(pt(Qe))}},e._destroy=function(e,t){yr.removeAllListeners(r);var n=Ar.get(r);n&&n.result&&(n.result.close(),Or.delete(r));var o=indexedDB.deleteDatabase(r);o.onsuccess=function(){Ar.delete(r),Be()&&r in localStorage&&delete localStorage[r],t(null,{ok:!0})},o.onerror=cr(t)};var d=Or.get(r);if(d)return o=d.idb,e._meta=d.global,fe()((function(){n(null,e)}));var h=indexedDB.open(r,5);Ar.set(r,h),h.onupgradeneeded=function(e){var t=e.target.result;if(e.oldVersion<1)return i(t);var n=e.currentTarget.transaction;e.oldVersion<3&&s(t),e.oldVersion<4&&c(t);var r=[a,l,u,p],o=e.oldVersion;function d(){var e=r[o-1];o++,e&&e(n,d)}d()},h.onsuccess=function(t){(o=t.target.result).onversionchange=function(){o.close(),Or.delete(r)},o.onabort=function(e){Ue("error","Database has a global failure",e.target.error),o.close(),Or.delete(r)};var i,a,s,l,c=o.transaction([ir,sr,tr],"readwrite"),u=!1;function p(){"undefined"!==typeof s&&u&&(e._meta={name:r,instanceId:l,blobSupport:s},Or.set(r,{idb:o,global:e._meta}),n(null,e))}function d(){if("undefined"!==typeof a&&"undefined"!==typeof i){var e=r+"_id";e in i?l=i[e]:i[e]=l=Vt(),i.docCount=a,c.objectStore(ir).put(i)}}c.objectStore(ir).get(ir).onsuccess=function(e){i=e.target.result||{id:ir},d()},function(e,t){e.objectStore(tr).index("deletedOrLocal").count(IDBKeyRange.only("0")).onsuccess=function(e){t(e.target.result)}}(c,(function(e){a=e,d()})),Rr||(Rr=function(e){return new Promise((function(t){var n=At([""]),r=e.objectStore(sr).put(n,"key");r.onsuccess=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)},r.onerror=e.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)}})).catch((function(){return!1}))}(c)),Rr.then((function(e){s=e,p()})),c.oncomplete=function(){u=!0,p()},c.onabort=cr(n)},h.onerror=function(e){var t=e.target.error&&e.target.error.message;t?-1!==t.indexOf("stored database is a higher version")&&(t=new Error('This DB was created with the newer "indexeddb" adapter, but you are trying to open it with the older "idb" adapter')):t="Failed to open indexedDB, are you in private browsing mode?",Ue("error",t),n(pt(lt,t))}}(n,e,t)}),t,n.constructor)}Pr.valid=function(){try{return"undefined"!==typeof indexedDB&&"undefined"!==typeof IDBKeyRange}catch(Xw){return!1}};var Tr=5e3,Dr={};function kr(e){var t=e.doc||e.ok,n=t&&t._attachments;n&&Object.keys(n).forEach((function(e){var t=n[e];t.data=Dt(t.data,t.content_type)}))}function Nr(e){return/^_design/.test(e)?"_design/"+encodeURIComponent(e.slice(8)):/^_local/.test(e)?"_local/"+encodeURIComponent(e.slice(7)):encodeURIComponent(e)}function Mr(e){return e._attachments&&Object.keys(e._attachments)?Promise.all(Object.keys(e._attachments).map((function(t){var n=e._attachments[t];if(n.data&&"string"!==typeof n.data)return new Promise((function(e){Mt(n.data,e)})).then((function(e){n.data=e}))}))):Promise.resolve()}function Ir(e,t){if(function(e){if(!e.prefix)return!1;var t=St(e.prefix).protocol;return"http"===t||"https"===t}(t)){var n=t.name.substr(t.prefix.length);e=t.prefix.replace(/\/?$/,"/")+encodeURIComponent(n)}var r=St(e);(r.user||r.password)&&(r.auth={username:r.user,password:r.password});var o=r.path.replace(/(^\/|\/$)/g,"").split("/");return r.db=o.pop(),-1===r.db.indexOf("%")&&(r.db=encodeURIComponent(r.db)),r.path=o.join("/"),r}function Lr(e,t){return Fr(e,e.db+"/"+t)}function Fr(e,t){var n=e.path?"/":"";return e.protocol+"://"+e.host+(e.port?":"+e.port:"")+"/"+e.path+n+t}function Gr(e){return"?"+Object.keys(e).map((function(t){return t+"="+encodeURIComponent(e[t])})).join("&")}function Hr(e,t){var n=this,r=Ir(e.name,e),o=Lr(r,"");e=Ne(e);var i,a=function(t,n){if((n=n||{}).headers=n.headers||new vn,n.credentials="include",e.auth||r.auth){var o=e.auth||r.auth,i=o.username+":"+o.password,a=Ot(unescape(encodeURIComponent(i)));n.headers.set("Authorization","Basic "+a)}var s=e.headers||{};return Object.keys(s).forEach((function(e){n.headers.append(e,s[e])})),function(e){var t="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",n=-1!==t.indexOf("msie"),r=-1!==t.indexOf("trident"),o=-1!==t.indexOf("edge"),i=!("method"in e)||"GET"===e.method;return(n||r||o)&&i}(n)&&(t+=(-1===t.indexOf("?")?"?":"&")+"_nonce="+Date.now()),(e.fetch||gn)(t,n)};function s(e,t){return Le(e,Ce()((function(e){c().then((function(){return t.apply(this,e)})).catch((function(t){e.pop()(t)}))}))).bind(n)}function l(e,t,n){var r={};return(t=t||{}).headers=t.headers||new vn,t.headers.get("Content-Type")||t.headers.set("Content-Type","application/json"),t.headers.get("Accept")||t.headers.set("Accept","application/json"),a(e,t).then((function(e){return r.ok=e.ok,r.status=e.status,e.json()})).then((function(e){if(r.data=e,!r.ok){r.data.status=r.status;var t=dt(r.data);if(n)return n(t);throw t}if(Array.isArray(r.data)&&(r.data=r.data.map((function(e){return e.error||e.missing?dt(e):e}))),!n)return r;n(null,r.data)}))}function c(){return e.skip_setup?Promise.resolve():i||((i=l(o).catch((function(e){return e&&e.status&&404===e.status?(Xe(404,"PouchDB is just detecting if the remote exists."),l(o,{method:"PUT"})):Promise.reject(e)})).catch((function(e){return!(!e||!e.status||412!==e.status)||Promise.reject(e)}))).catch((function(){i=null})),i)}function u(e){return e.split("/").map(encodeURIComponent).join("/")}fe()((function(){t(null,n)})),n._remote=!0,n.type=function(){return"http"},n.id=s("id",(function(e){a(Fr(r,"")).then((function(e){return e.json()})).catch((function(){return{}})).then((function(t){var n=t&&t.uuid?t.uuid+r.db:Lr(r,"");e(null,n)}))})),n.compact=s("compact",(function(e,t){"function"===typeof e&&(t=e,e={}),e=Ne(e),l(Lr(r,"_compact"),{method:"POST"}).then((function(){!function r(){n.info((function(n,o){o&&!o.compact_running?t(null,{ok:!0}):setTimeout(r,e.interval||200)}))}()}))})),n.bulkGet=Le("bulkGet",(function(e,t){var n=this;function o(t){var n={};e.revs&&(n.revs=!0),e.attachments&&(n.attachments=!0),e.latest&&(n.latest=!0),l(Lr(r,"_bulk_get"+Gr(n)),{method:"POST",body:JSON.stringify({docs:e.docs})}).then((function(n){e.attachments&&e.binary&&n.data.results.forEach((function(e){e.docs.forEach(kr)})),t(null,n.data)})).catch(t)}function i(){var r=Math.ceil(e.docs.length/50),o=0,i=new Array(r);function a(e){return function(n,a){i[e]=a.results,++o===r&&t(null,{results:ft(i)})}}for(var s=0;s<r;s++){var l=Fe(e,["revs","attachments","binary","latest"]);l.docs=e.docs.slice(50*s,Math.min(e.docs.length,50*(s+1))),je(n,l,a(s))}}var a=Fr(r,""),s=Dr[a];"boolean"!==typeof s?o((function(e,n){e?(Dr[a]=!1,Xe(e.status,"PouchDB is just detecting if the remote supports the _bulk_get API."),i()):(Dr[a]=!0,t(null,n))})):s?o(t):i()})),n._info=function(e){c().then((function(){return a(Lr(r,""))})).then((function(e){return e.json()})).then((function(t){t.host=Lr(r,""),e(null,t)})).catch(e)},n.fetch=function(e,t){return c().then((function(){var n="/"===e.substring(0,1)?Fr(r,e.substring(1)):Lr(r,e);return a(n,t)}))},n.get=s("get",(function(e,t,n){"function"===typeof t&&(n=t,t={});var o={};function i(e){var n=e._attachments,o=n&&Object.keys(n);if(n&&o.length)return function(e,t){return new Promise((function(n,r){var o,i=0,a=0,s=0,l=e.length;function c(){++s===l?o?r(o):n():d()}function u(){i--,c()}function p(e){i--,o=o||e,c()}function d(){for(;i<t&&a<l;)i++,e[a++]().then(u,p)}d()}))}(o.map((function(o){return function(){return function(o){var i=n[o],s=Nr(e._id)+"/"+u(o)+"?rev="+e._rev;return a(Lr(r,s)).then((function(e){return"buffer"in e?e.buffer():e.blob()})).then((function(e){if(t.binary){var n=Object.getOwnPropertyDescriptor(e.__proto__,"type");return n&&!n.set||(e.type=i.content_type),e}return new Promise((function(t){Mt(e,t)}))})).then((function(e){delete i.stub,delete i.length,i.data=e}))}(o)}})),5)}(t=Ne(t)).revs&&(o.revs=!0),t.revs_info&&(o.revs_info=!0),t.latest&&(o.latest=!0),t.open_revs&&("all"!==t.open_revs&&(t.open_revs=JSON.stringify(t.open_revs)),o.open_revs=t.open_revs),t.rev&&(o.rev=t.rev),t.conflicts&&(o.conflicts=t.conflicts),t.update_seq&&(o.update_seq=t.update_seq),e=Nr(e),l(Lr(r,e+Gr(o))).then((function(e){return Promise.resolve().then((function(){if(t.attachments)return n=e.data,Array.isArray(n)?Promise.all(n.map((function(e){if(e.ok)return i(e.ok)}))):i(n);var n})).then((function(){n(null,e.data)}))})).catch((function(t){t.docId=e,n(t)}))})),n.remove=s("remove",(function(e,t,n,o){var i;"string"===typeof t?(i={_id:e,_rev:t},"function"===typeof n&&(o=n,n={})):(i=e,"function"===typeof t?(o=t,n={}):(o=n,n=t));var a=i._rev||n.rev;l(Lr(r,Nr(i._id))+"?rev="+a,{method:"DELETE"},o).catch(o)})),n.getAttachment=s("getAttachment",(function(e,t,n,o){"function"===typeof n&&(o=n,n={});var i,s=n.rev?"?rev="+n.rev:"",l=Lr(r,Nr(e))+"/"+u(t)+s;a(l,{method:"GET"}).then((function(e){if(i=e.headers.get("content-type"),e.ok)return"undefined"===typeof process||process.browser||"function"!==typeof e.buffer?e.blob():e.buffer();throw e})).then((function(e){"undefined"===typeof process||process.browser||(e.type=i),o(null,e)})).catch((function(e){o(e)}))})),n.removeAttachment=s("removeAttachment",(function(e,t,n,o){l(Lr(r,Nr(e)+"/"+u(t))+"?rev="+n,{method:"DELETE"},o).catch(o)})),n.putAttachment=s("putAttachment",(function(e,t,n,o,i,a){"function"===typeof i&&(a=i,i=o,o=n,n=null);var s=Nr(e)+"/"+u(t),c=Lr(r,s);if(n&&(c+="?rev="+n),"string"===typeof o){var p;try{p=Rt(o)}catch(d){return a(pt(rt,"Attachment is not a valid base64 string"))}o=p?Tt(p,i):""}l(c,{headers:new vn({"Content-Type":i}),method:"PUT",body:o},a).catch(a)})),n._bulkDocs=function(e,t,n){e.new_edits=t.new_edits,c().then((function(){return Promise.all(e.docs.map(Mr))})).then((function(){return l(Lr(r,"_bulk_docs"),{method:"POST",body:JSON.stringify(e)},n)})).catch(n)},n._put=function(e,t,n){c().then((function(){return Mr(e)})).then((function(){return l(Lr(r,Nr(e._id)),{method:"PUT",body:JSON.stringify(e)})})).then((function(e){n(null,e.data)})).catch((function(t){t.docId=e&&e._id,n(t)}))},n.allDocs=s("allDocs",(function(e,t){"function"===typeof e&&(t=e,e={});var n,o={},i="GET";(e=Ne(e)).conflicts&&(o.conflicts=!0),e.update_seq&&(o.update_seq=!0),e.descending&&(o.descending=!0),e.include_docs&&(o.include_docs=!0),e.attachments&&(o.attachments=!0),e.key&&(o.key=JSON.stringify(e.key)),e.start_key&&(e.startkey=e.start_key),e.startkey&&(o.startkey=JSON.stringify(e.startkey)),e.end_key&&(e.endkey=e.end_key),e.endkey&&(o.endkey=JSON.stringify(e.endkey)),"undefined"!==typeof e.inclusive_end&&(o.inclusive_end=!!e.inclusive_end),"undefined"!==typeof e.limit&&(o.limit=e.limit),"undefined"!==typeof e.skip&&(o.skip=e.skip);var a=Gr(o);"undefined"!==typeof e.keys&&(i="POST",n={keys:e.keys}),l(Lr(r,"_all_docs"+a),{method:i,body:JSON.stringify(n)}).then((function(n){e.include_docs&&e.attachments&&e.binary&&n.data.rows.forEach(kr),t(null,n.data)})).catch(t)})),n._changes=function(e){var t="batch_size"in e?e.batch_size:25;(e=Ne(e)).continuous&&!("heartbeat"in e)&&(e.heartbeat=1e4);var n="timeout"in e?e.timeout:3e4;"timeout"in e&&e.timeout&&n-e.timeout<Tr&&(n=e.timeout+Tr),"heartbeat"in e&&e.heartbeat&&n-e.heartbeat<Tr&&(n=e.heartbeat+Tr);var o={};"timeout"in e&&e.timeout&&(o.timeout=e.timeout);var i="undefined"!==typeof e.limit&&e.limit,a=i;if(e.style&&(o.style=e.style),(e.include_docs||e.filter&&"function"===typeof e.filter)&&(o.include_docs=!0),e.attachments&&(o.attachments=!0),e.continuous&&(o.feed="longpoll"),e.seq_interval&&(o.seq_interval=e.seq_interval),e.conflicts&&(o.conflicts=!0),e.descending&&(o.descending=!0),e.update_seq&&(o.update_seq=!0),"heartbeat"in e&&e.heartbeat&&(o.heartbeat=e.heartbeat),e.filter&&"string"===typeof e.filter&&(o.filter=e.filter),e.view&&"string"===typeof e.view&&(o.filter="_view",o.view=e.view),e.query_params&&"object"===typeof e.query_params)for(var s in e.query_params)e.query_params.hasOwnProperty(s)&&(o[s]=e.query_params[s]);var u,p="GET";e.doc_ids?(o.filter="_doc_ids",p="POST",u={doc_ids:e.doc_ids}):e.selector&&(o.filter="_selector",p="POST",u={selector:e.selector});var d,h=new fn,f=function(n,s){if(!e.aborted){o.since=n,"object"===typeof o.since&&(o.since=JSON.stringify(o.since)),e.descending?i&&(o.limit=a):o.limit=!i||a>t?t:a;var f=Lr(r,"_changes"+Gr(o)),g={signal:h.signal,method:p,body:JSON.stringify(u)};d=n,e.aborted||c().then((function(){return l(f,g,s)})).catch(s)}},g={results:[]};return f(e.since||0,(function n(r,o){if(!e.aborted){var s=0;if(o&&o.results){s=o.results.length,g.last_seq=o.last_seq;var l=null,c=null;"number"===typeof o.pending&&(l=o.pending),"string"!==typeof g.last_seq&&"number"!==typeof g.last_seq||(c=g.last_seq);e.query_params,o.results=o.results.filter((function(t){a--;var n=ht(e)(t);return n&&(e.include_docs&&e.attachments&&e.binary&&kr(t),e.return_docs&&g.results.push(t),e.onChange(t,l,c)),n}))}else if(r)return e.aborted=!0,void e.complete(r);o&&o.last_seq&&(d=o.last_seq);var u=i&&a<=0||o&&s<t||e.descending;(!e.continuous||i&&a<=0)&&u?e.complete(null,g):fe()((function(){f(d,n)}))}})),{cancel:function(){e.aborted=!0,h.abort()}}},n.revsDiff=s("revsDiff",(function(e,t,n){"function"===typeof t&&(n=t,t={}),l(Lr(r,"_revs_diff"),{method:"POST",body:JSON.stringify(e)},n).catch(n)})),n._close=function(e){e()},n._destroy=function(e,t){l(Lr(r,""),{method:"DELETE"}).then((function(e){t(null,e)})).catch((function(e){404===e.status?t(null,{ok:!0}):t(e)}))}}function Wr(e){this.status=400,this.name="query_parse_error",this.message=e,this.error=!0;try{Error.captureStackTrace(this,Wr)}catch(Xw){}}function Vr(e){this.status=404,this.name="not_found",this.message=e,this.error=!0;try{Error.captureStackTrace(this,Vr)}catch(Xw){}}function jr(e){this.status=500,this.name="invalid_value",this.message=e,this.error=!0;try{Error.captureStackTrace(this,jr)}catch(Xw){}}function Br(e,t){return t&&e.then((function(e){fe()((function(){t(null,e)}))}),(function(e){fe()((function(){t(e)}))})),e}function zr(e,t){return function(){var n=arguments,r=this;return e.add((function(){return t.apply(r,n)}))}}function Ur(e){var t=new ae(e),n=new Array(t.size),r=-1;return t.forEach((function(e){n[++r]=e})),n}function Yr(e){var t=new Array(e.size),n=-1;return e.forEach((function(e,r){t[++n]=r})),t}function Xr(e){return new jr("builtin "+e+" function requires map values to be numbers or number arrays")}function qr(e){for(var t=0,n=0,r=e.length;n<r;n++){var o=e[n];if("number"!==typeof o){if(!Array.isArray(o))throw Xr("_sum");t="number"===typeof t?[t]:t;for(var i=0,a=o.length;i<a;i++){var s=o[i];if("number"!==typeof s)throw Xr("_sum");"undefined"===typeof t[i]?t.push(s):t[i]+=s}}else"number"===typeof t?t+=o:t[0]+=o}return t}Hr.valid=function(){return!0},Se()(Wr,Error),Se()(Vr,Error),Se()(jr,Error);var Kr=Ue.bind(null,"log"),$r=Array.isArray,Qr=JSON.parse;function Zr(e,t){return Et("return ("+e.replace(/;\s*$/,"")+");",{emit:t,sum:qr,log:Kr,isArray:$r,toJSON:Qr})}function Jr(){this.promise=new Promise((function(e){e()}))}function eo(e){if(!e)return"undefined";switch(typeof e){case"function":case"string":return e.toString();default:return JSON.stringify(e)}}function to(e,t,n,r,o,i){var a,s=function(e,t){return eo(e)+eo(t)+"undefined"}(n,r);if(!o&&(a=e._cachedViews=e._cachedViews||{})[s])return a[s];var l=e.info().then((function(l){var c=l.db_name+"-mrview-"+(o?"temp":Ht(s));return _t(e,"_local/"+i,(function(e){e.views=e.views||{};var n=t;-1===n.indexOf("/")&&(n=t+"/"+t);var r=e.views[n]=e.views[n]||{};if(!r[c])return r[c]=!0,e})).then((function(){return e.registerDependentDatabase(c).then((function(t){var o=t.db;o.auto_compaction=!0;var i={name:c,db:o,sourceDB:e,adapter:e.adapter,mapFun:n,reduceFun:r};return i.db.get("_local/lastSeq").catch((function(e){if(404!==e.status)throw e})).then((function(e){return i.seq=e?e.seq:0,a&&i.db.once("destroyed",(function(){delete a[s]})),i}))}))}))}));return a&&(a[s]=l),l}Jr.prototype.add=function(e){return this.promise=this.promise.catch((function(){})).then((function(){return e()})),this.promise},Jr.prototype.finish=function(){return this.promise};var no={},ro=new Jr;function oo(e){return-1===e.indexOf("/")?[e,e]:e.split("/")}function io(e,t){try{e.emit("error",t)}catch(n){Ue("error","The user's map/reduce function threw an uncaught error.\nYou can debug this error by doing:\nmyDatabase.on('error', function (err) { debugger; });\nPlease double-check your map/reduce function."),Ue("error",t)}}var ao=function(e,t){return qr(t)},so=function(e,t){return t.length},lo=function(e,t){return{sum:qr(t),min:Math.min.apply(null,t),max:Math.max.apply(null,t),count:t.length,sumsqr:function(e){for(var t=0,n=0,r=e.length;n<r;n++){var o=e[n];t+=o*o}return t}(t)}};var co=function(e,t,n,r){function o(e,t,n){try{t(n)}catch(Xw){io(e,Xw)}}function i(e,t,n,r,o){try{return{output:t(n,r,o)}}catch(Xw){return io(e,Xw),{error:Xw}}}function a(e,t){var n=An(e.key,t.key);return 0!==n?n:An(e.value,t.value)}function s(e,t,n){return n=n||0,"number"===typeof t?e.slice(n,t+n):n>0?e.slice(n):e}function l(e){var t=e.value;return t&&"object"===typeof t&&t._id||e.id}function c(e){return function(t){return e.include_docs&&e.attachments&&e.binary&&function(e){e.rows.forEach((function(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach((function(e){var n=t[e];t[e].data=Dt(n.data,n.content_type)}))}))}(t),t}}function u(e,t,n,r){var o=t[e];"undefined"!==typeof o&&(r&&(o=encodeURIComponent(JSON.stringify(o))),n.push(e+"="+o))}function p(e){if("undefined"!==typeof e){var t=Number(e);return isNaN(t)||t!==parseInt(e,10)?e:t}}function d(e,t){var n=e.descending?"endkey":"startkey",r=e.descending?"startkey":"endkey";if("undefined"!==typeof e[n]&&"undefined"!==typeof e[r]&&An(e[n],e[r])>0)throw new Wr("No rows can match your key range, reverse your start_key and end_key or set {descending : true}");if(t.reduce&&!1!==e.reduce){if(e.include_docs)throw new Wr("{include_docs:true} is invalid for reduce");if(e.keys&&e.keys.length>1&&!e.group&&!e.group_level)throw new Wr("Multi-key fetches for reduce views must use {group: true}")}["group_level","limit","skip"].forEach((function(t){var n=function(e){if(e){if("number"!==typeof e)return new Wr('Invalid value for integer: "'+e+'"');if(e<0)return new Wr('Invalid value for positive integer: "'+e+'"')}}(e[t]);if(n)throw n}))}function h(e){return function(t){if(404===t.status)return e;throw t}}function f(e,t,n){var r="_local/doc_"+e,o={_id:r,keys:[]},i=n.get(e),a=i[0];return(function(e){return 1===e.length&&/^1-/.test(e[0].rev)}(i[1])?Promise.resolve(o):t.db.get(r).catch(h(o))).then((function(e){return function(e){return e.keys.length?t.db.allDocs({keys:e.keys,include_docs:!0}):Promise.resolve({rows:[]})}(e).then((function(t){return function(e,t){for(var n=[],r=new ae,o=0,i=t.rows.length;o<i;o++){var s=t.rows[o].doc;if(s&&(n.push(s),r.add(s._id),s._deleted=!a.has(s._id),!s._deleted)){var l=a.get(s._id);"value"in l&&(s.value=l.value)}}var c=Yr(a);return c.forEach((function(e){if(!r.has(e)){var t={_id:e},o=a.get(e);"value"in o&&(t.value=o.value),n.push(t)}})),e.keys=Ur(c.concat(e.keys)),n.push(e),n}(e,t)}))}))}function g(e){var t="string"===typeof e?e:e.name,n=no[t];return n||(n=no[t]=new Jr),n}function v(e){return zr(g(e),(function(){return function(e){var n,r;function i(e,t){var o={id:r._id,key:Pn(e)};"undefined"!==typeof t&&null!==t&&(o.value=Pn(t)),n.push(o)}var s=t(e.mapFun,i),l=e.seq||0;function c(t,n){return function(){return function(e,t,n){var r="_local/lastSeq";return e.db.get(r).catch(h({_id:r,seq:0})).then((function(r){var o=Yr(t);return Promise.all(o.map((function(n){return f(n,e,t)}))).then((function(t){var o=ft(t);return r.seq=n,o.push(r),e.db.bulkDocs({docs:o})}))}))}(e,t,n)}}var u=new Jr;function p(){return e.sourceDB.changes({return_docs:!0,conflicts:!0,include_docs:!0,style:"all_docs",since:l,limit:50}).then(d)}function d(e){var t=e.results;if(t.length){var n=g(t);if(u.add(c(n,l)),!(t.length<50))return p()}}function g(t){for(var i=new se,c=0,u=t.length;c<u;c++){var p=t[c];if("_"!==p.doc._id[0]){n=[],(r=p.doc)._deleted||o(e.sourceDB,s,r),n.sort(a);var d=v(n);i.set(p.doc._id,[d,p.changes])}l=p.seq}return i}function v(e){for(var t,n=new se,r=0,o=e.length;r<o;r++){var i=e[r],a=[i.key,i.id];r>0&&0===An(i.key,t)&&a.push(r),n.set(Dn(a),i),t=i.key}return n}return p().then((function(){return u.finish()})).then((function(){e.seq=l}))}(e)}))()}function m(e,t){return zr(g(e),(function(){return function(e,t){var r,o=e.reduceFun&&!1!==t.reduce,a=t.skip||0;"undefined"===typeof t.keys||t.keys.length||(t.limit=0,delete t.keys);function c(t){return t.include_docs=!0,e.db.allDocs(t).then((function(e){return r=e.total_rows,e.rows.map((function(e){if("value"in e.doc&&"object"===typeof e.doc.value&&null!==e.doc.value){var t=Object.keys(e.doc.value).sort(),n=["id","key","value"];if(!(t<n||t>n))return e.doc.value}var r=function(e){for(var t=[],n=[],r=0;;){var o=e[r++];if("\0"!==o)switch(o){case"1":t.push(null);break;case"2":t.push("1"===e[r]),r++;break;case"3":var i=kn(e,r);t.push(i.num),r+=i.length;break;case"4":for(var a="";;){var s=e[r];if("\0"===s)break;a+=s,r++}a=a.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"\x01").replace(/\u0002\u0002/g,"\x02"),t.push(a);break;case"5":var l={element:[],index:t.length};t.push(l.element),n.push(l);break;case"6":var c={element:{},index:t.length};t.push(c.element),n.push(c);break;default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+o)}else{if(1===t.length)return t.pop();Nn(t,n)}}}(e.doc._id);return{key:r[0],id:r[1],value:"value"in e.doc?e.doc.value:null}}))}))}function u(c){var u;if(u=o?function(e,t,r){0===r.group_level&&delete r.group_level;var o=r.group||r.group_level,a=n(e.reduceFun),l=[],c=isNaN(r.group_level)?Number.POSITIVE_INFINITY:r.group_level;t.forEach((function(e){var t=l[l.length-1],n=o?e.key:null;if(o&&Array.isArray(n)&&(n=n.slice(0,c)),t&&0===An(t.groupKey,n))return t.keys.push([e.key,e.id]),void t.values.push(e.value);l.push({keys:[[e.key,e.id]],values:[e.value],groupKey:n})})),t=[];for(var u=0,p=l.length;u<p;u++){var d=l[u],h=i(e.sourceDB,a,d.keys,d.values,!1);if(h.error&&h.error instanceof jr)throw h.error;t.push({value:h.error?null:h.output,key:d.groupKey})}return{rows:s(t,r.limit,r.skip)}}(e,c,t):{total_rows:r,offset:a,rows:c},t.update_seq&&(u.update_seq=e.seq),t.include_docs){var p=Ur(c.map(l));return e.sourceDB.allDocs({keys:p,include_docs:!0,conflicts:t.conflicts,attachments:t.attachments,binary:t.binary}).then((function(e){var t=new se;return e.rows.forEach((function(e){t.set(e.id,e.doc)})),c.forEach((function(e){var n=l(e),r=t.get(n);r&&(e.doc=r)})),u}))}return u}if("undefined"!==typeof t.keys){var p=t.keys.map((function(e){var n={startkey:Dn([e]),endkey:Dn([e,{}])};return t.update_seq&&(n.update_seq=!0),c(n)}));return Promise.all(p).then(ft).then(u)}var d,h,f={descending:t.descending};if(t.update_seq&&(f.update_seq=!0),"start_key"in t&&(d=t.start_key),"startkey"in t&&(d=t.startkey),"end_key"in t&&(h=t.end_key),"endkey"in t&&(h=t.endkey),"undefined"!==typeof d&&(f.startkey=t.descending?Dn([d,{}]):Dn([d])),"undefined"!==typeof h){var g=!1!==t.inclusive_end;t.descending&&(g=!g),f.endkey=Dn(g?[h,{}]:[h])}if("undefined"!==typeof t.key){var v=Dn([t.key]),m=Dn([t.key,{}]);f.descending?(f.endkey=v,f.startkey=m):(f.startkey=v,f.endkey=m)}return o||("number"===typeof t.limit&&(f.limit=t.limit),f.skip=a),c(f).then(u)}(e,t)}))()}function y(t,n,o){if("function"===typeof t._query)return function(e,t,n){return new Promise((function(r,o){e._query(t,n,(function(e,t){if(e)return o(e);r(t)}))}))}(t,n,o);if(vt(t))return function(e,t,n){var r,o,i,a=[],s="GET";if(u("reduce",n,a),u("include_docs",n,a),u("attachments",n,a),u("limit",n,a),u("descending",n,a),u("group",n,a),u("group_level",n,a),u("skip",n,a),u("stale",n,a),u("conflicts",n,a),u("startkey",n,a,!0),u("start_key",n,a,!0),u("endkey",n,a,!0),u("end_key",n,a,!0),u("inclusive_end",n,a),u("key",n,a,!0),u("update_seq",n,a),a=""===(a=a.join("&"))?"":"?"+a,"undefined"!==typeof n.keys){var l="keys="+encodeURIComponent(JSON.stringify(n.keys));l.length+a.length+1<=2e3?a+=("?"===a[0]?"&":"?")+l:(s="POST","string"===typeof t?r={keys:n.keys}:t.keys=n.keys)}if("string"===typeof t){var p=oo(t);return e.fetch("_design/"+p[0]+"/_view/"+p[1]+a,{headers:new vn({"Content-Type":"application/json"}),method:s,body:JSON.stringify(r)}).then((function(e){return o=e.ok,i=e.status,e.json()})).then((function(e){if(!o)throw e.status=i,dt(e);return e.rows.forEach((function(e){if(e.value&&e.value.error&&"builtin_reduce_error"===e.value.error)throw new Error(e.reason)})),e})).then(c(n))}return r=r||{},Object.keys(t).forEach((function(e){Array.isArray(t[e])?r[e]=t[e]:r[e]=t[e].toString()})),e.fetch("_temp_view"+a,{headers:new vn({"Content-Type":"application/json"}),method:"POST",body:JSON.stringify(r)}).then((function(e){return o=e.ok,i=e.status,e.json()})).then((function(e){if(!o)throw e.status=i,dt(e);return e})).then(c(n))}(t,n,o);if("string"!==typeof n)return d(o,n),ro.add((function(){return to(t,"temp_view/temp_view",n.map,n.reduce,!0,e).then((function(e){return t=v(e).then((function(){return m(e,o)})),n=function(){return e.db.destroy()},t.then((function(e){return n().then((function(){return e}))}),(function(e){return n().then((function(){throw e}))}));var t,n}))})),ro.finish();var i=n,a=oo(i),s=a[0],l=a[1];return t.get("_design/"+s).then((function(n){var a=n.views&&n.views[l];if(!a)throw new Vr("ddoc "+n._id+" has no view named "+l);return r(n,l),d(o,a),to(t,i,a.map,a.reduce,!1,e).then((function(e){return"ok"===o.stale||"update_after"===o.stale?("update_after"===o.stale&&fe()((function(){v(e)})),m(e,o)):v(e).then((function(){return m(e,o)}))}))}))}var b;return{query:function(e,t,n){var r=this;"function"===typeof t&&(n=t,t={}),t=t?function(e){return e.group_level=p(e.group_level),e.limit=p(e.limit),e.skip=p(e.skip),e}(t):{},"function"===typeof e&&(e={map:e});var o=Promise.resolve().then((function(){return y(r,e,t)}));return Br(o,n),o},viewCleanup:(b=function(){var t=this;return"function"===typeof t._viewCleanup?function(e){return new Promise((function(t,n){e._viewCleanup((function(e,r){if(e)return n(e);t(r)}))}))}(t):vt(t)?function(e){return e.fetch("_view_cleanup",{headers:new vn({"Content-Type":"application/json"}),method:"POST"}).then((function(e){return e.json()}))}(t):function(t){return t.get("_local/"+e).then((function(e){var n=new se;Object.keys(e.views).forEach((function(e){var t=oo(e),r="_design/"+t[0],o=t[1],i=n.get(r);i||(i=new ae,n.set(r,i)),i.add(o)}));var r={keys:Yr(n),include_docs:!0};return t.allDocs(r).then((function(r){var o={};r.rows.forEach((function(t){var r=t.key.substring(8);n.get(t.key).forEach((function(n){var i=r+"/"+n;e.views[i]||(i=n);var a=Object.keys(e.views[i]),s=t.doc&&t.doc.views&&t.doc.views[n];a.forEach((function(e){o[e]=o[e]||s}))}))}));var i=Object.keys(o).filter((function(e){return!o[e]})).map((function(e){return zr(g(e),(function(){return new t.constructor(e,t.__opts).destroy()}))()}));return Promise.all(i).then((function(){return{ok:!0}}))}))}),h({ok:!0}))}(t)},Ce()((function(e){var t=e.pop(),n=b.apply(this,e);return"function"===typeof t&&Br(n,t),n})))}}("mrviews",(function(e,t){if("function"===typeof e&&2===e.length){var n=e;return function(e){return n(e,t)}}return Zr(e.toString(),t)}),(function(e){var t=e.toString(),n=function(e){if(/^_sum/.test(e))return ao;if(/^_count/.test(e))return so;if(/^_stats/.test(e))return lo;if(/^_/.test(e))throw new Error(e+" is not a supported reduce function.")}(t);return n||Zr(t)}),(function(e,t){var n=e.views&&e.views[t];if("string"!==typeof n.map)throw new Vr("ddoc "+e._id+" has no string view named "+t+", instead found object of type: "+typeof n.map)}));var uo={query:function(e,t,n){return co.query.call(this,e,t,n)},viewCleanup:function(e){return co.viewCleanup.call(this,e)}};function po(e){return/^1-/.test(e)}function ho(e,t){var n=Object.keys(t._attachments);return Promise.all(n.map((function(n){return e.getAttachment(t._id,n,{rev:t._rev})})))}function fo(e,t,n,r){n=Ne(n);var o=[],i=!0;function a(t){return e.allDocs({keys:t,include_docs:!0,conflicts:!0}).then((function(e){if(r.cancelled)throw new Error("cancelled");e.rows.forEach((function(e){var t;e.deleted||!e.doc||!po(e.value.rev)||(t=e.doc,t._attachments&&Object.keys(t._attachments).length>0)||function(e){return e._conflicts&&e._conflicts.length>0}(e.doc)||(e.doc._conflicts&&delete e.doc._conflicts,o.push(e.doc),delete n[e.id])}))}))}return Promise.resolve().then((function(){var e=Object.keys(n).filter((function(e){var t=n[e].missing;return 1===t.length&&po(t[0])}));if(e.length>0)return a(e)})).then((function(){var a=function(e){var t=[];return Object.keys(e).forEach((function(n){e[n].missing.forEach((function(e){t.push({id:n,rev:e})}))})),{docs:t,revs:!0,latest:!0}}(n);if(a.docs.length)return e.bulkGet(a).then((function(n){if(r.cancelled)throw new Error("cancelled");return Promise.all(n.results.map((function(n){return Promise.all(n.docs.map((function(n){var r=n.ok;return n.error&&(i=!1),r&&r._attachments?function(e,t,n){var r=vt(t)&&!vt(e),o=Object.keys(n._attachments);return r?e.get(n._id).then((function(r){return Promise.all(o.map((function(o){return function(e,t,n){return!e._attachments||!e._attachments[n]||e._attachments[n].digest!==t._attachments[n].digest}(r,n,o)?t.getAttachment(n._id,o):e.getAttachment(r._id,o)})))})).catch((function(e){if(404!==e.status)throw e;return ho(t,n)})):ho(t,n)}(t,e,r).then((function(e){var t=Object.keys(r._attachments);return e.forEach((function(e,n){var o=r._attachments[t[n]];delete o.stub,delete o.length,o.data=e})),r})):r})))}))).then((function(e){o=o.concat(ft(e).filter(Boolean))}))}))})).then((function(){return{ok:i,docs:o}}))}var go="pouchdb";function vo(e,t,n,r,o){return e.get(t).catch((function(n){if(404===n.status)return"http"!==e.adapter&&"https"!==e.adapter||Xe(404,"PouchDB is just checking if a remote checkpoint exists."),{session_id:r,_id:t,history:[],replicator:go,version:1};throw n})).then((function(i){if(!o.cancelled&&i.last_seq!==n)return i.history=(i.history||[]).filter((function(e){return e.session_id!==r})),i.history.unshift({last_seq:n,session_id:r}),i.history=i.history.slice(0,5),i.version=1,i.replicator=go,i.session_id=r,i.last_seq=n,e.put(i).catch((function(i){if(409===i.status)return vo(e,t,n,r,o);throw i}))}))}function mo(e,t,n,r,o){this.src=e,this.target=t,this.id=n,this.returnValue=r,this.opts=o||{}}mo.prototype.writeCheckpoint=function(e,t){var n=this;return this.updateTarget(e,t).then((function(){return n.updateSource(e,t)}))},mo.prototype.updateTarget=function(e,t){return this.opts.writeTargetCheckpoint?vo(this.target,this.id,e,t,this.returnValue):Promise.resolve(!0)},mo.prototype.updateSource=function(e,t){if(this.opts.writeSourceCheckpoint){var n=this;return vo(this.src,this.id,e,t,this.returnValue).catch((function(e){if(Co(e))return n.opts.writeSourceCheckpoint=!1,!0;throw e}))}return Promise.resolve(!0)};var yo={undefined:function(e,t){return 0===An(e.last_seq,t.last_seq)?t.last_seq:0},1:function(e,t){return function(e,t){if(e.session_id===t.session_id)return{last_seq:e.last_seq,history:e.history};return bo(e.history,t.history)}(t,e).last_seq}};function bo(e,t){var n=e[0],r=e.slice(1),o=t[0],i=t.slice(1);return n&&0!==t.length?wo(n.session_id,t)?{last_seq:n.last_seq,history:e}:wo(o.session_id,r)?{last_seq:o.last_seq,history:i}:bo(r,i):{last_seq:0,history:[]}}function wo(e,t){var n=t[0],r=t.slice(1);return!(!e||0===t.length)&&(e===n.session_id||wo(e,r))}function Co(e){return"number"===typeof e.status&&4===Math.floor(e.status/100)}mo.prototype.getCheckpoint=function(){var e=this;return e.opts&&e.opts.writeSourceCheckpoint&&!e.opts.writeTargetCheckpoint?e.src.get(e.id).then((function(e){return e.last_seq||0})).catch((function(e){if(404!==e.status)throw e;return 0})):e.target.get(e.id).then((function(t){return e.opts&&e.opts.writeTargetCheckpoint&&!e.opts.writeSourceCheckpoint?t.last_seq||0:e.src.get(e.id).then((function(e){return t.version!==e.version?0:(n=t.version?t.version.toString():"undefined")in yo?yo[n](t,e):0;var n}),(function(n){if(404===n.status&&t.last_seq)return e.src.put({_id:e.id,last_seq:0}).then((function(){return 0}),(function(n){return Co(n)?(e.opts.writeSourceCheckpoint=!1,t.last_seq):0}));throw n}))})).catch((function(e){if(404!==e.status)throw e;return 0}))};function xo(e,t,n){var r=n.doc_ids?n.doc_ids.sort(An):"",o=n.filter?n.filter.toString():"",i="",a="",s="";return n.selector&&(s=JSON.stringify(n.selector)),n.filter&&n.query_params&&(i=JSON.stringify(function(e){return Object.keys(e).sort(An).reduce((function(t,n){return t[n]=e[n],t}),{})}(n.query_params))),n.filter&&"_view"===n.filter&&(a=n.view.toString()),Promise.all([e.id(),t.id()]).then((function(e){var t=e[0]+e[1]+o+a+i+r+s;return new Promise((function(e){Gt(t,e)}))})).then((function(e){return"_local/"+(e=e.replace(/\//g,".").replace(/\+/g,"_"))}))}function So(e,t,n,r,o){var i,a,s,l=[],c={seq:0,changes:[],docs:[]},u=!1,p=!1,d=!1,h=0,f=n.continuous||n.live||!1,g=n.batch_size||100,v=n.batches_limit||10,m=!1,y=n.doc_ids,b=n.selector,w=[],C=Vt();o=o||{ok:!0,start_time:(new Date).toISOString(),docs_read:0,docs_written:0,doc_write_failures:0,errors:[]};var x={};function S(){return s?Promise.resolve():xo(e,t,n).then((function(o){a=o;var i={};i=!1===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!1}:"source"===n.checkpoint?{writeSourceCheckpoint:!0,writeTargetCheckpoint:!1}:"target"===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!0}:{writeSourceCheckpoint:!0,writeTargetCheckpoint:!0},s=new mo(e,t,a,r,i)}))}function E(){if(w=[],0!==i.docs.length){var e=i.docs,a={timeout:n.timeout};return t.bulkDocs({docs:e,new_edits:!1},a).then((function(t){if(r.cancelled)throw T(),new Error("cancelled");var n=Object.create(null);t.forEach((function(e){e.error&&(n[e.id]=e)}));var i=Object.keys(n).length;o.doc_write_failures+=i,o.docs_written+=e.length-i,e.forEach((function(e){var t=n[e._id];if(t){o.errors.push(t);var i=(t.name||"").toLowerCase();if("unauthorized"!==i&&"forbidden"!==i)throw t;r.emit("denied",Ne(t))}else w.push(e)}))}),(function(t){throw o.doc_write_failures+=e.length,t}))}}function _(){if(i.error)throw new Error("There was a problem getting docs.");o.last_seq=h=i.seq;var e=Ne(o);return w.length&&(e.docs=w,"number"===typeof i.pending&&(e.pending=i.pending,delete i.pending),r.emit("change",e)),u=!0,s.writeCheckpoint(i.seq,C).then((function(){if(u=!1,r.cancelled)throw T(),new Error("cancelled");i=void 0,M()})).catch((function(e){throw L(e),e}))}function R(){return fo(e,t,i.diffs,r).then((function(e){i.error=!e.ok,e.docs.forEach((function(e){delete i.diffs[e._id],o.docs_read++,i.docs.push(e)}))}))}function O(){r.cancelled||i||(0!==l.length?(i=l.shift(),function(){var e={};return i.changes.forEach((function(t){"_user/"!==t.id&&(e[t.id]=t.changes.map((function(e){return e.rev})))})),t.revsDiff(e).then((function(e){if(r.cancelled)throw T(),new Error("cancelled");i.diffs=e}))}().then(R).then(E).then(_).then(O).catch((function(e){P("batch processing terminated with error",e)}))):A(!0))}function A(e){0!==c.changes.length?(e||p||c.changes.length>=g)&&(l.push(c),c={seq:0,changes:[],docs:[]},"pending"!==r.state&&"stopped"!==r.state||(r.state="active",r.emit("active")),O()):0!==l.length||i||((f&&x.live||p)&&(r.state="pending",r.emit("paused")),p&&T())}function P(e,t){d||(t.message||(t.message=e),o.ok=!1,o.status="aborting",l=[],c={seq:0,changes:[],docs:[]},T(t))}function T(i){if(!d&&(!r.cancelled||(o.status="cancelled",!u)))if(o.status=o.status||"complete",o.end_time=(new Date).toISOString(),o.last_seq=h,d=!0,i){(i=pt(i)).result=o;var a=(i.name||"").toLowerCase();"unauthorized"===a||"forbidden"===a?(r.emit("error",i),r.removeAllListeners()):function(e,t,n,r){if(!1===e.retry)return t.emit("error",n),void t.removeAllListeners();if("function"!==typeof e.back_off_function&&(e.back_off_function=Ye),t.emit("requestError",n),"active"===t.state||"pending"===t.state){t.emit("paused",n),t.state="stopped";var o=function(){e.current_back_off=0};t.once("paused",(function(){t.removeListener("active",o)})),t.once("active",o)}e.current_back_off=e.current_back_off||0,e.current_back_off=e.back_off_function(e.current_back_off),setTimeout(r,e.current_back_off)}(n,r,i,(function(){So(e,t,n,r)}))}else r.emit("complete",o),r.removeAllListeners()}function D(e,t,o){if(r.cancelled)return T();"number"===typeof t&&(c.pending=t),ht(n)(e)&&(c.seq=e.seq||o,c.changes.push(e),fe()((function(){A(0===l.length&&x.live)})))}function k(e){if(m=!1,r.cancelled)return T();if(e.results.length>0)x.since=e.results[e.results.length-1].seq,M(),A(!0);else{var t=function(){f?(x.live=!0,M()):p=!0,A(!0)};i||0!==e.results.length?t():(u=!0,s.writeCheckpoint(e.last_seq,C).then((function(){u=!1,o.last_seq=h=e.last_seq,t()})).catch(L))}}function N(e){if(m=!1,r.cancelled)return T();P("changes rejected",e)}function M(){if(!m&&!p&&l.length<v){m=!0,r._changes&&(r.removeListener("cancel",r._abortChanges),r._changes.cancel()),r.once("cancel",o);var t=e.changes(x).on("change",D);t.then(i,i),t.then(k).catch(N),n.retry&&(r._changes=t,r._abortChanges=o)}function o(){t.cancel()}function i(){r.removeListener("cancel",o)}}function I(){S().then((function(){if(!r.cancelled)return s.getCheckpoint().then((function(e){x={since:h=e,limit:g,batch_size:g,style:"all_docs",doc_ids:y,selector:b,return_docs:!0},n.filter&&("string"!==typeof n.filter?x.include_docs=!0:x.filter=n.filter),"heartbeat"in n&&(x.heartbeat=n.heartbeat),"timeout"in n&&(x.timeout=n.timeout),n.query_params&&(x.query_params=n.query_params),n.view&&(x.view=n.view),M()}));T()})).catch((function(e){P("getCheckpoint rejected with ",e)}))}function L(e){u=!1,P("writeCheckpoint completed with error",e)}r.ready(e,t),r.cancelled?T():(r._addedListeners||(r.once("cancel",T),"function"===typeof n.complete&&(r.once("error",n.complete),r.once("complete",(function(e){n.complete(null,e)}))),r._addedListeners=!0),"undefined"===typeof n.since?I():S().then((function(){return u=!0,s.writeCheckpoint(n.since,C)})).then((function(){u=!1,r.cancelled?T():(h=n.since,I())})).catch(L))}function Eo(){_e().call(this),this.cancelled=!1,this.state="pending";var e=this,t=new Promise((function(t,n){e.once("complete",t),e.once("error",n)}));e.then=function(e,n){return t.then(e,n)},e.catch=function(e){return t.catch(e)},e.catch((function(){}))}function _o(e,t){var n=t.PouchConstructor;return"string"===typeof e?new n(e,t):e}function Ro(e,t,n,r){if("function"===typeof n&&(r=n,n={}),"undefined"===typeof n&&(n={}),n.doc_ids&&!Array.isArray(n.doc_ids))throw pt(at,"`doc_ids` filter parameter is not a list.");n.complete=r,(n=Ne(n)).continuous=n.continuous||n.live,n.retry="retry"in n&&n.retry,n.PouchConstructor=n.PouchConstructor||this;var o=new Eo(n);return So(_o(e,n),_o(t,n),n,o),o}function Oo(e,t,n,r){return"function"===typeof n&&(r=n,n={}),"undefined"===typeof n&&(n={}),(n=Ne(n)).PouchConstructor=n.PouchConstructor||this,new Ao(e=_o(e,n),t=_o(t,n),n,r)}function Ao(e,t,n,r){var o=this;this.canceled=!1;var i=n.push?qe({},n,n.push):n,a=n.pull?qe({},n,n.pull):n;function s(e){o.emit("change",{direction:"pull",change:e})}function l(e){o.emit("change",{direction:"push",change:e})}function c(e){o.emit("denied",{direction:"push",doc:e})}function u(e){o.emit("denied",{direction:"pull",doc:e})}function p(){o.pushPaused=!0,o.pullPaused&&o.emit("paused")}function d(){o.pullPaused=!0,o.pushPaused&&o.emit("paused")}function h(){o.pushPaused=!1,o.pullPaused&&o.emit("active",{direction:"push"})}function f(){o.pullPaused=!1,o.pushPaused&&o.emit("active",{direction:"pull"})}this.push=Ro(e,t,i),this.pull=Ro(t,e,a),this.pushPaused=!0,this.pullPaused=!0;var g={};function v(e){return function(t,n){("change"===t&&(n===s||n===l)||"denied"===t&&(n===u||n===c)||"paused"===t&&(n===d||n===p)||"active"===t&&(n===f||n===h))&&(t in g||(g[t]={}),g[t][e]=!0,2===Object.keys(g[t]).length&&o.removeAllListeners(t))}}function m(e,t,n){-1==e.listeners(t).indexOf(n)&&e.on(t,n)}n.live&&(this.push.on("complete",o.pull.cancel.bind(o.pull)),this.pull.on("complete",o.push.cancel.bind(o.push))),this.on("newListener",(function(e){"change"===e?(m(o.pull,"change",s),m(o.push,"change",l)):"denied"===e?(m(o.pull,"denied",u),m(o.push,"denied",c)):"active"===e?(m(o.pull,"active",f),m(o.push,"active",h)):"paused"===e&&(m(o.pull,"paused",d),m(o.push,"paused",p))})),this.on("removeListener",(function(e){"change"===e?(o.pull.removeListener("change",s),o.push.removeListener("change",l)):"denied"===e?(o.pull.removeListener("denied",u),o.push.removeListener("denied",c)):"active"===e?(o.pull.removeListener("active",f),o.push.removeListener("active",h)):"paused"===e&&(o.pull.removeListener("paused",d),o.push.removeListener("paused",p))})),this.pull.on("removeListener",v("pull")),this.push.on("removeListener",v("push"));var y=Promise.all([this.push,this.pull]).then((function(e){var t={push:e[0],pull:e[1]};return o.emit("complete",t),r&&r(null,t),o.removeAllListeners(),t}),(function(e){if(o.cancel(),r?r(e):o.emit("error",e),o.removeAllListeners(),r)throw e}));this.then=function(e,t){return y.then(e,t)},this.catch=function(e){return y.catch(e)}}Se()(Eo,_e()),Eo.prototype.cancel=function(){this.cancelled=!0,this.state="cancelled",this.emit("cancel")},Eo.prototype.ready=function(e,t){var n=this;function r(){n.cancel()}n._readyCalled||(n._readyCalled=!0,e.once("destroyed",r),t.once("destroyed",r),n.once("complete",(function(){e.removeListener("destroyed",r),t.removeListener("destroyed",r)})))},Se()(Ao,_e()),Ao.prototype.cancel=function(){this.canceled||(this.canceled=!0,this.push.cancel(),this.pull.cancel())},hn.plugin((function(e){e.adapter("idb",Pr,!0)})).plugin((function(e){e.adapter("http",Hr,!1),e.adapter("https",Hr,!1)})).plugin(uo).plugin((function(e){e.replicate=Ro,e.sync=Oo,Object.defineProperty(e.prototype,"replicate",{get:function(){var e=this;return"undefined"===typeof this.replicateMethods&&(this.replicateMethods={from:function(t,n,r){return e.constructor.replicate(t,e,n,r)},to:function(t,n,r){return e.constructor.replicate(e,t,n,r)}}),this.replicateMethods}}),e.prototype.sync=function(e,t,n){return this.constructor.sync(this,e,t,n)}}));var Po=hn;function To(e,t){return console.log("updating pdb"),e.all().then((function(e){var n={};Object.values(e).forEach((function(e){if("schedule"!==e.type){var t=e.$id.substring(0,2),r="qm"===t||"qf"===t||"sf"===t||"fi"===t;if(console.log(t+r),r){var o=e.$id.split("_")[1];console.log(e),function(e,t){"undefined"===typeof t[e]&&(t[e]={team_number:e,matches_played:0,notes:[],data_sets:{upper_hub_auto:[],lower_hub_auto:[],upper_hub_teleop:[],lower_hub_teleop:[],auto_points:[],teleop_hub_points:[],climb_points:[],total_match_points:[]},climb_counts:[0,0,0,0,0],average_auto_points:0,average_teleop_hub_points:0,average_climb_points:0,average_total_match_points:0,num_disables:0,num_flips:0,fouls:0,fouls_tech:0,red_cards:0,yellow_cards:0})}(o,n),function(e,t){console.log("MATCH: "+e._id),t.matches_played++;var n=(parseInt(e.taxi_auto)?2:0)+4*parseInt(e.upper_hub_auto)+2*parseInt(e.lower_hub_auto),r=2*parseInt(e.upper_hub_teleop)+1*parseInt(e.lower_hub_teleop),o=(0==parseInt(e.climb_level)?4:0)+(1==parseInt(e.climb_level)?6:0)+(2==parseInt(e.climb_level)?10:0)+(3==parseInt(e.climb_level)?15:0),i=n+r+o;t.data_sets.upper_hub_auto.push(parseInt(e.upper_hub_auto)),t.data_sets.lower_hub_auto.push(parseInt(e.lower_hub_auto)),t.data_sets.upper_hub_teleop.push(parseInt(e.upper_hub_teleop)),t.data_sets.lower_hub_teleop.push(parseInt(e.lower_hub_teleop)),t.data_sets.auto_points.push(n),t.data_sets.teleop_hub_points.push(r),t.data_sets.climb_points.push(o),t.data_sets.total_match_points.push(i),t.climb_counts[parseInt(e.climb_level)]++,t.num_disables+=e.disabled?1:0,t.num_flips+=e.flipped?1:0,t.fouls+=parseInt(e.fouls),t.fouls_tech+=parseInt(e.fouls_tech),t.red_cards+=parseInt(e.red_cards),t.yellow_cards+=parseInt(e.yellow_cards);var a=function(e,t){return e+t};t.average_auto_points=t.data_sets.auto_points.reduce(a,0)/t.matches_played,t.average_teleop_hub_points=t.data_sets.teleop_hub_points.reduce(a,0)/t.matches_played,t.average_climb_points=t.data_sets.climb_points.reduce(a,0)/t.matches_played,t.average_total_match_points=t.data_sets.total_match_points.reduce(a,0)/t.matches_played}(e,n[o])}}})),t({teamData:n,matchData:{}})})).catch((function(e){console.log("Error while processing data!"),console.error(e)}))}var Do=e.createContext();function ko(){return(0,e.useContext)(Do)}function No(t){var n=t.children,r=Lo().localdb,o=m((0,e.useState)(null),2),i=o[0],a=o[1];return r.delta.on("update",(function(e){To(r,a)})),(0,h.jsx)(Do.Provider,{value:{processedDataBucket:i,setProcessedDataBucket:a},children:n})}Po.plugin(n(6474));var Mo=e.createContext(),Io=e.createContext();function Lo(){return(0,e.useContext)(Mo)}function Fo(){return(0,e.useContext)(Io)}function Go(t){var n=t.children,r=m((0,e.useState)(new Po("utah_fr")),2),o=r[0],i=r[1],a=m((0,e.useState)(new Po("http://"+window.location.hostname+":5984/utah_fr",{auth:{username:"scouting",password:"Ridgebotics"}})),2),s=a[0],l=a[1];return o.deltaInit(),o.sync(s,{live:!0,retry:!0}),o.on("update",console.log),(0,e.useEffect)((function(){console.log("SYNCSYNCSYNCSYNCSYNC")}),[o,s]),(0,h.jsx)(Mo.Provider,{value:{localdb:o,setLocaldb:i},children:(0,h.jsx)(Io.Provider,{value:{remotedb:s,setRemotedb:l},children:n})})}var Ho=function(){return(0,h.jsx)("div",{children:(0,h.jsx)("h3",{children:"404 Page Not Found!"})})};function Wo(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Vo(e){var t,n,r="";if("string"===typeof e||"number"===typeof e)r+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Vo(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function jo(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Vo(e))&&(r&&(r+=" "),r+=t);return r}var Bo=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},zo=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Uo=Bo((function(e){return zo.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var Yo=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(Xw){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Xo=Math.abs,qo=String.fromCharCode,Ko=Object.assign;function $o(e){return e.trim()}function Qo(e,t,n){return e.replace(t,n)}function Zo(e,t){return e.indexOf(t)}function Jo(e,t){return 0|e.charCodeAt(t)}function ei(e,t,n){return e.slice(t,n)}function ti(e){return e.length}function ni(e){return e.length}function ri(e,t){return t.push(e),e}var oi=1,ii=1,ai=0,si=0,li=0,ci="";function ui(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:oi,column:ii,length:a,return:""}}function pi(e,t){return Ko(ui("",null,null,"",null,null,0),e,{length:-e.length},t)}function di(){return li=si>0?Jo(ci,--si):0,ii--,10===li&&(ii=1,oi--),li}function hi(){return li=si<ai?Jo(ci,si++):0,ii++,10===li&&(ii=1,oi++),li}function fi(){return Jo(ci,si)}function gi(){return si}function vi(e,t){return ei(ci,e,t)}function mi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yi(e){return oi=ii=1,ai=ti(ci=e),si=0,[]}function bi(e){return ci="",e}function wi(e){return $o(vi(si-1,Si(91===e?e+2:40===e?e+1:e)))}function Ci(e){for(;(li=fi())&&li<33;)hi();return mi(e)>2||mi(li)>3?"":" "}function xi(e,t){for(;--t&&hi()&&!(li<48||li>102||li>57&&li<65||li>70&&li<97););return vi(e,gi()+(t<6&&32==fi()&&32==hi()))}function Si(e){for(;hi();)switch(li){case e:return si;case 34:case 39:34!==e&&39!==e&&Si(li);break;case 40:41===e&&Si(e);break;case 92:hi()}return si}function Ei(e,t){for(;hi()&&e+li!==57&&(e+li!==84||47!==fi()););return"/*"+vi(t,si-1)+"*"+qo(47===e?e:hi())}function _i(e){for(;!mi(fi());)hi();return vi(e,si)}var Ri="-ms-",Oi="-moz-",Ai="-webkit-",Pi="comm",Ti="rule",Di="decl",ki="@keyframes";function Ni(e,t){for(var n="",r=ni(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Mi(e,t,n,r){switch(e.type){case"@import":case Di:return e.return=e.return||e.value;case Pi:return"";case ki:return e.return=e.value+"{"+Ni(e.children,r)+"}";case Ti:e.value=e.props.join(",")}return ti(n=Ni(e.children,r))?e.return=e.value+"{"+n+"}":""}function Ii(e,t){switch(function(e,t){return(((t<<2^Jo(e,0))<<2^Jo(e,1))<<2^Jo(e,2))<<2^Jo(e,3)}(e,t)){case 5103:return Ai+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ai+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ai+e+Oi+e+Ri+e+e;case 6828:case 4268:return Ai+e+Ri+e+e;case 6165:return Ai+e+Ri+"flex-"+e+e;case 5187:return Ai+e+Qo(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return Ai+e+Ri+"flex-item-"+Qo(e,/flex-|-self/,"")+e;case 4675:return Ai+e+Ri+"flex-line-pack"+Qo(e,/align-content|flex-|-self/,"")+e;case 5548:return Ai+e+Ri+Qo(e,"shrink","negative")+e;case 5292:return Ai+e+Ri+Qo(e,"basis","preferred-size")+e;case 6060:return Ai+"box-"+Qo(e,"-grow","")+Ai+e+Ri+Qo(e,"grow","positive")+e;case 4554:return Ai+Qo(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return Qo(Qo(Qo(e,/(zoom-|grab)/,Ai+"$1"),/(image-set)/,Ai+"$1"),e,"")+e;case 5495:case 3959:return Qo(e,/(image-set\([^]*)/,Ai+"$1$`$1");case 4968:return Qo(Qo(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ai+e+e;case 4095:case 3583:case 4068:case 2532:return Qo(e,/(.+)-inline(.+)/,Ai+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ti(e)-1-t>6)switch(Jo(e,t+1)){case 109:if(45!==Jo(e,t+4))break;case 102:return Qo(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+Oi+(108==Jo(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Zo(e,"stretch")?Ii(Qo(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Jo(e,t+1))break;case 6444:switch(Jo(e,ti(e)-3-(~Zo(e,"!important")&&10))){case 107:return Qo(e,":",":"+Ai)+e;case 101:return Qo(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ai+(45===Jo(e,14)?"inline-":"")+"box$3$1"+Ai+"$2$3$1"+Ri+"$2box$3")+e}break;case 5936:switch(Jo(e,t+11)){case 114:return Ai+e+Ri+Qo(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ai+e+Ri+Qo(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ai+e+Ri+Qo(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ai+e+Ri+e+e}return e}function Li(e){return bi(Fi("",null,null,null,[""],e=yi(e),0,[0],e))}function Fi(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,p=a,d=0,h=0,f=0,g=1,v=1,m=1,y=0,b="",w=o,C=i,x=r,S=b;v;)switch(f=y,y=hi()){case 40:if(108!=f&&58==S.charCodeAt(p-1)){-1!=Zo(S+=Qo(wi(y),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:S+=wi(y);break;case 9:case 10:case 13:case 32:S+=Ci(f);break;case 92:S+=xi(gi()-1,7);continue;case 47:switch(fi()){case 42:case 47:ri(Hi(Ei(hi(),gi()),t,n),l);break;default:S+="/"}break;case 123*g:s[c++]=ti(S)*m;case 125*g:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+u:h>0&&ti(S)-p&&ri(h>32?Wi(S+";",r,n,p-1):Wi(Qo(S," ","")+";",r,n,p-2),l);break;case 59:S+=";";default:if(ri(x=Gi(S,t,n,c,u,o,s,b,w=[],C=[],p),i),123===y)if(0===u)Fi(S,t,x,x,w,i,p,s,C);else switch(d){case 100:case 109:case 115:Fi(e,x,x,r&&ri(Gi(e,x,x,0,0,o,s,b,o,w=[],p),C),o,C,p,s,r?w:C);break;default:Fi(S,x,x,x,[""],C,0,s,C)}}c=u=h=0,g=m=1,b=S="",p=a;break;case 58:p=1+ti(S),h=f;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==di())continue;switch(S+=qo(y),y*g){case 38:m=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(ti(S)-1)*m,m=1;break;case 64:45===fi()&&(S+=wi(hi())),d=fi(),u=p=ti(b=S+=_i(gi())),y++;break;case 45:45===f&&2==ti(S)&&(g=0)}}return i}function Gi(e,t,n,r,o,i,a,s,l,c,u){for(var p=o-1,d=0===o?i:[""],h=ni(d),f=0,g=0,v=0;f<r;++f)for(var m=0,y=ei(e,p+1,p=Xo(g=a[f])),b=e;m<h;++m)(b=$o(g>0?d[m]+" "+y:Qo(y,/&\f/g,d[m])))&&(l[v++]=b);return ui(e,t,n,0===o?Ti:s,l,c,u)}function Hi(e,t,n){return ui(e,t,n,Pi,qo(li),ei(e,2,-2),0)}function Wi(e,t,n,r){return ui(e,t,n,Di,ei(e,0,r),ei(e,r+1,-1),r)}var Vi=function(e,t,n){for(var r=0,o=0;r=o,o=fi(),38===r&&12===o&&(t[n]=1),!mi(o);)hi();return vi(e,si)},ji=function(e,t){return bi(function(e,t){var n=-1,r=44;do{switch(mi(r)){case 0:38===r&&12===fi()&&(t[n]=1),e[n]+=Vi(si-1,t,n);break;case 2:e[n]+=wi(r);break;case 4:if(44===r){e[++n]=58===fi()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=qo(r)}}while(r=hi());return e}(yi(e),t))},Bi=new WeakMap,zi=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Bi.get(n))&&!r){Bi.set(e,!0);for(var o=[],i=ji(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},Ui=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},Yi=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Di:e.return=Ii(e.value,e.length);break;case ki:return Ni([pi(e,{value:Qo(e.value,"@","@"+Ai)})],r);case Ti:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ni([pi(e,{props:[Qo(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Ni([pi(e,{props:[Qo(t,/:(plac\w+)/,":-webkit-input-$1")]}),pi(e,{props:[Qo(t,/:(plac\w+)/,":-moz-$1")]}),pi(e,{props:[Qo(t,/:(plac\w+)/,Ri+"input-$1")]})],r)}return""}))}}],Xi=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||Yi;var o,i,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u=[Mi,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],p=function(e){var t=ni(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([zi,Ui].concat(r,u));i=function(e,t,n,r){l=n,function(e){Ni(Li(e),p)}(e?e+"{"+t.styles+"}":t.styles),r&&(d.inserted[t.name]=!0)};var d={key:t,sheet:new Yo({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return d.sheet.hydrate(s),d};var qi=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Ki={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var $i=/[A-Z]|^ms/g,Qi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zi=function(e){return 45===e.charCodeAt(1)},Ji=function(e){return null!=e&&"boolean"!==typeof e},ea=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return Zi(e)?e:e.replace($i,"-$&").toLowerCase()})),ta=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(Qi,(function(e,t,n){return ra={name:t,styles:n,next:ra},t}))}return 1===Ki[e]||Zi(e)||"number"!==typeof t||0===t?t:t+"px"};function na(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return ra={name:n.name,styles:n.styles,next:ra},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)ra={name:r.name,styles:r.styles,next:ra},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=na(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!==typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Ji(a)&&(r+=ea(i)+":"+ta(i,a)+";");else if(!Array.isArray(a)||"string"!==typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=na(e,t,a);switch(i){case"animation":case"animationName":r+=ea(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Ji(a[l])&&(r+=ea(i)+":"+ta(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=ra,i=n(e);return ra=o,na(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var ra,oa=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var ia=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";ra=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=na(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=na(n,t,e[a]),r&&(o+=i[a]);oa.lastIndex=0;for(var s,l="";null!==(s=oa.exec(o));)l+="-"+s[1];return{name:qi(o)+l,styles:o,next:ra}},aa=(0,e.createContext)("undefined"!==typeof HTMLElement?Xi({key:"css"}):null);aa.Provider;var sa=function(t){return(0,e.forwardRef)((function(n,r){var o=(0,e.useContext)(aa);return t(n,o,r)}))},la=(0,e.createContext)({});t.useInsertionEffect&&t.useInsertionEffect;function ca(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var ua=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},pa=/[A-Z]|^ms/g,da=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ha=function(e){return 45===e.charCodeAt(1)},fa=function(e){return null!=e&&"boolean"!==typeof e},ga=Bo((function(e){return ha(e)?e:e.replace(pa,"-$&").toLowerCase()})),va=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(da,(function(e,t,n){return ya={name:t,styles:n,next:ya},t}))}return 1===Ki[e]||ha(e)||"number"!==typeof t||0===t?t:t+"px"};function ma(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return ya={name:n.name,styles:n.styles,next:ya},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)ya={name:r.name,styles:r.styles,next:ya},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ma(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!==typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":fa(a)&&(r+=ga(i)+":"+va(i,a)+";");else if(!Array.isArray(a)||"string"!==typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=ma(e,t,a);switch(i){case"animation":case"animationName":r+=ga(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)fa(a[l])&&(r+=ga(i)+":"+va(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=ya,i=n(e);return ya=o,ma(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var ya,ba=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var wa=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";ya=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=ma(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=ma(n,t,e[a]),r&&(o+=i[a]);ba.lastIndex=0;for(var s,l="";null!==(s=ba.exec(o));)l+="-"+s[1];return{name:qi(o)+l,styles:o,next:ya}},Ca=Uo,xa=function(e){return"theme"!==e},Sa=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?Ca:xa},Ea=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},_a=t.useInsertionEffect?t.useInsertionEffect:function(e){e()};var Ra=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;ua(t,n,r);var o;o=function(){return function(e,t,n){ua(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)},_a(o);return null},Oa=function t(n,r){var o,i,a=n.__emotion_real===n,s=a&&n.__emotion_base||n;void 0!==r&&(o=r.label,i=r.target);var l=Ea(n,r,a),c=l||Sa(s),u=!c("as");return function(){var p=arguments,d=a&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==o&&d.push("label:"+o+";"),null==p[0]||void 0===p[0].raw)d.push.apply(d,p);else{0,d.push(p[0][0]);for(var h=p.length,f=1;f<h;f++)d.push(p[f],p[0][f])}var g=sa((function(t,n,r){var o=u&&t.as||s,a="",p=[],h=t;if(null==t.theme){for(var f in h={},t)h[f]=t[f];h.theme=(0,e.useContext)(la)}"string"===typeof t.className?a=ca(n.registered,p,t.className):null!=t.className&&(a=t.className+" ");var g=wa(d.concat(p),n.registered,h);a+=n.key+"-"+g.name,void 0!==i&&(a+=" "+i);var v=u&&void 0===l?Sa(o):c,m={};for(var y in t)u&&"as"===y||v(y)&&(m[y]=t[y]);return m.className=a,m.ref=r,(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ra,{cache:n,serialized:g,isStringTag:"string"===typeof o}),(0,e.createElement)(o,m))}));return g.displayName=void 0!==o?o:"Styled("+("string"===typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=n.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=d,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+i}}),g.withComponent=function(e,n){return t(e,y({},r,n,{shouldForwardProp:Ea(g,n,!0)})).apply(void 0,d)},g}},Aa=Oa.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Aa[e]=Aa(e)}));var Pa=Aa;function Ta(e,t){return Pa(e,t)}function Da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ka(e){return null!==e&&"object"===typeof e&&e.constructor===Object}function Na(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?y({},e):e;return ka(e)&&ka(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(ka(t[o])&&o in e&&ka(e[o])?r[o]=Na(e[o],t[o],n):r[o]=t[o])})),r}var Ma=function(e,t){return t?Na(e,t,{clone:!1}):e};function Ia(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function La(e){if("string"!==typeof e)throw new Error(Ia(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Fa={xs:0,sm:600,md:900,lg:1200,xl:1536},Ga={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(Fa[e],"px)")}};function Ha(e,t,n){var r=e.theme||{};if(Array.isArray(t)){var o=r.breakpoints||Ga;return t.reduce((function(e,r,i){return e[o.up(o.keys[i])]=n(t[i]),e}),{})}if("object"===typeof t){var i=r.breakpoints||Ga;return Object.keys(t).reduce((function(e,r){if(-1!==Object.keys(i.values||Fa).indexOf(r)){e[i.up(r)]=n(t[r],r)}else{var o=r;e[o]=t[o]}return e}),{})}return n(t)}function Wa(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=null==t||null==(e=t.keys)?void 0:e.reduce((function(e,n){return e[t.up(n)]={},e}),{});return n||{}}function Va(e,t){return e.reduce((function(e,t){var n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function ja(e,t){return t&&"string"===typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}function Ba(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:ja(e,n)||o,t&&(r=t(r)),r}var za=function(e){var t=e.prop,n=e.cssProperty,r=void 0===n?e.prop:n,o=e.themeKey,i=e.transform,a=function(e){if(null==e[t])return null;var n=e[t],a=ja(e.theme,o)||{};return Ha(e,n,(function(e){var n=Ba(a,i,e);return e===n&&"string"===typeof e&&(n=Ba(a,i,"".concat(t).concat("default"===e?"":La(e)),e)),!1===r?n:Da({},r,n)}))};return a.propTypes={},a.filterProps=[t],a};var Ua=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce((function(e,t){return t.filterProps.forEach((function(n){e[n]=t})),e}),{}),o=function(e){return Object.keys(e).reduce((function(t,n){return r[n]?Ma(t,r[n](e)):t}),{})};return o.propTypes={},o.filterProps=t.reduce((function(e,t){return e.concat(t.filterProps)}),[]),o};var Ya={m:"margin",p:"padding"},Xa={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},qa={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ka=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!qa[e])return[e];e=qa[e]}var t=m(e.split(""),2),n=t[0],r=t[1],o=Ya[n],i=Xa[r]||"";return Array.isArray(i)?i.map((function(e){return o+e})):[o+i]})),$a=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Qa=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Za=[].concat($a,Qa);function Ja(e,t,n,r){var o=ja(e,t)||n;return"number"===typeof o?function(e){return"string"===typeof e?e:o*e}:Array.isArray(o)?function(e){return"string"===typeof e?e:o[e]}:"function"===typeof o?o:function(){}}function es(e){return Ja(e,"spacing",8)}function ts(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function ns(e,t,n,r){if(-1===t.indexOf(n))return null;var o=function(e,t){return function(n){return e.reduce((function(e,r){return e[r]=ts(t,n),e}),{})}}(Ka(n),r);return Ha(e,e[n],o)}function rs(e,t){var n=es(e.theme);return Object.keys(e).map((function(r){return ns(e,t,r,n)})).reduce(Ma,{})}function os(e){return rs(e,$a)}function is(e){return rs(e,Qa)}function as(e){return rs(e,Za)}os.propTypes={},os.filterProps=$a,is.propTypes={},is.filterProps=Qa,as.propTypes={},as.filterProps=Za;var ss=as;function ls(e){return"number"!==typeof e?e:"".concat(e,"px solid")}var cs=za({prop:"border",themeKey:"borders",transform:ls}),us=za({prop:"borderTop",themeKey:"borders",transform:ls}),ps=za({prop:"borderRight",themeKey:"borders",transform:ls}),ds=za({prop:"borderBottom",themeKey:"borders",transform:ls}),hs=za({prop:"borderLeft",themeKey:"borders",transform:ls}),fs=za({prop:"borderColor",themeKey:"palette"}),gs=za({prop:"borderTopColor",themeKey:"palette"}),vs=za({prop:"borderRightColor",themeKey:"palette"}),ms=za({prop:"borderBottomColor",themeKey:"palette"}),ys=za({prop:"borderLeftColor",themeKey:"palette"}),bs=function(e){if(void 0!==e.borderRadius&&null!==e.borderRadius){var t=Ja(e.theme,"shape.borderRadius",4);return Ha(e,e.borderRadius,(function(e){return{borderRadius:ts(t,e)}}))}return null};bs.propTypes={},bs.filterProps=["borderRadius"];var ws=Ua(cs,us,ps,ds,hs,fs,gs,vs,ms,ys,bs),Cs=Ua(za({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),za({prop:"display"}),za({prop:"overflow"}),za({prop:"textOverflow"}),za({prop:"visibility"}),za({prop:"whiteSpace"})),xs=Ua(za({prop:"flexBasis"}),za({prop:"flexDirection"}),za({prop:"flexWrap"}),za({prop:"justifyContent"}),za({prop:"alignItems"}),za({prop:"alignContent"}),za({prop:"order"}),za({prop:"flex"}),za({prop:"flexGrow"}),za({prop:"flexShrink"}),za({prop:"alignSelf"}),za({prop:"justifyItems"}),za({prop:"justifySelf"})),Ss=function(e){if(void 0!==e.gap&&null!==e.gap){var t=Ja(e.theme,"spacing",8);return Ha(e,e.gap,(function(e){return{gap:ts(t,e)}}))}return null};Ss.propTypes={},Ss.filterProps=["gap"];var Es=function(e){if(void 0!==e.columnGap&&null!==e.columnGap){var t=Ja(e.theme,"spacing",8);return Ha(e,e.columnGap,(function(e){return{columnGap:ts(t,e)}}))}return null};Es.propTypes={},Es.filterProps=["columnGap"];var _s=function(e){if(void 0!==e.rowGap&&null!==e.rowGap){var t=Ja(e.theme,"spacing",8);return Ha(e,e.rowGap,(function(e){return{rowGap:ts(t,e)}}))}return null};_s.propTypes={},_s.filterProps=["rowGap"];var Rs=Ua(Ss,Es,_s,za({prop:"gridColumn"}),za({prop:"gridRow"}),za({prop:"gridAutoFlow"}),za({prop:"gridAutoColumns"}),za({prop:"gridAutoRows"}),za({prop:"gridTemplateColumns"}),za({prop:"gridTemplateRows"}),za({prop:"gridTemplateAreas"}),za({prop:"gridArea"})),Os=Ua(za({prop:"position"}),za({prop:"zIndex",themeKey:"zIndex"}),za({prop:"top"}),za({prop:"right"}),za({prop:"bottom"}),za({prop:"left"})),As=Ua(za({prop:"color",themeKey:"palette"}),za({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),za({prop:"backgroundColor",themeKey:"palette"})),Ps=za({prop:"boxShadow",themeKey:"shadows"});function Ts(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}var Ds=za({prop:"width",transform:Ts}),ks=function(e){if(void 0!==e.maxWidth&&null!==e.maxWidth){return Ha(e,e.maxWidth,(function(t){var n,r,o;return{maxWidth:(null==(n=e.theme)||null==(r=n.breakpoints)||null==(o=r.values)?void 0:o[t])||Fa[t]||Ts(t)}}))}return null};ks.filterProps=["maxWidth"];var Ns=za({prop:"minWidth",transform:Ts}),Ms=za({prop:"height",transform:Ts}),Is=za({prop:"maxHeight",transform:Ts}),Ls=za({prop:"minHeight",transform:Ts}),Fs=(za({prop:"size",cssProperty:"width",transform:Ts}),za({prop:"size",cssProperty:"height",transform:Ts}),Ua(Ds,ks,Ns,Ms,Is,Ls,za({prop:"boxSizing"}))),Gs=za({prop:"fontFamily",themeKey:"typography"}),Hs=za({prop:"fontSize",themeKey:"typography"}),Ws=za({prop:"fontStyle",themeKey:"typography"}),Vs=za({prop:"fontWeight",themeKey:"typography"}),js=za({prop:"letterSpacing"}),Bs=za({prop:"textTransform"}),zs=za({prop:"lineHeight"}),Us=za({prop:"textAlign"}),Ys=Ua(za({prop:"typography",cssProperty:!1,themeKey:"typography"}),Gs,Hs,Ws,Vs,js,zs,Us,Bs),Xs={borders:ws.filterProps,display:Cs.filterProps,flexbox:xs.filterProps,grid:Rs.filterProps,positions:Os.filterProps,palette:As.filterProps,shadows:Ps.filterProps,sizing:Fs.filterProps,spacing:ss.filterProps,typography:Ys.filterProps},qs={borders:ws,display:Cs,flexbox:xs,grid:Rs,positions:Os,palette:As,shadows:Ps,sizing:Fs,spacing:ss,typography:Ys},Ks=Object.keys(Xs).reduce((function(e,t){return Xs[t].forEach((function(n){e[n]=qs[t]})),e}),{});function $s(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce((function(e,t){return e.concat(Object.keys(t))}),[]),o=new Set(r);return t.every((function(e){return o.size===Object.keys(e).length}))}function Qs(e,t){return"function"===typeof e?e(t):e}var Zs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qs,t=Object.keys(e).reduce((function(t,n){return e[n].filterProps.forEach((function(r){t[r]=e[n]})),t}),{});function n(e,n,r){var o,i=(Da(o={},e,n),Da(o,"theme",r),o),a=t[e];return a?a(i):Da({},e,n)}function r(e){var o=e||{},i=o.sx,a=o.theme,s=void 0===a?{}:a;if(!i)return null;function l(e){var o=e;if("function"===typeof e)o=e(s);else if("object"!==typeof e)return e;if(!o)return null;var i=Wa(s.breakpoints),a=Object.keys(i),l=i;return Object.keys(o).forEach((function(e){var i=Qs(o[e],s);if(null!==i&&void 0!==i)if("object"===typeof i)if(t[e])l=Ma(l,n(e,i,s));else{var a=Ha({theme:s},i,(function(t){return Da({},e,t)}));$s(a,i)?l[e]=r({sx:i,theme:s}):l=Ma(l,a)}else l=Ma(l,n(e,i,s))})),Va(a,l)}return Array.isArray(i)?i.map(l):l(i)}return r}();Zs.filterProps=["sx"];var Js=Zs;function el(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tl=["sx"];function nl(e){var t,n=e.sx,r=function(e){var t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((function(n){Ks[n]?t.systemProps[n]=e[n]:t.otherProps[n]=e[n]})),t}(Wo(e,tl)),o=r.systemProps,i=r.otherProps;return t=Array.isArray(n)?[o].concat(el(n)):"function"===typeof n?function(){var e=n.apply(void 0,arguments);return ka(e)?y({},o,e):o}:y({},o,n),y({},i,{sx:t})}var rl=["values","unit","step"];function ol(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:900,lg:1200,xl:1536}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=Wo(e,rl),l=function(e){var t=Object.keys(e).map((function(t){return{key:t,val:e[t]}}))||[];return t.sort((function(e,t){return e.val-t.val})),t.reduce((function(e,t){return y({},e,Da({},t.key,t.val))}),{})}(n),c=Object.keys(l);function u(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function p(e){var t="number"===typeof n[e]?n[e]:e;return"@media (max-width:".concat(t-a/100).concat(o,")")}function d(e,t){var r=c.indexOf(t);return"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[c[r]]?n[c[r]]:t)-a/100).concat(o,")")}return y({keys:c,values:l,up:u,down:p,between:d,only:function(e){return c.indexOf(e)+1<c.length?d(e,c[c.indexOf(e)+1]):u(e)},not:function(e){var t=c.indexOf(e);return 0===t?u(c[1]):t===c.length-1?p(c[t]):d(e,c[c.indexOf(e)+1]).replace("@media","@media not all and")},unit:o},s)}var il={borderRadius:4};function al(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=es({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=0===n.length?[1]:n;return o.map((function(e){var n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return n.mui=!0,n}var sl=["breakpoints","palette","spacing","shape"];var ll=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.palette,o=void 0===r?{}:r,i=e.spacing,a=e.shape,s=void 0===a?{}:a,l=Wo(e,sl),c=ol(n),u=al(i),p=Na({breakpoints:c,direction:"ltr",components:{},palette:y({mode:"light"},o),spacing:u,shape:y({},il,s)},l),d=arguments.length,h=new Array(d>1?d-1:0),f=1;f<d;f++)h[f-1]=arguments[f];return p=h.reduce((function(e,t){return Na(e,t)}),p)};var cl=e.createContext(null);function ul(){return e.useContext(cl)}function pl(e){return 0===Object.keys(e).length}var dl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=ul();return!t||pl(t)?e:t},hl=ll();var fl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hl;return dl(e)},gl=["className","component"];var vl=function(e){return e},ml=function(){var e=vl;return{configure:function(t){e=t},generate:function(t){return e(t)},reset:function(){e=vl}}}();function yl(e,t,n){var r;return y({toolbar:(r={minHeight:56},Da(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Da(r,e.up("sm"),{minHeight:64}),r)},n)}function bl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function wl(e){if(e.type)return e;if("#"===e.charAt(0))return wl(function(e){e=e.slice(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(Ia(9,e));var r,o=e.substring(t+1,e.length-1);if("color"===n){if(r=(o=o.split(" ")).shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error(Ia(10,r))}else o=o.split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)})),colorSpace:r}}function Cl(e){var t=e.type,n=e.colorSpace,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function xl(e){var t="hsl"===(e=wl(e)).type?wl(function(e){var t=(e=wl(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Cl({type:s,values:l})}(e)).values:e.values;return t=t.map((function(t){return"color"!==e.type&&(t/=255),t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Sl(e,t){return e=wl(e),t=bl(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,Cl(e)}function El(e,t){if(e=wl(e),t=bl(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return Cl(e)}function _l(e,t){if(e=wl(e),t=bl(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(var r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Cl(e)}var Rl={black:"#000",white:"#fff"},Ol={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Al={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Pl={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Tl={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Dl={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},kl={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Nl={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ml=["mode","contrastThreshold","tonalOffset"],Il={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Rl.white,default:Rl.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Ll={text:{primary:Rl.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Rl.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Fl(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=_l(e.main,o):"dark"===t&&(e.dark=El(e.main,i)))}function Gl(e){var t=e.mode,n=void 0===t?"light":t,r=e.contrastThreshold,o=void 0===r?3:r,i=e.tonalOffset,a=void 0===i?.2:i,s=Wo(e,Ml),l=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Dl[200],light:Dl[50],dark:Dl[400]}:{main:Dl[700],light:Dl[400],dark:Dl[800]}}(n),c=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Al[200],light:Al[50],dark:Al[400]}:{main:Al[500],light:Al[300],dark:Al[700]}}(n),u=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Pl[500],light:Pl[300],dark:Pl[700]}:{main:Pl[700],light:Pl[400],dark:Pl[800]}}(n),p=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:kl[400],light:kl[300],dark:kl[700]}:{main:kl[700],light:kl[500],dark:kl[900]}}(n),d=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Nl[400],light:Nl[300],dark:Nl[700]}:{main:Nl[800],light:Nl[500],dark:Nl[900]}}(n),h=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Tl[400],light:Tl[300],dark:Tl[700]}:{main:"#ed6c02",light:Tl[500],dark:Tl[900]}}(n);function f(e){var t=function(e,t){var n=xl(e),r=xl(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Ll.text.primary)>=o?Ll.text.primary:Il.text.primary;return t}var g=function(e){var t=e.color,n=e.name,r=e.mainShade,o=void 0===r?500:r,i=e.lightShade,s=void 0===i?300:i,l=e.darkShade,c=void 0===l?700:l;if(!(t=y({},t)).main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error(Ia(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error(Ia(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return Fl(t,"light",s,a),Fl(t,"dark",c,a),t.contrastText||(t.contrastText=f(t.main)),t},v={dark:Ll,light:Il};return Na(y({common:Rl,mode:n,primary:g({color:l,name:"primary"}),secondary:g({color:c,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:u,name:"error"}),warning:g({color:h,name:"warning"}),info:g({color:p,name:"info"}),success:g({color:d,name:"success"}),grey:Ol,contrastThreshold:o,getContrastText:f,augmentColor:g,tonalOffset:a},v[n]),s)}var Hl=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];var Wl={textTransform:"uppercase"},Vl='"Roboto", "Helvetica", "Arial", sans-serif';function jl(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,o=void 0===r?Vl:r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,c=n.fontWeightRegular,u=void 0===c?400:c,p=n.fontWeightMedium,d=void 0===p?500:p,h=n.fontWeightBold,f=void 0===h?700:h,g=n.htmlFontSize,v=void 0===g?16:g,m=n.allVariants,b=n.pxToRem,w=Wo(n,Hl);var C=a/14,x=b||function(e){return"".concat(e/v*C,"rem")},S=function(e,t,n,r,i){return y({fontFamily:o,fontWeight:e,fontSize:x(t),lineHeight:n},o===Vl?{letterSpacing:"".concat((a=r/t,Math.round(1e5*a)/1e5),"em")}:{},i,m);var a},E={h1:S(l,96,1.167,-1.5),h2:S(l,60,1.2,-.5),h3:S(u,48,1.167,0),h4:S(u,34,1.235,.25),h5:S(u,24,1.334,0),h6:S(d,20,1.6,.15),subtitle1:S(u,16,1.75,.15),subtitle2:S(d,14,1.57,.1),body1:S(u,16,1.5,.15),body2:S(u,14,1.43,.15),button:S(d,14,1.75,.4,Wl),caption:S(u,12,1.66,.4),overline:S(u,12,2.66,1,Wl)};return Na(y({htmlFontSize:v,pxToRem:x,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:d,fontWeightBold:f},E),w,{clone:!1})}function Bl(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var zl=["none",Bl(0,2,1,-1,0,1,1,0,0,1,3,0),Bl(0,3,1,-2,0,2,2,0,0,1,5,0),Bl(0,3,3,-2,0,3,4,0,0,1,8,0),Bl(0,2,4,-1,0,4,5,0,0,1,10,0),Bl(0,3,5,-1,0,5,8,0,0,1,14,0),Bl(0,3,5,-1,0,6,10,0,0,1,18,0),Bl(0,4,5,-2,0,7,10,1,0,2,16,1),Bl(0,5,5,-3,0,8,10,1,0,3,14,2),Bl(0,5,6,-3,0,9,12,1,0,3,16,2),Bl(0,6,6,-3,0,10,14,1,0,4,18,3),Bl(0,6,7,-4,0,11,15,1,0,4,20,3),Bl(0,7,8,-4,0,12,17,2,0,5,22,4),Bl(0,7,8,-4,0,13,19,2,0,5,24,4),Bl(0,7,9,-4,0,14,21,2,0,5,26,4),Bl(0,8,9,-5,0,15,22,2,0,6,28,5),Bl(0,8,10,-5,0,16,24,2,0,6,30,5),Bl(0,8,11,-5,0,17,26,2,0,6,32,5),Bl(0,9,11,-5,0,18,28,2,0,7,34,6),Bl(0,9,12,-6,0,19,29,2,0,7,36,6),Bl(0,10,13,-6,0,20,31,3,0,8,38,7),Bl(0,10,13,-6,0,21,33,3,0,8,40,7),Bl(0,10,14,-6,0,22,35,3,0,8,42,7),Bl(0,11,14,-7,0,23,36,3,0,9,44,8),Bl(0,11,15,-7,0,24,38,3,0,9,46,8)],Ul=["duration","easing","delay"],Yl={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Xl={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ql(e){return"".concat(Math.round(e),"ms")}function Kl(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}function $l(e){var t=y({},Yl,e.easing),n=y({},Xl,e.duration);return y({getAutoHeightDuration:Kl,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.duration,i=void 0===o?n.standard:o,a=r.easing,s=void 0===a?t.easeInOut:a,l=r.delay,c=void 0===l?0:l;Wo(r,Ul);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof i?i:ql(i)," ").concat(s," ").concat("string"===typeof c?c:ql(c))})).join(",")}},e,{easing:t,duration:n})}var Ql={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Zl=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Jl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mixins,n=void 0===t?{}:t,r=e.palette,o=void 0===r?{}:r,i=e.transitions,a=void 0===i?{}:i,s=e.typography,l=void 0===s?{}:s,c=Wo(e,Zl),u=Gl(o),p=ll(e),d=Na(p,{mixins:yl(p.breakpoints,p.spacing,n),palette:u,shadows:zl.slice(),typography:jl(u,l),transitions:$l(a),zIndex:y({},Ql)});d=Na(d,c);for(var h=arguments.length,f=new Array(h>1?h-1:0),g=1;g<h;g++)f[g-1]=arguments[g];return d=f.reduce((function(e,t){return Na(e,t)}),d)}var ec=Jl,tc=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.defaultTheme,r=t.defaultClassName,o=void 0===r?"MuiBox-root":r,i=t.generateClassName,a=t.styleFunctionSx,s=void 0===a?Js:a,l=Ta("div")(s),c=e.forwardRef((function(e,t){var r=fl(n),a=nl(e),s=a.className,c=a.component,u=void 0===c?"div":c,p=Wo(a,gl);return(0,h.jsx)(l,y({as:u,ref:t,className:jo(s,i?i(o):o),theme:r},p))}));return c}({defaultTheme:ec(),defaultClassName:"MuiBox-root",generateClassName:ml.generate}),nc=tc,rc=n(3496);function oc(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=v(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}var ic=function(e){var t=ko(),n=t.processedDataBucket,r=(t.setProcessedDataBucket,function(e,t){var n=t*e.length;return Math.floor(n)==n?e[n-1]/2+e[n]/2:e[Math.floor(n)]});return(0,h.jsx)(nc,{sx:{width:"350px",height:"220px"},children:(0,h.jsx)(rc.Z,{type:"boxPlot",options:{chart:{type:"boxPlot",width:350},theme:{mode:"dark"},title:{text:e.title}},series:function(e,t,n){var o,i,a=[],s=oc(n);try{for(s.s();!(o=s.n()).done;){var l=o.value;a.push({x:l,y:(i=e.teamData[l].data_sets[t],i.sort(),[i[0],r(i,.25),r(i,.5),r(i,.75),i[i.length-1]])})}}catch(c){s.e(c)}finally{s.f()}return[{type:"boxPlot",data:a}]}(n,e.setName,e.selectedTeams)})})},ac=function(e){var t=ko(),n=t.processedDataBucket;t.setProcessedDataBucket;return null==n?(0,h.jsx)("div",{}):(0,h.jsxs)(nc,{sx:{height:"400px",m:1,display:"flex",flexWrap:"wrap",flexDirection:"row",justifyContent:"center",p:1,gap:2},children:[(0,h.jsx)(ic,{setName:"total_match_points",title:"Total Match Points",selectedTeams:e.selectedTeams}),(0,h.jsx)(ic,{setName:"auto_points",title:"Auto Points",selectedTeams:e.selectedTeams}),(0,h.jsx)(ic,{setName:"teleop_hub_points",title:"Teleop Hub Points",selectedTeams:e.selectedTeams}),(0,h.jsx)(ic,{setName:"climb_points",title:"Climb Points",selectedTeams:e.selectedTeams}),(0,h.jsx)(ic,{setName:"upper_hub_auto",title:"Upper Hub Auto",selectedTeams:e.selectedTeams}),(0,h.jsx)(ic,{setName:"lower_hub_auto",title:"Lower Hub Auto",selectedTeams:e.selectedTeams}),(0,h.jsx)(ic,{setName:"upper_hub_teleop",title:"Upper Hub Teleop",selectedTeams:e.selectedTeams}),(0,h.jsx)(ic,{setName:"lower_hub_teleop",title:"Lower Hub Teleop",selectedTeams:e.selectedTeams})]})},sc=function(e){return e.selectedTeams.length>0?(0,h.jsx)(ac,{selectedTeams:e.selectedTeams}):(0,h.jsx)("div",{})},lc=n(2953),cc=function(){Lo().localdb;var t=ko(),n=t.processedDataBucket,r=(t.setProcessedDataBucket,[]);if(null!=n){Object.values(n.teamData);var o=function(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)};for(var i in n.teamData){var a=n.teamData[i];r.push({id:a.team_number,average_auto_points:o(a.average_auto_points,2),average_teleop_hub_points:o(a.average_teleop_hub_points,2),average_climb_points:o(a.average_climb_points,2),average_total_match_points:o(a.average_total_match_points,2),matches_played:a.matches_played,num_disables:a.num_disables,num_flips:a.num_flips,fouls:a.fouls,fouls_tech:a.fouls_tech,red_cards:a.red_cards,yellow_cards:a.yellow_cards})}}var s=m((0,e.useState)([{field:"id",headerName:"Team",width:100,checkboxSelection:!0,pinned:"left",sortable:!0},{field:"average_total_match_points",headerName:"Avg Total Pts",width:120,sortable:!0},{field:"average_auto_points",headerName:"Avg Auto Pts",width:120,sortable:!0},{field:"average_teleop_hub_points",headerName:"Avg Teleop Hub Pts",width:160,sortable:!0},{field:"average_climb_points",headerName:"Avg Climb Pts",width:120,sortable:!0},{field:"yellow_cards",headerName:"Yellow Cards",width:120,sortable:!0},{field:"red_cards",headerName:"Red Cards",width:100,sortable:!0},{field:"fouls",headerName:"Fouls",width:70,sortable:!0},{field:"fouls_tech",headerName:"Tech Fouls",width:100,sortable:!0},{field:"num_disables",headerName:"Disables",width:100,sortable:!0},{field:"num_flips",headerName:"Flips",width:80,sortable:!0},{field:"matches_played",headerName:"Matches",width:100,sortable:!0},{field:"",headerName:"",width:150,sortable:!0}]),1)[0],l=m((0,e.useState)([]),2),c=l[0],u=l[1],p=(0,e.useRef)(),d=(0,e.useCallback)((function(){var e=p.current.api.getSelectedRows(),t=[];e.forEach((function(e,n){t.push(e.id)})),u(t)}),[c]);return(0,h.jsxs)("div",{children:[(0,h.jsx)(nc,{sx:{height:"400px",m:2},children:(0,h.jsx)("div",{className:"ag-theme-alpine-dark",style:{height:400,width:"100%"},children:(0,h.jsx)(lc.AgGridReact,{ref:p,rowData:r,columnDefs:s,rowSelection:"multiple",rowMultiSelectWithClick:!0,onSelectionChanged:d})})}),(0,h.jsx)(sc,{selectedTeams:c})]})},uc=function(t){var n=Lo(),r=n.localdb,o=n.setLocaldb,i=Fo(),a=i.remotedb,s=i.setRemotedb,l=ko(),c=(l.processedDataBucket,l.setProcessedDataBucket,m(e.useState(r.name),2)),u=(c[0],c[1]);(0,e.useCallback)((function(){r.sync(a,{retry:!0})}),[r,a]),(0,e.useCallback)((function(e){console.log(e.target.value),u(e.target.value),function(e,t,n,r){var o=new Po(e),i=new Po("http://"+window.location.hostname+":5984/"+e,{skip_setup:!0,auth:{username:"scouting",password:"Ridgebotics"}});o.sync(i,{live:!0,retry:!0}),t(o),n(i)}(e.target.value,o,s)}));return(0,h.jsx)("div",{})},pc=function(){return(0,h.jsx)("div",{className:"welcome",children:(0,h.jsxs)(nc,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,h.jsx)("h1",{children:"Welcome to Ridgebotics Scouting Web Application 2022"}),(0,h.jsx)("img",{src:"/picgoeshard.jpg"}),(0,h.jsx)(uc,{})]})})},dc=n(77),hc=n.n(dc),fc=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===gc}(e)}(e)};var gc="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function vc(e,t){return!1!==t.clone&&t.isMergeableObject(e)?yc((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function mc(e,t,n){return e.concat(t).map((function(e){return vc(e,n)}))}function yc(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||mc,n.isMergeableObject=n.isMergeableObject||fc;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=vc(e[t],n)})),Object.keys(t).forEach((function(o){n.isMergeableObject(t[o])&&e[o]?r[o]=yc(e[o],t[o],n):r[o]=vc(t[o],n)})),r}(e,t,n):vc(t,n)}yc.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return yc(e,n,t)}),{})};var bc=yc,wc="object"==typeof global&&global&&global.Object===Object&&global,Cc="object"==typeof self&&self&&self.Object===Object&&self,xc=wc||Cc||Function("return this")(),Sc=xc.Symbol,Ec=Object.prototype,_c=Ec.hasOwnProperty,Rc=Ec.toString,Oc=Sc?Sc.toStringTag:void 0;var Ac=function(e){var t=_c.call(e,Oc),n=e[Oc];try{e[Oc]=void 0;var r=!0}catch(Xw){}var o=Rc.call(e);return r&&(t?e[Oc]=n:delete e[Oc]),o},Pc=Object.prototype.toString;var Tc=function(e){return Pc.call(e)},Dc=Sc?Sc.toStringTag:void 0;var kc=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Dc&&Dc in Object(e)?Ac(e):Tc(e)};var Nc=function(e,t){return function(n){return e(t(n))}},Mc=Nc(Object.getPrototypeOf,Object);var Ic=function(e){return null!=e&&"object"==typeof e},Lc=Function.prototype,Fc=Object.prototype,Gc=Lc.toString,Hc=Fc.hasOwnProperty,Wc=Gc.call(Object);var Vc=function(e){if(!Ic(e)||"[object Object]"!=kc(e))return!1;var t=Mc(e);if(null===t)return!0;var n=Hc.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Gc.call(n)==Wc};var jc=function(){this.__data__=[],this.size=0};var Bc=function(e,t){return e===t||e!==e&&t!==t};var zc=function(e,t){for(var n=e.length;n--;)if(Bc(e[n][0],t))return n;return-1},Uc=Array.prototype.splice;var Yc=function(e){var t=this.__data__,n=zc(t,e);return!(n<0)&&(n==t.length-1?t.pop():Uc.call(t,n,1),--this.size,!0)};var Xc=function(e){var t=this.__data__,n=zc(t,e);return n<0?void 0:t[n][1]};var qc=function(e){return zc(this.__data__,e)>-1};var Kc=function(e,t){var n=this.__data__,r=zc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function $c(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])}}$c.prototype.clear=jc,$c.prototype.delete=Yc,$c.prototype.get=Xc,$c.prototype.has=qc,$c.prototype.set=Kc;var Qc=$c;var Zc=function(){this.__data__=new Qc,this.size=0};var Jc=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var eu=function(e){return this.__data__.get(e)};var tu=function(e){return this.__data__.has(e)};var nu=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var ru=function(e){if(!nu(e))return!1;var t=kc(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},ou=xc["__core-js_shared__"],iu=function(){var e=/[^.]+$/.exec(ou&&ou.keys&&ou.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var au=function(e){return!!iu&&iu in e},su=Function.prototype.toString;var lu=function(e){if(null!=e){try{return su.call(e)}catch(Xw){}try{return e+""}catch(Xw){}}return""},cu=/^\[object .+?Constructor\]$/,uu=Function.prototype,pu=Object.prototype,du=uu.toString,hu=pu.hasOwnProperty,fu=RegExp("^"+du.call(hu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var gu=function(e){return!(!nu(e)||au(e))&&(ru(e)?fu:cu).test(lu(e))};var vu=function(e,t){return null==e?void 0:e[t]};var mu=function(e,t){var n=vu(e,t);return gu(n)?n:void 0},yu=mu(xc,"Map"),bu=mu(Object,"create");var wu=function(){this.__data__=bu?bu(null):{},this.size=0};var Cu=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xu=Object.prototype.hasOwnProperty;var Su=function(e){var t=this.__data__;if(bu){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return xu.call(t,e)?t[e]:void 0},Eu=Object.prototype.hasOwnProperty;var _u=function(e){var t=this.__data__;return bu?void 0!==t[e]:Eu.call(t,e)};var Ru=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bu&&void 0===t?"__lodash_hash_undefined__":t,this};function Ou(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])}}Ou.prototype.clear=wu,Ou.prototype.delete=Cu,Ou.prototype.get=Su,Ou.prototype.has=_u,Ou.prototype.set=Ru;var Au=Ou;var Pu=function(){this.size=0,this.__data__={hash:new Au,map:new(yu||Qc),string:new Au}};var Tu=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Du=function(e,t){var n=e.__data__;return Tu(t)?n["string"==typeof t?"string":"hash"]:n.map};var ku=function(e){var t=Du(this,e).delete(e);return this.size-=t?1:0,t};var Nu=function(e){return Du(this,e).get(e)};var Mu=function(e){return Du(this,e).has(e)};var Iu=function(e,t){var n=Du(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Lu(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])}}Lu.prototype.clear=Pu,Lu.prototype.delete=ku,Lu.prototype.get=Nu,Lu.prototype.has=Mu,Lu.prototype.set=Iu;var Fu=Lu;var Gu=function(e,t){var n=this.__data__;if(n instanceof Qc){var r=n.__data__;if(!yu||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fu(r)}return n.set(e,t),this.size=n.size,this};function Hu(e){var t=this.__data__=new Qc(e);this.size=t.size}Hu.prototype.clear=Zc,Hu.prototype.delete=Jc,Hu.prototype.get=eu,Hu.prototype.has=tu,Hu.prototype.set=Gu;var Wu=Hu;var Vu=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},ju=function(){try{var e=mu(Object,"defineProperty");return e({},"",{}),e}catch(Xw){}}();var Bu=function(e,t,n){"__proto__"==t&&ju?ju(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},zu=Object.prototype.hasOwnProperty;var Uu=function(e,t,n){var r=e[t];zu.call(e,t)&&Bc(r,n)&&(void 0!==n||t in e)||Bu(e,t,n)};var Yu=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?Bu(n,s,l):Uu(n,s,l)}return n};var Xu=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var qu=function(e){return Ic(e)&&"[object Arguments]"==kc(e)},Ku=Object.prototype,$u=Ku.hasOwnProperty,Qu=Ku.propertyIsEnumerable,Zu=qu(function(){return arguments}())?qu:function(e){return Ic(e)&&$u.call(e,"callee")&&!Qu.call(e,"callee")},Ju=Zu,ep=Array.isArray;var tp=function(){return!1},np="object"==typeof exports&&exports&&!exports.nodeType&&exports,rp=np&&"object"==typeof module&&module&&!module.nodeType&&module,op=rp&&rp.exports===np?xc.Buffer:void 0,ip=(op?op.isBuffer:void 0)||tp,ap=/^(?:0|[1-9]\d*)$/;var sp=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ap.test(e))&&e>-1&&e%1==0&&e<t};var lp=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},cp={};cp["[object Float32Array]"]=cp["[object Float64Array]"]=cp["[object Int8Array]"]=cp["[object Int16Array]"]=cp["[object Int32Array]"]=cp["[object Uint8Array]"]=cp["[object Uint8ClampedArray]"]=cp["[object Uint16Array]"]=cp["[object Uint32Array]"]=!0,cp["[object Arguments]"]=cp["[object Array]"]=cp["[object ArrayBuffer]"]=cp["[object Boolean]"]=cp["[object DataView]"]=cp["[object Date]"]=cp["[object Error]"]=cp["[object Function]"]=cp["[object Map]"]=cp["[object Number]"]=cp["[object Object]"]=cp["[object RegExp]"]=cp["[object Set]"]=cp["[object String]"]=cp["[object WeakMap]"]=!1;var up=function(e){return Ic(e)&&lp(e.length)&&!!cp[kc(e)]};var pp=function(e){return function(t){return e(t)}},dp="object"==typeof exports&&exports&&!exports.nodeType&&exports,hp=dp&&"object"==typeof module&&module&&!module.nodeType&&module,fp=hp&&hp.exports===dp&&wc.process,gp=function(){try{var e=hp&&hp.require&&hp.require("util").types;return e||fp&&fp.binding&&fp.binding("util")}catch(Xw){}}(),vp=gp&&gp.isTypedArray,mp=vp?pp(vp):up,yp=Object.prototype.hasOwnProperty;var bp=function(e,t){var n=ep(e),r=!n&&Ju(e),o=!n&&!r&&ip(e),i=!n&&!r&&!o&&mp(e),a=n||r||o||i,s=a?Xu(e.length,String):[],l=s.length;for(var c in e)!t&&!yp.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sp(c,l))||s.push(c);return s},wp=Object.prototype;var Cp=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||wp)},xp=Nc(Object.keys,Object),Sp=Object.prototype.hasOwnProperty;var Ep=function(e){if(!Cp(e))return xp(e);var t=[];for(var n in Object(e))Sp.call(e,n)&&"constructor"!=n&&t.push(n);return t};var _p=function(e){return null!=e&&lp(e.length)&&!ru(e)};var Rp=function(e){return _p(e)?bp(e):Ep(e)};var Op=function(e,t){return e&&Yu(t,Rp(t),e)};var Ap=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Pp=Object.prototype.hasOwnProperty;var Tp=function(e){if(!nu(e))return Ap(e);var t=Cp(e),n=[];for(var r in e)("constructor"!=r||!t&&Pp.call(e,r))&&n.push(r);return n};var Dp=function(e){return _p(e)?bp(e,!0):Tp(e)};var kp=function(e,t){return e&&Yu(t,Dp(t),e)},Np="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mp=Np&&"object"==typeof module&&module&&!module.nodeType&&module,Ip=Mp&&Mp.exports===Np?xc.Buffer:void 0,Lp=Ip?Ip.allocUnsafe:void 0;var Fp=function(e,t){if(t)return e.slice();var n=e.length,r=Lp?Lp(n):new e.constructor(n);return e.copy(r),r};var Gp=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var Hp=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i};var Wp=function(){return[]},Vp=Object.prototype.propertyIsEnumerable,jp=Object.getOwnPropertySymbols,Bp=jp?function(e){return null==e?[]:(e=Object(e),Hp(jp(e),(function(t){return Vp.call(e,t)})))}:Wp;var zp=function(e,t){return Yu(e,Bp(e),t)};var Up=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},Yp=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Up(t,Bp(e)),e=Mc(e);return t}:Wp;var Xp=function(e,t){return Yu(e,Yp(e),t)};var qp=function(e,t,n){var r=t(e);return ep(e)?r:Up(r,n(e))};var Kp=function(e){return qp(e,Rp,Bp)};var $p=function(e){return qp(e,Dp,Yp)},Qp=mu(xc,"DataView"),Zp=mu(xc,"Promise"),Jp=mu(xc,"Set"),ed=mu(xc,"WeakMap"),td="[object Map]",nd="[object Promise]",rd="[object Set]",od="[object WeakMap]",id="[object DataView]",ad=lu(Qp),sd=lu(yu),ld=lu(Zp),cd=lu(Jp),ud=lu(ed),pd=kc;(Qp&&pd(new Qp(new ArrayBuffer(1)))!=id||yu&&pd(new yu)!=td||Zp&&pd(Zp.resolve())!=nd||Jp&&pd(new Jp)!=rd||ed&&pd(new ed)!=od)&&(pd=function(e){var t=kc(e),n="[object Object]"==t?e.constructor:void 0,r=n?lu(n):"";if(r)switch(r){case ad:return id;case sd:return td;case ld:return nd;case cd:return rd;case ud:return od}return t});var dd=pd,hd=Object.prototype.hasOwnProperty;var fd=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&hd.call(e,"index")&&(n.index=e.index,n.input=e.input),n},gd=xc.Uint8Array;var vd=function(e){var t=new e.constructor(e.byteLength);return new gd(t).set(new gd(e)),t};var md=function(e,t){var n=t?vd(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},yd=/\w*$/;var bd=function(e){var t=new e.constructor(e.source,yd.exec(e));return t.lastIndex=e.lastIndex,t},wd=Sc?Sc.prototype:void 0,Cd=wd?wd.valueOf:void 0;var xd=function(e){return Cd?Object(Cd.call(e)):{}};var Sd=function(e,t){var n=t?vd(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Ed=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return vd(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return md(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Sd(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return bd(e);case"[object Symbol]":return xd(e)}},_d=Object.create,Rd=function(){function e(){}return function(t){if(!nu(t))return{};if(_d)return _d(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Od=function(e){return"function"!=typeof e.constructor||Cp(e)?{}:Rd(Mc(e))};var Ad=function(e){return Ic(e)&&"[object Map]"==dd(e)},Pd=gp&&gp.isMap,Td=Pd?pp(Pd):Ad;var Dd=function(e){return Ic(e)&&"[object Set]"==dd(e)},kd=gp&&gp.isSet,Nd=kd?pp(kd):Dd,Md="[object Arguments]",Id="[object Function]",Ld="[object Object]",Fd={};Fd[Md]=Fd["[object Array]"]=Fd["[object ArrayBuffer]"]=Fd["[object DataView]"]=Fd["[object Boolean]"]=Fd["[object Date]"]=Fd["[object Float32Array]"]=Fd["[object Float64Array]"]=Fd["[object Int8Array]"]=Fd["[object Int16Array]"]=Fd["[object Int32Array]"]=Fd["[object Map]"]=Fd["[object Number]"]=Fd["[object Object]"]=Fd["[object RegExp]"]=Fd["[object Set]"]=Fd["[object String]"]=Fd["[object Symbol]"]=Fd["[object Uint8Array]"]=Fd["[object Uint8ClampedArray]"]=Fd["[object Uint16Array]"]=Fd["[object Uint32Array]"]=!0,Fd["[object Error]"]=Fd[Id]=Fd["[object WeakMap]"]=!1;var Gd=function e(t,n,r,o,i,a){var s,l=1&n,c=2&n,u=4&n;if(r&&(s=i?r(t,o,i,a):r(t)),void 0!==s)return s;if(!nu(t))return t;var p=ep(t);if(p){if(s=fd(t),!l)return Gp(t,s)}else{var d=dd(t),h=d==Id||"[object GeneratorFunction]"==d;if(ip(t))return Fp(t,l);if(d==Ld||d==Md||h&&!i){if(s=c||h?{}:Od(t),!l)return c?Xp(t,kp(s,t)):zp(t,Op(s,t))}else{if(!Fd[d])return i?t:{};s=Ed(t,d,l)}}a||(a=new Wu);var f=a.get(t);if(f)return f;a.set(t,s),Nd(t)?t.forEach((function(o){s.add(e(o,n,r,o,t,a))})):Td(t)&&t.forEach((function(o,i){s.set(i,e(o,n,r,i,t,a))}));var g=p?void 0:(u?c?$p:Kp:c?Dp:Rp)(t);return Vu(g||t,(function(o,i){g&&(o=t[i=o]),Uu(s,i,e(o,n,r,i,t,a))})),s};var Hd=function(e){return Gd(e,4)};var Wd=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o};var Vd=function(e){return"symbol"==typeof e||Ic(e)&&"[object Symbol]"==kc(e)};function jd(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(jd.Cache||Fu),n}jd.Cache=Fu;var Bd=jd;var zd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ud=/\\(\\)?/g,Yd=function(e){var t=Bd(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(zd,(function(e,n,r,o){t.push(r?o.replace(Ud,"$1"):n||e)})),t})),Xd=Yd;var qd=function(e){if("string"==typeof e||Vd(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},Kd=Sc?Sc.prototype:void 0,$d=Kd?Kd.toString:void 0;var Qd=function e(t){if("string"==typeof t)return t;if(ep(t))return Wd(t,e)+"";if(Vd(t))return $d?$d.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n};var Zd=function(e){return null==e?"":Qd(e)};var Jd=function(e){return ep(e)?Wd(e,qd):Vd(e)?[e]:Gp(Xd(Zd(e)))};var eh=function(e,t){},th=n(2110),nh=n.n(th);var rh=function(e){return Gd(e,5)};function oh(){return oh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oh.apply(this,arguments)}function ih(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ah(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function sh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var lh=function(e){return Array.isArray(e)&&0===e.length},ch=function(e){return"function"===typeof e},uh=function(e){return null!==e&&"object"===typeof e},ph=function(e){return String(Math.floor(Number(e)))===e},dh=function(e){return"[object String]"===Object.prototype.toString.call(e)},hh=function(t){return 0===e.Children.count(t)},fh=function(e){return uh(e)&&ch(e.then)};function gh(e,t,n,r){void 0===r&&(r=0);for(var o=Jd(t);e&&r<o.length;)e=e[o[r++]];return void 0===e?n:e}function vh(e,t,n){for(var r=Hd(e),o=r,i=0,a=Jd(t);i<a.length-1;i++){var s=a[i],l=gh(e,a.slice(0,i+1));if(l&&(uh(l)||Array.isArray(l)))o=o[s]=Hd(l);else{var c=a[i+1];o=o[s]=ph(c)&&Number(c)>=0?[]:{}}}return(0===i?e:o)[a[i]]===n?e:(void 0===n?delete o[a[i]]:o[a[i]]=n,0===i&&void 0===n&&delete r[a[i]],r)}function mh(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],s=e[a];uh(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},mh(s,t,n,r[a])):r[a]=t}return r}var yh=(0,e.createContext)(void 0);yh.displayName="FormikContext";var bh=yh.Provider,wh=yh.Consumer;function Ch(){var t=(0,e.useContext)(yh);return t||eh(!1),t}function xh(e,t){switch(t.type){case"SET_VALUES":return oh({},e,{values:t.payload});case"SET_TOUCHED":return oh({},e,{touched:t.payload});case"SET_ERRORS":return hc()(e.errors,t.payload)?e:oh({},e,{errors:t.payload});case"SET_STATUS":return oh({},e,{status:t.payload});case"SET_ISSUBMITTING":return oh({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return oh({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return oh({},e,{values:vh(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return oh({},e,{touched:vh(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return oh({},e,{errors:vh(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return oh({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return oh({},e,{touched:mh(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return oh({},e,{isSubmitting:!1});default:return e}}var Sh={},Eh={};function _h(t){var n=t.validateOnChange,r=void 0===n||n,o=t.validateOnBlur,i=void 0===o||o,a=t.validateOnMount,s=void 0!==a&&a,l=t.isInitialValid,c=t.enableReinitialize,u=void 0!==c&&c,p=t.onSubmit,d=ah(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),h=oh({validateOnChange:r,validateOnBlur:i,validateOnMount:s,onSubmit:p},d),f=(0,e.useRef)(h.initialValues),g=(0,e.useRef)(h.initialErrors||Sh),v=(0,e.useRef)(h.initialTouched||Eh),m=(0,e.useRef)(h.initialStatus),y=(0,e.useRef)(!1),b=(0,e.useRef)({});(0,e.useEffect)((function(){return y.current=!0,function(){y.current=!1}}),[]);var w=(0,e.useReducer)(xh,{values:h.initialValues,errors:h.initialErrors||Sh,touched:h.initialTouched||Eh,status:h.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),C=w[0],x=w[1],S=(0,e.useCallback)((function(e,t){return new Promise((function(n,r){var o=h.validate(e,t);null==o?n(Sh):fh(o)?o.then((function(e){n(e||Sh)}),(function(e){r(e)})):n(o)}))}),[h.validate]),E=(0,e.useCallback)((function(e,t){var n=h.validationSchema,r=ch(n)?n(t):n,o=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1);void 0===r&&(r={});var o=Oh(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){o.then((function(){e(Sh)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return vh(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var i;if(r){if(o>=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}var a=i;gh(t,a.path)||(t=vh(t,a.path,a.message))}}return t}(n)):t(n)}))}))}),[h.validationSchema]),_=(0,e.useCallback)((function(e,t){return new Promise((function(n){return n(b.current[e].validate(t))}))}),[]),R=(0,e.useCallback)((function(e){var t=Object.keys(b.current).filter((function(e){return ch(b.current[e].validate)})),n=t.length>0?t.map((function(t){return _(t,gh(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=vh(e,t[r],n)),e}),{})}))}),[_]),O=(0,e.useCallback)((function(e){return Promise.all([R(e),h.validationSchema?E(e):{},h.validate?S(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return bc.all([t,n,r],{arrayMerge:Ah})}))}),[h.validate,h.validationSchema,R,S,E]),A=Th((function(e){return void 0===e&&(e=C.values),x({type:"SET_ISVALIDATING",payload:!0}),O(e).then((function(e){return y.current&&(x({type:"SET_ISVALIDATING",payload:!1}),x({type:"SET_ERRORS",payload:e})),e}))}));(0,e.useEffect)((function(){s&&!0===y.current&&hc()(f.current,h.initialValues)&&A(f.current)}),[s,A]);var P=(0,e.useCallback)((function(e){var t=e&&e.values?e.values:f.current,n=e&&e.errors?e.errors:g.current?g.current:h.initialErrors||{},r=e&&e.touched?e.touched:v.current?v.current:h.initialTouched||{},o=e&&e.status?e.status:m.current?m.current:h.initialStatus;f.current=t,g.current=n,v.current=r,m.current=o;var i=function(){x({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:o,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"===typeof e.submitCount?e.submitCount:0}})};if(h.onReset){var a=h.onReset(C.values,q);fh(a)?a.then(i):i()}else i()}),[h.initialErrors,h.initialStatus,h.initialTouched]);(0,e.useEffect)((function(){!0!==y.current||hc()(f.current,h.initialValues)||(u&&(f.current=h.initialValues,P()),s&&A(f.current))}),[u,h.initialValues,P,s,A]),(0,e.useEffect)((function(){u&&!0===y.current&&!hc()(g.current,h.initialErrors)&&(g.current=h.initialErrors||Sh,x({type:"SET_ERRORS",payload:h.initialErrors||Sh}))}),[u,h.initialErrors]),(0,e.useEffect)((function(){u&&!0===y.current&&!hc()(v.current,h.initialTouched)&&(v.current=h.initialTouched||Eh,x({type:"SET_TOUCHED",payload:h.initialTouched||Eh}))}),[u,h.initialTouched]),(0,e.useEffect)((function(){u&&!0===y.current&&!hc()(m.current,h.initialStatus)&&(m.current=h.initialStatus,x({type:"SET_STATUS",payload:h.initialStatus}))}),[u,h.initialStatus,h.initialTouched]);var T=Th((function(e){if(b.current[e]&&ch(b.current[e].validate)){var t=gh(C.values,e),n=b.current[e].validate(t);return fh(n)?(x({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){x({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),x({type:"SET_ISVALIDATING",payload:!1})}))):(x({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return h.validationSchema?(x({type:"SET_ISVALIDATING",payload:!0}),E(C.values,e).then((function(e){return e})).then((function(t){x({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),x({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),D=(0,e.useCallback)((function(e,t){var n=t.validate;b.current[e]={validate:n}}),[]),k=(0,e.useCallback)((function(e){delete b.current[e]}),[]),N=Th((function(e,t){return x({type:"SET_TOUCHED",payload:e}),(void 0===t?i:t)?A(C.values):Promise.resolve()})),M=(0,e.useCallback)((function(e){x({type:"SET_ERRORS",payload:e})}),[]),I=Th((function(e,t){var n=ch(e)?e(C.values):e;return x({type:"SET_VALUES",payload:n}),(void 0===t?r:t)?A(n):Promise.resolve()})),L=(0,e.useCallback)((function(e,t){x({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),F=Th((function(e,t,n){return x({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===n?r:n)?A(vh(C.values,e,t)):Promise.resolve()})),G=(0,e.useCallback)((function(e,t){var n,r=t,o=e;if(!dh(e)){e.persist&&e.persist();var i=e.target?e.target:e.currentTarget,a=i.type,s=i.name,l=i.id,c=i.value,u=i.checked,p=(i.outerHTML,i.options),d=i.multiple;r=t||(s||l),o=/number|range/.test(a)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"===typeof e)return Boolean(t);var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,o=(i=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!o)return r.concat(n);if(!o)return r;return r.slice(0,i).concat(r.slice(i+1))}(gh(C.values,r),u,c):p&&d?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(p):c}r&&F(r,o)}),[F,C.values]),H=Th((function(e){if(dh(e))return function(t){return G(t,e)};G(e)})),W=Th((function(e,t,n){return void 0===t&&(t=!0),x({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?i:n)?A(C.values):Promise.resolve()})),V=(0,e.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,o=n.id,i=(n.outerHTML,t||(r||o));W(i,!0)}),[W]),j=Th((function(e){if(dh(e))return function(t){return V(t,e)};V(e)})),B=(0,e.useCallback)((function(e){ch(e)?x({type:"SET_FORMIK_STATE",payload:e}):x({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),z=(0,e.useCallback)((function(e){x({type:"SET_STATUS",payload:e})}),[]),U=(0,e.useCallback)((function(e){x({type:"SET_ISSUBMITTING",payload:e})}),[]),Y=Th((function(){return x({type:"SUBMIT_ATTEMPT"}),A().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=K()))return}catch(r){throw r}return Promise.resolve(n).then((function(e){return y.current&&x({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(y.current)throw x({type:"SUBMIT_FAILURE"}),e}))}if(y.current&&(x({type:"SUBMIT_FAILURE"}),t))throw e}))})),X=Th((function(e){e&&e.preventDefault&&ch(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&ch(e.stopPropagation)&&e.stopPropagation(),Y().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),q={resetForm:P,validateForm:A,validateField:T,setErrors:M,setFieldError:L,setFieldTouched:W,setFieldValue:F,setStatus:z,setSubmitting:U,setTouched:N,setValues:I,setFormikState:B,submitForm:Y},K=Th((function(){return p(C.values,q)})),$=Th((function(e){e&&e.preventDefault&&ch(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&ch(e.stopPropagation)&&e.stopPropagation(),P()})),Q=(0,e.useCallback)((function(e){return{value:gh(C.values,e),error:gh(C.errors,e),touched:!!gh(C.touched,e),initialValue:gh(f.current,e),initialTouched:!!gh(v.current,e),initialError:gh(g.current,e)}}),[C.errors,C.touched,C.values]),Z=(0,e.useCallback)((function(e){return{setValue:function(t,n){return F(e,t,n)},setTouched:function(t,n){return W(e,t,n)},setError:function(t){return L(e,t)}}}),[F,W,L]),J=(0,e.useCallback)((function(e){var t=uh(e),n=t?e.name:e,r=gh(C.values,n),o={name:n,value:r,onChange:H,onBlur:j};if(t){var i=e.type,a=e.value,s=e.as,l=e.multiple;"checkbox"===i?void 0===a?o.checked=!!r:(o.checked=!(!Array.isArray(r)||!~r.indexOf(a)),o.value=a):"radio"===i?(o.checked=r===a,o.value=a):"select"===s&&l&&(o.value=o.value||[],o.multiple=!0)}return o}),[j,H,C.values]),ee=(0,e.useMemo)((function(){return!hc()(f.current,C.values)}),[f.current,C.values]),te=(0,e.useMemo)((function(){return"undefined"!==typeof l?ee?C.errors&&0===Object.keys(C.errors).length:!1!==l&&ch(l)?l(h):l:C.errors&&0===Object.keys(C.errors).length}),[l,ee,C.errors,h]);return oh({},C,{initialValues:f.current,initialErrors:g.current,initialTouched:v.current,initialStatus:m.current,handleBlur:j,handleChange:H,handleReset:$,handleSubmit:X,resetForm:P,setErrors:M,setFormikState:B,setFieldTouched:W,setFieldValue:F,setFieldError:L,setStatus:z,setSubmitting:U,setTouched:N,setValues:I,submitForm:Y,validateForm:A,validateField:T,isValid:te,dirty:ee,unregisterField:k,registerField:D,getFieldProps:J,getFieldMeta:Q,getFieldHelpers:Z,validateOnBlur:i,validateOnChange:r,validateOnMount:s})}function Rh(t){var n=_h(t),r=t.component,o=t.children,i=t.render,a=t.innerRef;return(0,e.useImperativeHandle)(a,(function(){return n})),(0,e.createElement)(bh,{value:n},r?(0,e.createElement)(r,n):i?i(n):o?ch(o)?o(n):hh(o)?null:e.Children.only(o):null)}function Oh(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map((function(e){return!0===Array.isArray(e)||Vc(e)?Oh(e):""!==e?e:void 0})):Vc(e[r])?t[r]=Oh(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function Ah(e,t,n){var r=e.slice();return t.forEach((function(t,o){if("undefined"===typeof r[o]){var i=!1!==n.clone&&n.isMergeableObject(t);r[o]=i?bc(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[o]=bc(e[o],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var Ph="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?e.useLayoutEffect:e.useEffect;function Th(t){var n=(0,e.useRef)(t);return Ph((function(){n.current=t})),(0,e.useCallback)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.current.apply(void 0,t)}),[])}var Dh=(0,e.forwardRef)((function(t,n){var r=t.action,o=ah(t,["action"]),i=null!=r?r:"#",a=Ch(),s=a.handleReset,l=a.handleSubmit;return(0,e.createElement)("form",Object.assign({onSubmit:l,ref:n,onReset:s,action:i},o))}));function kh(t){var n=function(n){return(0,e.createElement)(wh,null,(function(r){return r||eh(!1),(0,e.createElement)(t,Object.assign({},n,{formik:r}))}))},r=t.displayName||t.name||t.constructor&&t.constructor.name||"Component";return n.WrappedComponent=t,n.displayName="FormikConnect("+r+")",nh()(n,t)}Dh.displayName="Form";var Nh=function(e,t,n){var r=Mh(e);return r.splice(t,0,n),r},Mh=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(oh({},e,{length:t+1}))}return[]},Ih=function(t){function n(e){var n;return(n=t.call(this,e)||this).updateArrayField=function(e,t,r){var o=n.props,i=o.name;(0,o.formik.setFormikState)((function(n){var o="function"===typeof r?r:e,a="function"===typeof t?t:e,s=vh(n.values,i,e(gh(n.values,i))),l=r?o(gh(n.errors,i)):void 0,c=t?a(gh(n.touched,i)):void 0;return lh(l)&&(l=void 0),lh(c)&&(c=void 0),oh({},n,{values:s,errors:r?vh(n.errors,i,l):n.errors,touched:t?vh(n.touched,i,c):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(Mh(t),[rh(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Mh(e),o=r[t];return r[t]=r[n],r[n]=o,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Mh(e),o=r[t];return r.splice(t,1),r.splice(n,0,o),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return Nh(n,e,t)}),(function(t){return Nh(t,e,null)}),(function(t){return Nh(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Mh(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(sh(n)),n.pop=n.pop.bind(sh(n)),n}ih(n,t);var r=n.prototype;return r.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!hc()(gh(e.formik.values,e.name),gh(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?Mh(n):[];return t||(t=r[e]),ch(r.splice)&&r.splice(e,1),r}),!0,!0),t},r.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},r.render=function(){var t={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},n=this.props,r=n.component,o=n.render,i=n.children,a=n.name,s=oh({},t,{form:ah(n.formik,["validate","validationSchema"]),name:a});return r?(0,e.createElement)(r,s):o?o(s):i?"function"===typeof i?i(s):hh(i)?null:e.Children.only(i):null},n}(e.Component);Ih.defaultProps={validateOnChange:!0};e.Component;var Lh=kh(function(t){function n(e){var n;n=t.call(this,e)||this;var r=e.render,o=e.children,i=e.component,a=e.as;e.name;return r&&eh(!1),i&&r&&eh(!1),a&&o&&ch(o)&&eh(!1),i&&o&&ch(o)&&eh(!1),r&&o&&!hh(o)&&eh(!1),n}ih(n,t);var r=n.prototype;return r.shouldComponentUpdate=function(e){return this.props.shouldUpdate?this.props.shouldUpdate(e,this.props):e.name!==this.props.name||gh(e.formik.values,this.props.name)!==gh(this.props.formik.values,this.props.name)||gh(e.formik.errors,this.props.name)!==gh(this.props.formik.errors,this.props.name)||gh(e.formik.touched,this.props.name)!==gh(this.props.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length||e.formik.isSubmitting!==this.props.formik.isSubmitting},r.componentDidMount=function(){this.props.formik.registerField(this.props.name,{validate:this.props.validate})},r.componentDidUpdate=function(e){this.props.name!==e.name&&(this.props.formik.unregisterField(e.name),this.props.formik.registerField(this.props.name,{validate:this.props.validate})),this.props.validate!==e.validate&&this.props.formik.registerField(this.props.name,{validate:this.props.validate})},r.componentWillUnmount=function(){this.props.formik.unregisterField(this.props.name)},r.render=function(){var t=this.props,n=t.name,r=t.render,o=t.as,i=t.children,a=t.component,s=t.formik,l=ah(t,["validate","name","render","as","children","component","shouldUpdate","formik"]),c=ah(s,["validate","validationSchema"]),u=s.getFieldProps(oh({name:n},l)),p={field:u,meta:{value:gh(s.values,n),error:gh(s.errors,n),touched:!!gh(s.touched,n),initialValue:gh(s.initialValues,n),initialTouched:!!gh(s.initialTouched,n),initialError:gh(s.initialErrors,n)},form:c};if(r)return r(p);if(ch(i))return i(p);if(a){if("string"===typeof a){var d=l.innerRef,h=ah(l,["innerRef"]);return(0,e.createElement)(a,oh({ref:d},u,h),i)}return(0,e.createElement)(a,oh({field:u,form:s},l),i)}var f=o||"input";if("string"===typeof f){var g=l.innerRef,v=ah(l,["innerRef"]);return(0,e.createElement)(f,oh({ref:g},u,v),i)}return(0,e.createElement)(f,oh({},u,l),i)},n}(e.Component)),Fh=function(t){var n=Lo(),r=n.localdb,o=(n.setLocaldb,{display:"flex",flexDirection:"row",alignItems:{xs:"center",sm:"center"},justifyContent:{xs:"flex-start",sm:"center"},bgcolor:"background.paper",p:2,m:1,gap:2,maxWidth:"fit-content",borderRadius:"10px",boxShadow:7}),i=m((0,e.useState)(null),2),a=i[0],s=i[1];if((0,e.useEffect)((function(){r.all().then((function(e){s(e.schedule)}))}),[s]),null==a)return(0,h.jsx)("div",{});var l=function(e){return(0,h.jsx)(ie,{to:"/Team",state:{team:e.number},style:{color:"inherit"},children:(0,h.jsx)("h3",{children:e.number})})},c=a.matches.map((function(e,t){return(0,h.jsxs)(nc,{sx:o,children:[(0,h.jsx)(ie,{to:"/Match",state:{teams:[e.red[0],e.red[1],e.red[2],e.blue[0],e.blue[1],e.blue[2]]},style:{color:"inherit"},children:(0,h.jsx)("h3",{children:e.match_id})}),(0,h.jsxs)(nc,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:{xs:0,sm:1.5},color:"red_alliance",textDecoration:"none"},children:[(0,h.jsx)(l,{number:e.red[0],match_id:e.match_id}),(0,h.jsx)(l,{number:e.red[1],match_id:e.match_id}),(0,h.jsx)(l,{number:e.red[2],match_id:e.match_id})]}),(0,h.jsxs)(nc,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:{xs:0,sm:1.5},color:"blue_alliance"},children:[(0,h.jsx)(l,{number:e.blue[0],match_id:e.match_id}),(0,h.jsx)(l,{number:e.blue[1],match_id:e.match_id}),(0,h.jsx)(l,{number:e.blue[2],match_id:e.match_id})]})]},t)}));return(0,h.jsx)(nc,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:c})},Gh=function(){return(0,h.jsx)(nc,{children:(0,h.jsx)(Fh,{})})};function Hh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hh(Object(n),!0).forEach((function(t){Da(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vh(e,t,n){var r={};return Object.keys(e).forEach((function(o){r[o]=e[o].reduce((function(e,r){return r&&(n&&n[r]&&e.push(n[r]),e.push(t(r))),e}),[]).join(" ")})),r}var jh=0;var Bh=t.useId;function zh(t){if(void 0!==Bh){var n=Bh();return null!=t?t:n}return function(t){var n=m(e.useState(t),2),r=n[0],o=n[1],i=t||r;return e.useEffect((function(){null==r&&o("mui-".concat(jh+=1))}),[r]),i}(t)}var Uh=["variant"];function Yh(e){return 0===e.length}function Xh(e){var t=e.variant,n=Wo(e,Uh),r=t||"";return Object.keys(n).sort().forEach((function(t){r+="color"===t?Yh(r)?e[t]:La(e[t]):"".concat(Yh(r)?t:La(t)).concat(La(e[t].toString()))})),r}var qh=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],Kh=["theme"],$h=["theme"];function Qh(e){return 0===Object.keys(e).length}var Zh=function(e,t){return t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null},Jh=function(e,t){var n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);var r={};return n.forEach((function(e){var t=Xh(e.props);r[t]=e.style})),r},ef=function(e,t,n,r){var o,i,a=e.ownerState,s=void 0===a?{}:a,l=[],c=null==n||null==(o=n.components)||null==(i=o[r])?void 0:i.variants;return c&&c.forEach((function(n){var r=!0;Object.keys(n.props).forEach((function(t){s[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&l.push(t[Xh(n.props)])})),l};function tf(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}var nf=ll();var rf=ec(),of=function(e){return tf(e)&&"classes"!==e},af=tf,sf=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=void 0===t?nf:t,r=e.rootShouldForwardProp,o=void 0===r?tf:r,i=e.slotShouldForwardProp,a=void 0===i?tf:i,s=e.styleFunctionSx,l=void 0===s?Js:s;return function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,s=r.slot,c=r.skipVariantsResolver,u=r.skipSx,p=r.overridesResolver,d=Wo(r,qh),h=void 0!==c?c:s&&"Root"!==s||!1,f=u||!1;var g=tf;"Root"===s?g=o:s&&(g=a);var v=Ta(e,y({shouldForwardProp:g,label:t},d)),b=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a=r?r.map((function(e){return"function"===typeof e&&e.__emotion_real!==e?function(t){var r=t.theme,o=Wo(t,Kh);return e(y({theme:Qh(r)?n:r},o))}:e})):[],s=e;i&&p&&a.push((function(e){var t=Qh(e.theme)?n:e.theme,r=Zh(i,t);if(r){var o={};return Object.entries(r).forEach((function(t){var n=m(t,2),r=n[0],i=n[1];o[r]="function"===typeof i?i(e):i})),p(e,o)}return null})),i&&!h&&a.push((function(e){var t=Qh(e.theme)?n:e.theme;return ef(e,Jh(i,t),t,i)})),f||a.push((function(e){var t=Qh(e.theme)?n:e.theme;return l(y({},e,{theme:t}))}));var c=a.length-r.length;if(Array.isArray(e)&&c>0){var u=new Array(c).fill("");(s=[].concat(el(e),el(u))).raw=[].concat(el(e.raw),el(u))}else"function"===typeof e&&e.__emotion_real!==e&&(s=function(t){var r=t.theme,o=Wo(t,$h);return e(y({theme:Qh(r)?n:r},o))});var d=v.apply(void 0,[s].concat(el(a)));return d};return v.withConfig&&(b.withConfig=v.withConfig),b}}({defaultTheme:rf,rootShouldForwardProp:of}),lf=sf;function cf(e,t){var n=y({},t);return Object.keys(e).forEach((function(t){void 0===n[t]&&(n[t]=e[t])})),n}function uf(e){var t=e.props,n=e.name,r=e.defaultTheme,o=function(e){var t=e.theme,n=e.name,r=e.props;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?cf(t.components[n].defaultProps,r):r}({theme:fl(r),name:n,props:t});return o}function pf(e){return uf({props:e.props,name:e.name,defaultTheme:rf})}function df(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function hf(t,n){return e.useMemo((function(){return null==t&&null==n?null:function(e){df(t,e),df(n,e)}}),[t,n])}function ff(e){return e&&e.ownerDocument||document}function gf(e){return ff(e).defaultView||window}function vf(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){e.apply(r,i)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}var mf="undefined"!==typeof window?e.useLayoutEffect:e.useEffect,yf=["onChange","maxRows","minRows","style","value"];function bf(e,t){return parseInt(e[t],10)||0}var wf={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},Cf=e.forwardRef((function(t,n){var r=t.onChange,o=t.maxRows,i=t.minRows,a=void 0===i?1:i,s=t.style,l=t.value,c=Wo(t,yf),u=e.useRef(null!=l).current,p=e.useRef(null),d=hf(n,p),f=e.useRef(null),g=e.useRef(0),v=m(e.useState({}),2),b=v[0],w=v[1],C=e.useCallback((function(){var e=p.current,n=gf(e).getComputedStyle(e);if("0px"!==n.width){var r=f.current;r.style.width=n.width,r.value=e.value||t.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");var i=n["box-sizing"],s=bf(n,"padding-bottom")+bf(n,"padding-top"),l=bf(n,"border-bottom-width")+bf(n,"border-top-width"),c=r.scrollHeight;r.value="x";var u=r.scrollHeight,d=c;a&&(d=Math.max(Number(a)*u,d)),o&&(d=Math.min(Number(o)*u,d));var h=(d=Math.max(d,u))+("border-box"===i?s+l:0),v=Math.abs(d-c)<=1;w((function(e){return g.current<20&&(h>0&&Math.abs((e.outerHeightStyle||0)-h)>1||e.overflow!==v)?(g.current+=1,{overflow:v,outerHeightStyle:h}):e}))}}),[o,a,t.placeholder]);e.useEffect((function(){var e,t=vf((function(){g.current=0,C()})),n=gf(p.current);return n.addEventListener("resize",t),"undefined"!==typeof ResizeObserver&&(e=new ResizeObserver(t)).observe(p.current),function(){t.clear(),n.removeEventListener("resize",t),e&&e.disconnect()}}),[C]),mf((function(){C()})),e.useEffect((function(){g.current=0}),[l]);return(0,h.jsxs)(e.Fragment,{children:[(0,h.jsx)("textarea",y({value:l,onChange:function(e){g.current=0,u||C(),r&&r(e)},ref:d,rows:a,style:y({height:b.outerHeightStyle,overflow:b.overflow?"hidden":null},s)},c)),(0,h.jsx)("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:y({},wf,s,{padding:0})})]})})),xf=Cf;var Sf=function(e){return"string"===typeof e};function Ef(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}var _f=e.createContext();function Rf(){return e.useContext(_f)}var Of=La,Af=hf,Pf=mf;var Tf=t.useInsertionEffect?t.useInsertionEffect:e.useLayoutEffect,Df=sa((function(t,n){var r=t.styles,o=ia([r],void 0,(0,e.useContext)(la)),i=(0,e.useRef)();return Tf((function(){var e=n.key+"-global",t=new n.sheet.constructor({key:e,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),r=!1,a=document.querySelector('style[data-emotion="'+e+" "+o.name+'"]');return n.sheet.tags.length&&(t.before=n.sheet.tags[0]),null!==a&&(r=!0,a.setAttribute("data-emotion",e),t.hydrate([a])),i.current=[t,r],function(){t.flush()}}),[n]),Tf((function(){var e=i.current,t=e[0];if(e[1])e[1]=!1;else{if(void 0!==o.next&&function(e,t,n){!function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(n,o.next,!0),t.tags.length){var r=t.tags[t.tags.length-1].nextElementSibling;t.before=r,t.flush()}n.insert("",o,t,!1)}}),[n,o.name]),null}));function kf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ia(t)}var Nf=function(){var e=kf.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function Mf(e){var t=e.styles,n=e.defaultTheme,r=void 0===n?{}:n,o="function"===typeof t?function(e){return t(void 0===(n=e)||null===n||0===Object.keys(n).length?r:e);var n}:t;return(0,h.jsx)(Df,{styles:o})}var If=function(e){return(0,h.jsx)(Mf,y({},e,{defaultTheme:rf}))};function Lf(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Ff(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Lf(e.value)&&""!==e.value||t&&Lf(e.defaultValue)&&""!==e.defaultValue)}var Gf={active:"Mui-active",checked:"Mui-checked",completed:"Mui-completed",disabled:"Mui-disabled",error:"Mui-error",expanded:"Mui-expanded",focused:"Mui-focused",focusVisible:"Mui-focusVisible",required:"Mui-required",selected:"Mui-selected"};function Hf(e,t){return Gf[t]||"".concat(ml.generate(e),"-").concat(t)}function Wf(e,t){var n={};return t.forEach((function(t){n[t]=Hf(e,t)})),n}function Vf(e){return Hf("MuiInputBase",e)}var jf=Wf("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Bf=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","startAdornment","type","value"],zf=function(e,t){var n=e.ownerState;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat(Of(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Uf=function(e,t){var n=e.ownerState;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Yf=lf("div",{name:"MuiInputBase",slot:"Root",overridesResolver:zf})((function(e){var t=e.theme,n=e.ownerState;return y({},t.typography.body1,Da({color:t.palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center"},"&.".concat(jf.disabled),{color:t.palette.text.disabled,cursor:"default"}),n.multiline&&y({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})})),Xf=lf("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Uf})((function(e){var t,n=e.theme,r=e.ownerState,o="light"===n.palette.mode,i={color:"currentColor",opacity:o?.42:.5,transition:n.transitions.create("opacity",{duration:n.transitions.duration.shorter})},a={opacity:"0 !important"},s={opacity:o?.42:.5};return y((Da(t={font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"}},"label[data-shrink=false] + .".concat(jf.formControl," &"),{"&::-webkit-input-placeholder":a,"&::-moz-placeholder":a,"&:-ms-input-placeholder":a,"&::-ms-input-placeholder":a,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s}),Da(t,"&.".concat(jf.disabled),{opacity:1,WebkitTextFillColor:n.palette.text.disabled}),Da(t,"&:-webkit-autofill",{animationDuration:"5000s",animationName:"mui-auto-fill"}),t),"small"===r.size&&{paddingTop:1},r.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===r.type&&{MozAppearance:"textfield"})})),qf=(0,h.jsx)(If,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Kf=e.forwardRef((function(t,n){var r=pf({props:t,name:"MuiInputBase"}),o=r["aria-describedby"],i=r.autoComplete,a=r.autoFocus,s=r.className,l=r.components,c=void 0===l?{}:l,u=r.componentsProps,p=void 0===u?{}:u,d=r.defaultValue,f=r.disabled,g=r.disableInjectingGlobalStyles,v=r.endAdornment,b=r.fullWidth,w=void 0!==b&&b,C=r.id,x=r.inputComponent,S=void 0===x?"input":x,E=r.inputProps,_=void 0===E?{}:E,R=r.inputRef,O=r.maxRows,A=r.minRows,P=r.multiline,T=void 0!==P&&P,D=r.name,k=r.onBlur,N=r.onChange,M=r.onClick,I=r.onFocus,L=r.onKeyDown,F=r.onKeyUp,G=r.placeholder,H=r.readOnly,W=r.renderSuffix,V=r.rows,j=r.startAdornment,B=r.type,z=void 0===B?"text":B,U=r.value,Y=Wo(r,Bf),X=null!=_.value?_.value:U,q=e.useRef(null!=X).current,K=e.useRef(),$=e.useCallback((function(e){0}),[]),Q=Af(_.ref,$),Z=Af(R,Q),J=Af(K,Z),ee=m(e.useState(!1),2),te=ee[0],ne=ee[1],re=Rf();var oe=Ef({props:r,muiFormControl:re,states:["color","disabled","error","hiddenLabel","size","required","filled"]});oe.focused=re?re.focused:te,e.useEffect((function(){!re&&f&&te&&(ne(!1),k&&k())}),[re,f,te,k]);var ie=re&&re.onFilled,ae=re&&re.onEmpty,se=e.useCallback((function(e){Ff(e)?ie&&ie():ae&&ae()}),[ie,ae]);Pf((function(){q&&se({value:X})}),[X,se,q]);e.useEffect((function(){se(K.current)}),[]);var le=S,ce=_;T&&"input"===le&&(ce=y(V?{type:void 0,minRows:V,maxRows:V}:{type:void 0,maxRows:O,minRows:A},ce),le=xf);e.useEffect((function(){re&&re.setAdornedStart(Boolean(j))}),[re,j]);var ue=y({},r,{color:oe.color||"primary",disabled:oe.disabled,endAdornment:v,error:oe.error,focused:oe.focused,formControl:re,fullWidth:w,hiddenLabel:oe.hiddenLabel,multiline:T,size:oe.size,startAdornment:j,type:z}),pe=function(e){var t=e.classes,n=e.color,r=e.disabled,o=e.error,i=e.endAdornment,a=e.focused,s=e.formControl,l=e.fullWidth,c=e.hiddenLabel,u=e.multiline,p=e.size,d=e.startAdornment,h=e.type;return Vh({root:["root","color".concat(Of(n)),r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl","small"===p&&"sizeSmall",u&&"multiline",d&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",d&&"inputAdornedStart",i&&"inputAdornedEnd"]},Vf,t)}(ue),de=c.Root||Yf,he=p.root||{},fe=c.Input||Xf;return ce=y({},ce,p.input),(0,h.jsxs)(e.Fragment,{children:[!g&&qf,(0,h.jsxs)(de,y({},he,!Sf(de)&&{ownerState:y({},ue,he.ownerState)},{ref:n,onClick:function(e){K.current&&e.currentTarget===e.target&&K.current.focus(),M&&M(e)}},Y,{className:jo(pe.root,he.className,s),children:[j,(0,h.jsx)(_f.Provider,{value:null,children:(0,h.jsx)(fe,y({ownerState:ue,"aria-invalid":oe.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:d,disabled:oe.disabled,id:C,onAnimationStart:function(e){se("mui-auto-fill-cancel"===e.animationName?K.current:{value:"x"})},name:D,placeholder:G,readOnly:H,required:oe.required,rows:V,value:X,onKeyDown:L,onKeyUp:F,type:z},ce,!Sf(fe)&&{as:le,ownerState:y({},ue,ce.ownerState)},{ref:J,className:jo(pe.input,ce.className),onBlur:function(e){k&&k(e),_.onBlur&&_.onBlur(e),re&&re.onBlur?re.onBlur(e):ne(!1)},onChange:function(e){if(!q){var t=e.target||K.current;if(null==t)throw new Error(Ia(1));se({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];_.onChange&&_.onChange.apply(_,[e].concat(r)),N&&N.apply(void 0,[e].concat(r))},onFocus:function(e){oe.disabled?e.stopPropagation():(I&&I(e),_.onFocus&&_.onFocus(e),re&&re.onFocus?re.onFocus(e):ne(!0))}}))}),v,W?W(y({},oe,{startAdornment:j})):null]}))]})})),$f=Kf;function Qf(e){return Hf("MuiInput",e)}var Zf=y({},jf,Wf("MuiInput",["root","underline","input"])),Jf=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","type"],eg=lf(Yf,{shouldForwardProp:function(e){return of(e)||"classes"===e},name:"MuiInput",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[].concat(el(zf(e,t)),[!n.disableUnderline&&t.underline])}})((function(e){var t,n=e.theme,r=e.ownerState,o="light"===n.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return y({position:"relative"},r.formControl&&{"label + &":{marginTop:16}},!r.disableUnderline&&(Da(t={"&:after":{borderBottom:"2px solid ".concat(n.palette[r.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:n.transitions.create("transform",{duration:n.transitions.duration.shorter,easing:n.transitions.easing.easeOut}),pointerEvents:"none"}},"&.".concat(Zf.focused,":after"),{transform:"scaleX(1)"}),Da(t,"&.".concat(Zf.error,":after"),{borderBottomColor:n.palette.error.main,transform:"scaleX(1)"}),Da(t,"&:before",{borderBottom:"1px solid ".concat(o),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:n.transitions.create("border-bottom-color",{duration:n.transitions.duration.shorter}),pointerEvents:"none"}),Da(t,"&:hover:not(.".concat(Zf.disabled,"):before"),{borderBottom:"2px solid ".concat(n.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(o)}}),Da(t,"&.".concat(Zf.disabled,":before"),{borderBottomStyle:"dotted"}),t))})),tg=lf(Xf,{name:"MuiInput",slot:"Input",overridesResolver:Uf})({}),ng=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiInput"}),r=n.disableUnderline,o=n.components,i=void 0===o?{}:o,a=n.componentsProps,s=n.fullWidth,l=void 0!==s&&s,c=n.inputComponent,u=void 0===c?"input":c,p=n.multiline,d=void 0!==p&&p,f=n.type,g=void 0===f?"text":f,v=Wo(n,Jf),m=function(e){var t=e.classes;return y({},t,Vh({root:["root",!e.disableUnderline&&"underline"],input:["input"]},Qf,t))}(n),b={root:{ownerState:{disableUnderline:r}}},w=a?Na(a,b):b;return(0,h.jsx)($f,y({components:y({Root:eg,Input:tg},i),componentsProps:w,fullWidth:l,inputComponent:u,multiline:d,ref:t,type:g},v,{classes:m}))}));ng.muiName="Input";var rg=ng;function og(e){return Hf("MuiFilledInput",e)}var ig=y({},jf,Wf("MuiFilledInput",["root","underline","input"])),ag=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","type"],sg=lf(Yf,{shouldForwardProp:function(e){return of(e)||"classes"===e},name:"MuiFilledInput",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[].concat(el(zf(e,t)),[!n.disableUnderline&&t.underline])}})((function(e){var t,n,r=e.theme,o=e.ownerState,i="light"===r.palette.mode,a=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return y((Da(t={position:"relative",backgroundColor:s,borderTopLeftRadius:r.shape.borderRadius,borderTopRightRadius:r.shape.borderRadius,transition:r.transitions.create("background-color",{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut}),"&:hover":{backgroundColor:i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:s}}},"&.".concat(ig.focused),{backgroundColor:s}),Da(t,"&.".concat(ig.disabled),{backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}),t),!o.disableUnderline&&(Da(n={"&:after":{borderBottom:"2px solid ".concat(r.palette[o.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:r.transitions.create("transform",{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut}),pointerEvents:"none"}},"&.".concat(ig.focused,":after"),{transform:"scaleX(1)"}),Da(n,"&.".concat(ig.error,":after"),{borderBottomColor:r.palette.error.main,transform:"scaleX(1)"}),Da(n,"&:before",{borderBottom:"1px solid ".concat(a),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:r.transitions.create("border-bottom-color",{duration:r.transitions.duration.shorter}),pointerEvents:"none"}),Da(n,"&:hover:not(.".concat(ig.disabled,"):before"),{borderBottom:"1px solid ".concat(r.palette.text.primary)}),Da(n,"&.".concat(ig.disabled,":before"),{borderBottomStyle:"dotted"}),n),o.startAdornment&&{paddingLeft:12},o.endAdornment&&{paddingRight:12},o.multiline&&y({padding:"25px 12px 8px"},"small"===o.size&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17}))})),lg=lf(Xf,{name:"MuiFilledInput",slot:"Input",overridesResolver:Uf})((function(e){var t=e.theme,n=e.ownerState;return y({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9})})),cg=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiFilledInput"}),r=n.components,o=void 0===r?{}:r,i=n.componentsProps,a=n.fullWidth,s=void 0!==a&&a,l=n.inputComponent,c=void 0===l?"input":l,u=n.multiline,p=void 0!==u&&u,d=n.type,f=void 0===d?"text":d,g=Wo(n,ag),v=y({},n,{fullWidth:s,inputComponent:c,multiline:p,type:f}),m=function(e){var t=e.classes;return y({},t,Vh({root:["root",!e.disableUnderline&&"underline"],input:["input"]},og,t))}(n),b={root:{ownerState:v},input:{ownerState:v}},w=i?Na(i,b):b;return(0,h.jsx)($f,y({components:y({Root:sg,Input:lg},o),componentsProps:w,fullWidth:s,inputComponent:c,multiline:p,ref:t,type:f},g,{classes:m}))}));cg.muiName="Input";var ug,pg=cg,dg=["children","classes","className","label","notched"],hg=lf("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),fg=lf("legend")((function(e){var t=e.ownerState,n=e.theme;return y({float:"unset",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&y({display:"block",width:"auto",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))}));function gg(e){return Hf("MuiOutlinedInput",e)}var vg=y({},jf,Wf("MuiOutlinedInput",["root","notchedOutline","input"])),mg=["components","fullWidth","inputComponent","label","multiline","notched","type"],yg=lf(Yf,{shouldForwardProp:function(e){return of(e)||"classes"===e},name:"MuiOutlinedInput",slot:"Root",overridesResolver:zf})((function(e){var t,n=e.theme,r=e.ownerState,o="light"===n.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return y((Da(t={position:"relative",borderRadius:n.shape.borderRadius},"&:hover .".concat(vg.notchedOutline),{borderColor:n.palette.text.primary}),Da(t,"@media (hover: none)",Da({},"&:hover .".concat(vg.notchedOutline),{borderColor:o})),Da(t,"&.".concat(vg.focused," .").concat(vg.notchedOutline),{borderColor:n.palette[r.color].main,borderWidth:2}),Da(t,"&.".concat(vg.error," .").concat(vg.notchedOutline),{borderColor:n.palette.error.main}),Da(t,"&.".concat(vg.disabled," .").concat(vg.notchedOutline),{borderColor:n.palette.action.disabled}),t),r.startAdornment&&{paddingLeft:14},r.endAdornment&&{paddingRight:14},r.multiline&&y({padding:"16.5px 14px"},"small"===r.size&&{padding:"8.5px 14px"}))})),bg=lf((function(e){var t=e.className,n=e.label,r=e.notched,o=Wo(e,dg),i=null!=n&&""!==n,a=y({},e,{notched:r,withLabel:i});return(0,h.jsx)(hg,y({"aria-hidden":!0,className:t,ownerState:a},o,{children:(0,h.jsx)(fg,{ownerState:a,children:i?(0,h.jsx)("span",{children:n}):ug||(ug=(0,h.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:function(e,t){return t.notchedOutline}})((function(e){return{borderColor:"light"===e.theme.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}})),wg=lf(Xf,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Uf})((function(e){var t=e.theme,n=e.ownerState;return y({padding:"16.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})})),Cg=e.forwardRef((function(t,n){var r,o=pf({props:t,name:"MuiOutlinedInput"}),i=o.components,a=void 0===i?{}:i,s=o.fullWidth,l=void 0!==s&&s,c=o.inputComponent,u=void 0===c?"input":c,p=o.label,d=o.multiline,f=void 0!==d&&d,g=o.notched,v=o.type,m=void 0===v?"text":v,b=Wo(o,mg),w=function(e){var t=e.classes;return y({},t,Vh({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},gg,t))}(o),C=Ef({props:o,muiFormControl:Rf(),states:["required"]});return(0,h.jsx)($f,y({components:y({Root:yg,Input:wg},a),renderSuffix:function(t){return(0,h.jsx)(bg,{className:w.notchedOutline,label:null!=p&&""!==p&&C.required?r||(r=(0,h.jsxs)(e.Fragment,{children:[p,"\xa0","*"]})):p,notched:"undefined"!==typeof g?g:Boolean(t.startAdornment||t.filled||t.focused)})},fullWidth:l,inputComponent:u,multiline:f,ref:n,type:m},b,{classes:y({},w,{notchedOutline:null})}))}));Cg.muiName="Input";var xg=Cg;function Sg(e){return Hf("MuiFormLabel",e)}var Eg=Wf("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),_g=["children","className","color","component","disabled","error","filled","focused","required"],Rg=lf("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return y({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((function(e){var t,n=e.theme,r=e.ownerState;return y({color:n.palette.text.secondary},n.typography.body1,(Da(t={lineHeight:"1.4375em",padding:0,position:"relative"},"&.".concat(Eg.focused),{color:n.palette[r.color].main}),Da(t,"&.".concat(Eg.disabled),{color:n.palette.text.disabled}),Da(t,"&.".concat(Eg.error),{color:n.palette.error.main}),t))})),Og=lf("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:function(e,t){return t.asterisk}})((function(e){var t=e.theme;return Da({},"&.".concat(Eg.error),{color:t.palette.error.main})})),Ag=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiFormLabel"}),r=n.children,o=n.className,i=n.component,a=void 0===i?"label":i,s=Wo(n,_g),l=Ef({props:n,muiFormControl:Rf(),states:["color","required","focused","disabled","error","filled"]}),c=y({},n,{color:l.color||"primary",component:a,disabled:l.disabled,error:l.error,filled:l.filled,focused:l.focused,required:l.required}),u=function(e){var t=e.classes,n=e.color,r=e.focused,o=e.disabled,i=e.error,a=e.filled,s=e.required;return Vh({root:["root","color".concat(Of(n)),o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},Sg,t)}(c);return(0,h.jsxs)(Rg,y({as:a,ownerState:c,className:jo(u.root,o),ref:t},s,{children:[r,l.required&&(0,h.jsxs)(Og,{ownerState:c,"aria-hidden":!0,className:u.asterisk,children:["\u2009","*"]})]}))})),Pg=Ag;function Tg(e){return Hf("MuiInputLabel",e)}Wf("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);var Dg=["disableAnimation","margin","shrink","variant"],kg=lf(Pg,{shouldForwardProp:function(e){return of(e)||"classes"===e},name:"MuiInputLabel",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[Da({},"& .".concat(Eg.asterisk),t.asterisk),t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,t[n.variant]]}})((function(e){var t=e.theme,n=e.ownerState;return y({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&y({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&y({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&y({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))})),Ng=e.forwardRef((function(e,t){var n=pf({name:"MuiInputLabel",props:e}),r=n.disableAnimation,o=void 0!==r&&r,i=n.shrink,a=Wo(n,Dg),s=Rf(),l=i;"undefined"===typeof l&&s&&(l=s.filled||s.focused||s.adornedStart);var c=Ef({props:n,muiFormControl:s,states:["size","variant","required"]}),u=y({},n,{disableAnimation:o,formControl:s,shrink:l,size:c.size,variant:c.variant,required:c.required}),p=function(e){var t=e.classes,n=e.formControl,r=e.size,o=e.shrink;return y({},t,Vh({root:["root",n&&"formControl",!e.disableAnimation&&"animated",o&&"shrink","small"===r&&"sizeSmall",e.variant],asterisk:[e.required&&"asterisk"]},Tg,t))}(u);return(0,h.jsx)(kg,y({"data-shrink":l,ownerState:u,ref:t},a,{classes:p}))}));var Mg=function(t,n){return e.isValidElement(t)&&-1!==n.indexOf(t.type.muiName)};function Ig(e){return Hf("MuiFormControl",e)}Wf("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var Lg=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Fg=lf("div",{name:"MuiFormControl",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return y({},t.root,t["margin".concat(Of(n.margin))],n.fullWidth&&t.fullWidth)}})((function(e){var t=e.ownerState;return y({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),Gg=e.forwardRef((function(t,n){var r=pf({props:t,name:"MuiFormControl"}),o=r.children,i=r.className,a=r.color,s=void 0===a?"primary":a,l=r.component,c=void 0===l?"div":l,u=r.disabled,p=void 0!==u&&u,d=r.error,f=void 0!==d&&d,g=r.focused,v=r.fullWidth,b=void 0!==v&&v,w=r.hiddenLabel,C=void 0!==w&&w,x=r.margin,S=void 0===x?"none":x,E=r.required,_=void 0!==E&&E,R=r.size,O=void 0===R?"medium":R,A=r.variant,P=void 0===A?"outlined":A,T=Wo(r,Lg),D=y({},r,{color:s,component:c,disabled:p,error:f,fullWidth:b,hiddenLabel:C,margin:S,required:_,size:O,variant:P}),k=function(e){var t=e.classes,n=e.margin,r=e.fullWidth;return Vh({root:["root","none"!==n&&"margin".concat(Of(n)),r&&"fullWidth"]},Ig,t)}(D),N=m(e.useState((function(){var t=!1;return o&&e.Children.forEach(o,(function(e){if(Mg(e,["Input","Select"])){var n=Mg(e,["Select"])?e.props.input:e;n&&n.props.startAdornment&&(t=!0)}})),t})),2),M=N[0],I=N[1],L=m(e.useState((function(){var t=!1;return o&&e.Children.forEach(o,(function(e){Mg(e,["Input","Select"])&&Ff(e.props,!0)&&(t=!0)})),t})),2),F=L[0],G=L[1],H=m(e.useState(!1),2),W=H[0],V=H[1];p&&W&&V(!1);var j=void 0===g||p?W:g,B=e.useCallback((function(){G(!0)}),[]),z={adornedStart:M,setAdornedStart:I,color:s,disabled:p,error:f,filled:F,focused:j,fullWidth:b,hiddenLabel:C,size:O,onBlur:function(){V(!1)},onEmpty:e.useCallback((function(){G(!1)}),[]),onFilled:B,onFocus:function(){V(!0)},registerEffect:undefined,required:_,variant:P};return(0,h.jsx)(_f.Provider,{value:z,children:(0,h.jsx)(Fg,y({as:c,ownerState:D,className:jo(k.root,i),ref:n},T,{children:o}))})})),Hg=Gg;function Wg(e){return Hf("MuiFormHelperText",e)}var Vg,jg=Wf("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),Bg=["children","className","component","disabled","error","filled","focused","margin","required","variant"],zg=lf("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.size&&t["size".concat(Of(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})((function(e){var t,n=e.theme,r=e.ownerState;return y({color:n.palette.text.secondary},n.typography.caption,(Da(t={textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0},"&.".concat(jg.disabled),{color:n.palette.text.disabled}),Da(t,"&.".concat(jg.error),{color:n.palette.error.main}),t),"small"===r.size&&{marginTop:4},r.contained&&{marginLeft:14,marginRight:14})})),Ug=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiFormHelperText"}),r=n.children,o=n.className,i=n.component,a=void 0===i?"p":i,s=Wo(n,Bg),l=Ef({props:n,muiFormControl:Rf(),states:["variant","size","disabled","error","filled","focused","required"]}),c=y({},n,{component:a,contained:"filled"===l.variant||"outlined"===l.variant,variant:l.variant,size:l.size,disabled:l.disabled,error:l.error,filled:l.filled,focused:l.focused,required:l.required}),u=function(e){var t=e.classes,n=e.contained,r=e.size,o=e.disabled,i=e.error,a=e.filled,s=e.focused,l=e.required;return Vh({root:["root",o&&"disabled",i&&"error",r&&"size".concat(Of(r)),n&&"contained",s&&"focused",a&&"filled",l&&"required"]},Wg,t)}(c);return(0,h.jsx)(zg,y({as:a,ownerState:c,className:jo(u.root,o),ref:t},s,{children:" "===r?Vg||(Vg=(0,h.jsx)("span",{className:"notranslate",children:"\u200b"})):r}))})),Yg=(n(7441),ff);var Xg=e.createContext({});function qg(e){return Hf("MuiList",e)}Wf("MuiList",["root","padding","dense","subheader"]);var Kg=["children","className","component","dense","disablePadding","subheader"],$g=lf("ul",{name:"MuiList",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((function(e){var t=e.ownerState;return y({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),Qg=e.forwardRef((function(t,n){var r=pf({props:t,name:"MuiList"}),o=r.children,i=r.className,a=r.component,s=void 0===a?"ul":a,l=r.dense,c=void 0!==l&&l,u=r.disablePadding,p=void 0!==u&&u,d=r.subheader,f=Wo(r,Kg),g=e.useMemo((function(){return{dense:c}}),[c]),v=y({},r,{component:s,dense:c,disablePadding:p}),m=function(e){var t=e.classes;return Vh({root:["root",!e.disablePadding&&"padding",e.dense&&"dense",e.subheader&&"subheader"]},qg,t)}(v);return(0,h.jsx)(Xg.Provider,{value:g,children:(0,h.jsxs)($g,y({as:s,className:jo(m.root,i),ref:n,ownerState:v},f,{children:[d,o]}))})}));function Zg(e){var t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}var Jg=Zg,ev=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function tv(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function nv(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function rv(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function ov(e,t,n,r,o,i){for(var a=!1,s=o(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return!1;a=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&rv(s,i)&&!l)return s.focus(),!0;s=o(e,s,n)}return!1}var iv=e.forwardRef((function(t,n){var r=t.actions,o=t.autoFocus,i=void 0!==o&&o,a=t.autoFocusItem,s=void 0!==a&&a,l=t.children,c=t.className,u=t.disabledItemsFocusable,p=void 0!==u&&u,d=t.disableListWrap,f=void 0!==d&&d,g=t.onKeyDown,v=t.variant,m=void 0===v?"selectedMenu":v,b=Wo(t,ev),w=e.useRef(null),C=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Pf((function(){i&&w.current.focus()}),[i]),e.useImperativeHandle(r,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!w.current.style.width;if(e.clientHeight<w.current.clientHeight&&n){var r="".concat(Jg(Yg(e)),"px");w.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,w.current.style.width="calc(100% + ".concat(r,")")}return w.current}}}),[]);var x=Af(w,n),S=-1;e.Children.forEach(l,(function(t,n){e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===m&&t.props.selected||-1===S)&&(S=n))}));var E=e.Children.map(l,(function(t,n){if(n===S){var r={};return s&&(r.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===m&&(r.tabIndex=0),e.cloneElement(t,r)}return t}));return(0,h.jsx)(Qg,y({role:"menu",ref:x,className:c,onKeyDown:function(e){var t=w.current,n=e.key,r=Yg(t).activeElement;if("ArrowDown"===n)e.preventDefault(),ov(t,r,f,p,tv);else if("ArrowUp"===n)e.preventDefault(),ov(t,r,f,p,nv);else if("Home"===n)e.preventDefault(),ov(t,null,f,p,tv);else if("End"===n)e.preventDefault(),ov(t,null,f,p,nv);else if(1===n.length){var o=C.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);var s=r&&!o.repeating&&rv(r,o);o.previousKeyMatched&&(s||ov(t,r,!1,p,tv,o))?e.preventDefault():o.previousKeyMatched=!1}g&&g(e)},tabIndex:i?0:-1},b,{children:E}))}));function av(e){return Hf("MuiPaper",e)}Wf("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var sv=["className","component","elevation","square","variant"],lv=function(e){return((e<1?5.11916*Math.pow(e,2):4.5*Math.log(e+1)+2)/100).toFixed(2)},cv=lf("div",{name:"MuiPaper",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((function(e){var t=e.theme,n=e.ownerState;return y({backgroundColor:t.palette.background.paper,color:t.palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat(t.palette.divider)},"elevation"===n.variant&&y({boxShadow:t.shadows[n.elevation]},"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat(Sl("#fff",lv(n.elevation)),", ").concat(Sl("#fff",lv(n.elevation)),")")}))})),uv=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiPaper"}),r=n.className,o=n.component,i=void 0===o?"div":o,a=n.elevation,s=void 0===a?1:a,l=n.square,c=void 0!==l&&l,u=n.variant,p=void 0===u?"elevation":u,d=Wo(n,sv),f=y({},n,{component:i,elevation:s,square:c,variant:p}),g=function(e){var t=e.square,n=e.elevation,r=e.variant,o=e.classes;return Vh({root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]},av,o)}(f);return(0,h.jsx)(cv,y({as:i,ownerState:f,className:jo(g.root,r),ref:t},d))})),pv=vf,dv=gf;function hv(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)}var fv=!1,gv=e.createContext(null),vv="unmounted",mv="exited",yv="entering",bv="entered",wv="exiting",Cv=function(t){function n(e,n){var r;r=t.call(this,e,n)||this;var o,i=n&&!n.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?i?(o=mv,r.appearStatus=yv):o=bv:o=e.unmountOnExit||e.mountOnEnter?vv:mv,r.state={status:o},r.nextCallback=null,r}hv(n,t),n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===vv?{status:mv}:null};var o=n.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==yv&&n!==bv&&(t=yv):n!==yv&&n!==bv||(t=wv)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},o.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===yv?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===mv&&this.setState({status:vv})},o.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,i=this.props.nodeRef?[o]:[r.findDOMNode(this),o],a=i[0],s=i[1],l=this.getTimeouts(),c=o?l.appear:l.enter;!e&&!n||fv?this.safeSetState({status:bv},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,s),this.safeSetState({status:yv},(function(){t.props.onEntering(a,s),t.onTransitionEnd(c,(function(){t.safeSetState({status:bv},(function(){t.props.onEntered(a,s)}))}))})))},o.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:r.findDOMNode(this);t&&!fv?(this.props.onExit(o),this.safeSetState({status:wv},(function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:mv},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:mv},(function(){e.props.onExited(o)}))},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},o.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:r.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],s=i[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},o.render=function(){var t=this.state.status;if(t===vv)return null;var n=this.props,r=n.children,o=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,Wo(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e.createElement(gv.Provider,{value:null},"function"===typeof r?r(t,o):e.cloneElement(e.Children.only(r),o))},n}(e.Component);function xv(){}Cv.contextType=gv,Cv.propTypes={},Cv.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xv,onEntering:xv,onEntered:xv,onExit:xv,onExiting:xv,onExited:xv},Cv.UNMOUNTED=vv,Cv.EXITED=mv,Cv.ENTERING=yv,Cv.ENTERED=bv,Cv.EXITING=wv;var Sv=Cv;function Ev(){return fl(rf)}var _v=function(e){return e.scrollTop};function Rv(e,t){var n,r,o=e.timeout,i=e.easing,a=e.style,s=void 0===a?{}:a;return{duration:null!=(n=s.transitionDuration)?n:"number"===typeof o?o:o[t.mode]||0,easing:null!=(r=s.transitionTimingFunction)?r:"object"===typeof i?i[t.mode]:i,delay:s.transitionDelay}}var Ov=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Av(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Pv={entering:{opacity:1,transform:Av(1)},entered:{opacity:1,transform:"none"}},Tv="undefined"!==typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&/version\/15\.[4-9]/i.test(navigator.userAgent),Dv=e.forwardRef((function(t,n){var r=t.addEndListener,o=t.appear,i=void 0===o||o,a=t.children,s=t.easing,l=t.in,c=t.onEnter,u=t.onEntered,p=t.onEntering,d=t.onExit,f=t.onExited,g=t.onExiting,v=t.style,m=t.timeout,b=void 0===m?"auto":m,w=t.TransitionComponent,C=void 0===w?Sv:w,x=Wo(t,Ov),S=e.useRef(),E=e.useRef(),_=Ev(),R=e.useRef(null),O=Af(a.ref,n),A=Af(R,O),P=function(e){return function(t){if(e){var n=R.current;void 0===t?e(n):e(n,t)}}},T=P(p),D=P((function(e,t){_v(e);var n,r=Rv({style:v,timeout:b,easing:s},{mode:"enter"}),o=r.duration,i=r.delay,a=r.easing;"auto"===b?(n=_.transitions.getAutoHeightDuration(e.clientHeight),E.current=n):n=o,e.style.transition=[_.transitions.create("opacity",{duration:n,delay:i}),_.transitions.create("transform",{duration:Tv?n:.666*n,delay:i,easing:a})].join(","),c&&c(e,t)})),k=P(u),N=P(g),M=P((function(e){var t,n=Rv({style:v,timeout:b,easing:s},{mode:"exit"}),r=n.duration,o=n.delay,i=n.easing;"auto"===b?(t=_.transitions.getAutoHeightDuration(e.clientHeight),E.current=t):t=r,e.style.transition=[_.transitions.create("opacity",{duration:t,delay:o}),_.transitions.create("transform",{duration:Tv?t:.666*t,delay:Tv?o:o||.333*t,easing:i})].join(","),e.style.opacity=0,e.style.transform=Av(.75),d&&d(e)})),I=P(f);return e.useEffect((function(){return function(){clearTimeout(S.current)}}),[]),(0,h.jsx)(C,y({appear:i,in:l,nodeRef:R,onEnter:D,onEntered:k,onEntering:T,onExit:M,onExited:I,onExiting:N,addEndListener:function(e){"auto"===b&&(S.current=setTimeout(e,E.current||0)),r&&r(R.current,e)},timeout:"auto"===b?null:b},x,{children:function(t,n){return e.cloneElement(a,y({style:y({opacity:0,transform:Av(.75),visibility:"exited"!==t||l?void 0:"hidden"},Pv[t],v,a.props.style),ref:A},n))}}))}));Dv.muiSupportAuto=!0;var kv=Dv;function Nv(t){var n=e.useRef(t);return mf((function(){n.current=t})),e.useCallback((function(){return n.current.apply(void 0,arguments)}),[])}function Mv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}}),(function(){}))}var Iv=e.forwardRef((function(t,n){var o=t.children,i=t.container,a=t.disablePortal,s=void 0!==a&&a,l=m(e.useState(null),2),c=l[0],u=l[1],p=hf(e.isValidElement(o)?o.ref:null,n);return mf((function(){s||u(function(e){return"function"===typeof e?e():e}(i)||document.body)}),[i,s]),mf((function(){if(c&&!s)return df(n,c),function(){df(n,null)}}),[n,c,s]),s?e.isValidElement(o)?e.cloneElement(o,{ref:p}):o:c?r.createPortal(o,c):c}));function Lv(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Fv(e){return parseInt(gf(e).getComputedStyle(e).paddingRight,10)||0}function Gv(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(el(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){-1===i.indexOf(e)&&-1===a.indexOf(e.tagName)&&Lv(e,o)}))}function Hv(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Wv(e,t){var n=[],r=e.container;if(!t.disableScrollLock){if(function(e){var t=ff(e);return t.body===e?gf(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){var o=Zg(ff(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(Fv(r)+o,"px");var i=ff(r).querySelectorAll(".mui-fixed");[].forEach.call(i,(function(e){n.push({value:e.style.paddingRight,property:"padding-right",el:e}),e.style.paddingRight="".concat(Fv(e)+o,"px")}))}var a=r.parentElement,s=gf(r),l="HTML"===(null==a?void 0:a.nodeName)&&"scroll"===s.getComputedStyle(a).overflowY?a:r;n.push({value:l.style.overflow,property:"overflow",el:l},{value:l.style.overflowX,property:"overflow-x",el:l},{value:l.style.overflowY,property:"overflow-y",el:l}),l.style.overflow="hidden"}return function(){n.forEach((function(e){var t=e.value,n=e.el,r=e.property;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var Vv=function(){function e(){o(this,e),this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}return a(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Lv(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Gv(t,e.mount,e.modalRef,r,!0);var o=Hv(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}},{key:"mount",value:function(e,t){var n=Hv(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Wv(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Hv(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&Lv(e.modalRef,!0),Gv(r.container,e.mount,e.modalRef,r.hiddenSiblings,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&Lv(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}(),jv=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Bv(e){var t=[],n=[];return Array.from(e.querySelectorAll(jv)).forEach((function(e,r){var o=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;var t=function(t){return e.ownerDocument.querySelector('input[type="radio"]'.concat(t))},n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort((function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex})).map((function(e){return e.node})).concat(t)}function zv(){return!0}var Uv=function(t){var n=t.children,r=t.disableAutoFocus,o=void 0!==r&&r,i=t.disableEnforceFocus,a=void 0!==i&&i,s=t.disableRestoreFocus,l=void 0!==s&&s,c=t.getTabbable,u=void 0===c?Bv:c,p=t.isEnabled,d=void 0===p?zv:p,f=t.open,g=e.useRef(),v=e.useRef(null),m=e.useRef(null),y=e.useRef(null),b=e.useRef(null),w=e.useRef(!1),C=e.useRef(null),x=hf(n.ref,C),S=e.useRef(null);e.useEffect((function(){f&&C.current&&(w.current=!o)}),[o,f]),e.useEffect((function(){if(f&&C.current){var e=ff(C.current);return C.current.contains(e.activeElement)||(C.current.hasAttribute("tabIndex")||C.current.setAttribute("tabIndex",-1),w.current&&C.current.focus()),function(){l||(y.current&&y.current.focus&&(g.current=!0,y.current.focus()),y.current=null)}}}),[f]),e.useEffect((function(){if(f&&C.current){var e=ff(C.current),t=function(t){var n=C.current;if(null!==n)if(e.hasFocus()&&!a&&d()&&!g.current){if(!n.contains(e.activeElement)){if(t&&b.current!==t.target||e.activeElement!==b.current)b.current=null;else if(null!==b.current)return;if(!w.current)return;var r=[];if(e.activeElement!==v.current&&e.activeElement!==m.current||(r=u(C.current)),r.length>0){var o,i,s=Boolean((null==(o=S.current)?void 0:o.shiftKey)&&"Tab"===(null==(i=S.current)?void 0:i.key)),l=r[0],c=r[r.length-1];s?c.focus():l.focus()}else n.focus()}}else g.current=!1},n=function(t){S.current=t,!a&&d()&&"Tab"===t.key&&e.activeElement===C.current&&t.shiftKey&&(g.current=!0,m.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",n,!0);var r=setInterval((function(){"BODY"===e.activeElement.tagName&&t()}),50);return function(){clearInterval(r),e.removeEventListener("focusin",t),e.removeEventListener("keydown",n,!0)}}}),[o,a,l,d,f,u]);var E=function(e){null===y.current&&(y.current=e.relatedTarget),w.current=!0};return(0,h.jsxs)(e.Fragment,{children:[(0,h.jsx)("div",{tabIndex:0,onFocus:E,ref:v,"data-test":"sentinelStart"}),e.cloneElement(n,{ref:x,onFocus:function(e){null===y.current&&(y.current=e.relatedTarget),w.current=!0,b.current=e.target;var t=n.props.onFocus;t&&t(e)}}),(0,h.jsx)("div",{tabIndex:0,onFocus:E,ref:m,"data-test":"sentinelEnd"})]})};function Yv(e){return Hf("MuiModal",e)}Wf("MuiModal",["root","hidden"]);var Xv=["BackdropComponent","BackdropProps","children","classes","className","closeAfterTransition","component","components","componentsProps","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","theme","onTransitionEnter","onTransitionExited"];var qv=new Vv,Kv=e.forwardRef((function(t,n){var r=t.BackdropComponent,o=t.BackdropProps,i=t.children,a=t.classes,s=t.className,l=t.closeAfterTransition,c=void 0!==l&&l,u=t.component,p=void 0===u?"div":u,d=t.components,f=void 0===d?{}:d,g=t.componentsProps,v=void 0===g?{}:g,b=t.container,w=t.disableAutoFocus,C=void 0!==w&&w,x=t.disableEnforceFocus,S=void 0!==x&&x,E=t.disableEscapeKeyDown,_=void 0!==E&&E,R=t.disablePortal,O=void 0!==R&&R,A=t.disableRestoreFocus,P=void 0!==A&&A,T=t.disableScrollLock,D=void 0!==T&&T,k=t.hideBackdrop,N=void 0!==k&&k,M=t.keepMounted,I=void 0!==M&&M,L=t.manager,F=void 0===L?qv:L,G=t.onBackdropClick,H=t.onClose,W=t.onKeyDown,V=t.open,j=t.theme,B=t.onTransitionEnter,z=t.onTransitionExited,U=Wo(t,Xv),Y=m(e.useState(!0),2),X=Y[0],q=Y[1],K=e.useRef({}),$=e.useRef(null),Q=e.useRef(null),Z=hf(Q,n),J=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(t),ee=function(){return K.current.modalRef=Q.current,K.current.mountNode=$.current,K.current},te=function(){F.mount(ee(),{disableScrollLock:D}),Q.current.scrollTop=0},ne=Nv((function(){var e=function(e){return"function"===typeof e?e():e}(b)||ff($.current).body;F.add(ee(),e),Q.current&&te()})),re=e.useCallback((function(){return F.isTopModal(ee())}),[F]),oe=Nv((function(e){$.current=e,e&&(V&&re()?te():Lv(Q.current,!0))})),ie=e.useCallback((function(){F.remove(ee())}),[F]);e.useEffect((function(){return function(){ie()}}),[ie]),e.useEffect((function(){V?ne():J&&c||ie()}),[V,ie,J,c,ne]);var ae=y({},t,{classes:a,closeAfterTransition:c,disableAutoFocus:C,disableEnforceFocus:S,disableEscapeKeyDown:_,disablePortal:O,disableRestoreFocus:P,disableScrollLock:D,exited:X,hideBackdrop:N,keepMounted:I}),se=function(e){var t=e.open,n=e.exited;return Vh({root:["root",!t&&n&&"hidden"]},Yv,e.classes)}(ae);if(!I&&!V&&(!J||X))return null;var le={};void 0===i.props.tabIndex&&(le.tabIndex="-1"),J&&(le.onEnter=Mv((function(){q(!1),B&&B()}),i.props.onEnter),le.onExited=Mv((function(){q(!0),z&&z(),c&&ie()}),i.props.onExited));var ce=f.Root||p,ue=v.root||{};return(0,h.jsx)(Iv,{ref:oe,container:b,disablePortal:O,children:(0,h.jsxs)(ce,y({role:"presentation"},ue,!Sf(ce)&&{as:p,ownerState:y({},ae,ue.ownerState),theme:j},U,{ref:Z,onKeyDown:function(e){W&&W(e),"Escape"===e.key&&re()&&(_||(e.stopPropagation(),H&&H(e,"escapeKeyDown")))},className:jo(se.root,ue.className,s),children:[!N&&r?(0,h.jsx)(r,y({"aria-hidden":!0,open:V,onClick:function(e){e.target===e.currentTarget&&(G&&G(e),H&&H(e,"backdropClick"))}},o)):null,(0,h.jsx)(Uv,{disableEnforceFocus:S,disableAutoFocus:C,disableRestoreFocus:P,isEnabled:re,open:V,children:e.cloneElement(i,le)})]}))})})),$v=Kv,Qv=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Zv={entering:{opacity:1},entered:{opacity:1}},Jv=e.forwardRef((function(t,n){var r=Ev(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},i=t.addEndListener,a=t.appear,s=void 0===a||a,l=t.children,c=t.easing,u=t.in,p=t.onEnter,d=t.onEntered,f=t.onEntering,g=t.onExit,v=t.onExited,m=t.onExiting,b=t.style,w=t.timeout,C=void 0===w?o:w,x=t.TransitionComponent,S=void 0===x?Sv:x,E=Wo(t,Qv),_=e.useRef(null),R=Af(l.ref,n),O=Af(_,R),A=function(e){return function(t){if(e){var n=_.current;void 0===t?e(n):e(n,t)}}},P=A(f),T=A((function(e,t){_v(e);var n=Rv({style:b,timeout:C,easing:c},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),p&&p(e,t)})),D=A(d),k=A(m),N=A((function(e){var t=Rv({style:b,timeout:C,easing:c},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),g&&g(e)})),M=A(v);return(0,h.jsx)(S,y({appear:s,in:u,nodeRef:_,onEnter:T,onEntered:D,onEntering:P,onExit:N,onExited:M,onExiting:k,addEndListener:function(e){i&&i(_.current,e)},timeout:C},E,{children:function(t,n){return e.cloneElement(l,y({style:y({opacity:0,visibility:"exited"!==t||u?void 0:"hidden"},Zv[t],b,l.props.style),ref:O},n))}}))})),em=Jv;function tm(e){return Hf("MuiBackdrop",e)}Wf("MuiBackdrop",["root","invisible"]);var nm=["children","component","components","componentsProps","className","invisible","open","transitionDuration","TransitionComponent"],rm=lf("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.invisible&&t.invisible]}})((function(e){return y({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.ownerState.invisible&&{backgroundColor:"transparent"})})),om=e.forwardRef((function(e,t){var n,r,o=pf({props:e,name:"MuiBackdrop"}),i=o.children,a=o.component,s=void 0===a?"div":a,l=o.components,c=void 0===l?{}:l,u=o.componentsProps,p=void 0===u?{}:u,d=o.className,f=o.invisible,g=void 0!==f&&f,v=o.open,m=o.transitionDuration,b=o.TransitionComponent,w=void 0===b?em:b,C=Wo(o,nm),x=y({},o,{component:s,invisible:g}),S=function(e){var t=e.classes;return Vh({root:["root",e.invisible&&"invisible"]},tm,t)}(x);return(0,h.jsx)(w,y({in:v,timeout:m},C,{children:(0,h.jsx)(rm,{"aria-hidden":!0,as:null!=(n=c.Root)?n:s,className:jo(S.root,d),ownerState:y({},x,null==(r=p.root)?void 0:r.ownerState),classes:S,ref:t,children:i})}))})),im=["BackdropComponent","closeAfterTransition","children","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted"],am=lf("div",{name:"MuiModal",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,!n.open&&n.exited&&t.hidden]}})((function(e){var t=e.theme,n=e.ownerState;return y({position:"fixed",zIndex:t.zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),sm=lf(om,{name:"MuiModal",slot:"Backdrop",overridesResolver:function(e,t){return t.backdrop}})({zIndex:-1}),lm=e.forwardRef((function(t,n){var r,o=pf({name:"MuiModal",props:t}),i=o.BackdropComponent,a=void 0===i?sm:i,s=o.closeAfterTransition,l=void 0!==s&&s,c=o.children,u=o.components,p=void 0===u?{}:u,d=o.componentsProps,f=void 0===d?{}:d,g=o.disableAutoFocus,v=void 0!==g&&g,b=o.disableEnforceFocus,w=void 0!==b&&b,C=o.disableEscapeKeyDown,x=void 0!==C&&C,S=o.disablePortal,E=void 0!==S&&S,_=o.disableRestoreFocus,R=void 0!==_&&_,O=o.disableScrollLock,A=void 0!==O&&O,P=o.hideBackdrop,T=void 0!==P&&P,D=o.keepMounted,k=void 0!==D&&D,N=Wo(o,im),M=m(e.useState(!0),2),I=M[0],L=M[1],F={closeAfterTransition:l,disableAutoFocus:v,disableEnforceFocus:w,disableEscapeKeyDown:x,disablePortal:E,disableRestoreFocus:R,disableScrollLock:A,hideBackdrop:T,keepMounted:k},G=function(e){return e.classes}(y({},o,F,{exited:I}));return(0,h.jsx)($v,y({components:y({Root:am},p),componentsProps:{root:y({},f.root,(!p.Root||!Sf(p.Root))&&{ownerState:y({},null==(r=f.root)?void 0:r.ownerState)})},BackdropComponent:a,onTransitionEnter:function(){return L(!1)},onTransitionExited:function(){return L(!0)},ref:n},N,{classes:G},F,{children:c}))}));function cm(e){return Hf("MuiPopover",e)}Wf("MuiPopover",["root","paper"]);var um=["onEntering"],pm=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function dm(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function hm(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function fm(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function gm(e){return"function"===typeof e?e():e}var vm=lf(lm,{name:"MuiPopover",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),mm=lf(uv,{name:"MuiPopover",slot:"Paper",overridesResolver:function(e,t){return t.paper}})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),ym=e.forwardRef((function(t,n){var r=pf({props:t,name:"MuiPopover"}),o=r.action,i=r.anchorEl,a=r.anchorOrigin,s=void 0===a?{vertical:"top",horizontal:"left"}:a,l=r.anchorPosition,c=r.anchorReference,u=void 0===c?"anchorEl":c,p=r.children,d=r.className,f=r.container,g=r.elevation,v=void 0===g?8:g,m=r.marginThreshold,b=void 0===m?16:m,w=r.open,C=r.PaperProps,x=void 0===C?{}:C,S=r.transformOrigin,E=void 0===S?{vertical:"top",horizontal:"left"}:S,_=r.TransitionComponent,R=void 0===_?kv:_,O=r.transitionDuration,A=void 0===O?"auto":O,P=r.TransitionProps,T=(P=void 0===P?{}:P).onEntering,D=Wo(r.TransitionProps,um),k=Wo(r,pm),N=e.useRef(),M=Af(N,x.ref),I=y({},r,{anchorOrigin:s,anchorReference:u,elevation:v,marginThreshold:b,PaperProps:x,transformOrigin:E,TransitionComponent:R,transitionDuration:A,TransitionProps:D}),L=function(e){return Vh({root:["root"],paper:["paper"]},cm,e.classes)}(I),F=e.useCallback((function(){if("anchorPosition"===u)return l;var e=gm(i),t=(e&&1===e.nodeType?e:Yg(N.current).body).getBoundingClientRect();return{top:t.top+dm(t,s.vertical),left:t.left+hm(t,s.horizontal)}}),[i,s.horizontal,s.vertical,l,u]),G=e.useCallback((function(e){return{vertical:dm(e,E.vertical),horizontal:hm(e,E.horizontal)}}),[E.horizontal,E.vertical]),H=e.useCallback((function(e){var t={width:e.offsetWidth,height:e.offsetHeight},n=G(t);if("none"===u)return{top:null,left:null,transformOrigin:fm(n)};var r=F(),o=r.top-n.vertical,a=r.left-n.horizontal,s=o+t.height,l=a+t.width,c=dv(gm(i)),p=c.innerHeight-b,d=c.innerWidth-b;if(o<b){var h=o-b;o-=h,n.vertical+=h}else if(s>p){var f=s-p;o-=f,n.vertical+=f}if(a<b){var g=a-b;a-=g,n.horizontal+=g}else if(l>d){var v=l-d;a-=v,n.horizontal+=v}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:fm(n)}}),[i,u,F,G,b]),W=e.useCallback((function(){var e=N.current;if(e){var t=H(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[H]);e.useEffect((function(){w&&W()})),e.useImperativeHandle(o,(function(){return w?{updatePosition:function(){W()}}:null}),[w,W]),e.useEffect((function(){if(w){var e=pv((function(){W()})),t=dv(i);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}}),[i,w,W]);var V=A;"auto"!==A||R.muiSupportAuto||(V=void 0);var j=f||(i?Yg(gm(i)).body:void 0);return(0,h.jsx)(vm,y({BackdropProps:{invisible:!0},className:jo(L.root,d),container:j,open:w,ref:n,ownerState:I},k,{children:(0,h.jsx)(R,y({appear:!0,in:w,onEntering:function(e,t){T&&T(e,t),W()},timeout:V},D,{children:(0,h.jsx)(mm,y({elevation:v},x,{ref:M,className:jo(L.paper,x.className),children:p}))}))}))})),bm=ym;function wm(e){return Hf("MuiMenu",e)}Wf("MuiMenu",["root","paper","list"]);var Cm=["onEntering"],xm=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],Sm={vertical:"top",horizontal:"right"},Em={vertical:"top",horizontal:"left"},_m=lf(bm,{shouldForwardProp:function(e){return of(e)||"classes"===e},name:"MuiMenu",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),Rm=lf(uv,{name:"MuiMenu",slot:"Paper",overridesResolver:function(e,t){return t.paper}})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Om=lf(iv,{name:"MuiMenu",slot:"List",overridesResolver:function(e,t){return t.list}})({outline:0}),Am=e.forwardRef((function(t,n){var r=pf({props:t,name:"MuiMenu"}),o=r.autoFocus,i=void 0===o||o,a=r.children,s=r.disableAutoFocusItem,l=void 0!==s&&s,c=r.MenuListProps,u=void 0===c?{}:c,p=r.onClose,d=r.open,f=r.PaperProps,g=void 0===f?{}:f,v=r.PopoverClasses,m=r.transitionDuration,b=void 0===m?"auto":m,w=r.TransitionProps,C=(w=void 0===w?{}:w).onEntering,x=r.variant,S=void 0===x?"selectedMenu":x,E=Wo(r.TransitionProps,Cm),_=Wo(r,xm),R=Ev(),O="rtl"===R.direction,A=y({},r,{autoFocus:i,disableAutoFocusItem:l,MenuListProps:u,onEntering:C,PaperProps:g,transitionDuration:b,TransitionProps:E,variant:S}),P=function(e){return Vh({root:["root"],paper:["paper"],list:["list"]},wm,e.classes)}(A),T=i&&!l&&d,D=e.useRef(null),k=-1;return e.Children.map(a,(function(t,n){e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===S&&t.props.selected||-1===k)&&(k=n))})),(0,h.jsx)(_m,y({classes:v,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:O?"right":"left"},transformOrigin:O?Sm:Em,PaperProps:y({component:Rm},g,{classes:y({},g.classes,{root:P.paper})}),className:P.root,open:d,ref:n,transitionDuration:b,TransitionProps:y({onEntering:function(e,t){D.current&&D.current.adjustStyleForScrollbar(e,R),C&&C(e,t)}},E),ownerState:A},_,{children:(0,h.jsx)(Om,y({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),p&&p(e,"tabKeyDown"))},actions:D,autoFocus:i&&(-1===k||l),autoFocusItem:T,variant:S},u,{className:jo(P.list,u.className),children:a}))}))}));function Pm(e){return Hf("MuiNativeSelect",e)}var Tm=Wf("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),Dm=["className","disabled","IconComponent","inputRef","variant"],km=function(e){var t,n=e.ownerState,r=e.theme;return y((Da(t={MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{backgroundColor:"light"===r.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"}},"&.".concat(Tm.disabled),{cursor:"default"}),Da(t,"&[multiple]",{height:"auto"}),Da(t,"&:not([multiple]) option, &:not([multiple]) optgroup",{backgroundColor:r.palette.background.paper}),Da(t,"&&&",{paddingRight:24,minWidth:16}),t),"filled"===n.variant&&{"&&&":{paddingRight:32}},"outlined"===n.variant&&{borderRadius:r.shape.borderRadius,"&:focus":{borderRadius:r.shape.borderRadius},"&&&":{paddingRight:32}})},Nm=lf("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:of,overridesResolver:function(e,t){var n=e.ownerState;return[t.select,t[n.variant],Da({},"&.".concat(Tm.multiple),t.multiple)]}})(km),Mm=function(e){var t=e.ownerState,n=e.theme;return y(Da({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:n.palette.action.active},"&.".concat(Tm.disabled),{color:n.palette.action.disabled}),t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},Im=lf("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:function(e,t){var n=e.ownerState;return[t.icon,n.variant&&t["icon".concat(Of(n.variant))],n.open&&t.iconOpen]}})(Mm),Lm=e.forwardRef((function(t,n){var r=t.className,o=t.disabled,i=t.IconComponent,a=t.inputRef,s=t.variant,l=void 0===s?"standard":s,c=Wo(t,Dm),u=y({},t,{disabled:o,variant:l}),p=function(e){var t=e.classes,n=e.variant,r=e.disabled,o=e.multiple,i=e.open;return Vh({select:["select",n,r&&"disabled",o&&"multiple"],icon:["icon","icon".concat(Of(n)),i&&"iconOpen",r&&"disabled"]},Pm,t)}(u);return(0,h.jsxs)(e.Fragment,{children:[(0,h.jsx)(Nm,y({ownerState:u,className:jo(p.select,r),disabled:o,ref:a||n},c)),t.multiple?null:(0,h.jsx)(Im,{as:i,ownerState:u,className:p.icon})]})}));var Fm=function(t){var n=t.controlled,r=t.default,o=(t.name,t.state,e.useRef(void 0!==n).current),i=m(e.useState(r),2),a=i[0],s=i[1];return[o?n:a,e.useCallback((function(e){o||s(e)}),[])]};function Gm(e){return Hf("MuiSelect",e)}var Hm,Wm=Wf("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),Vm=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],jm=lf("div",{name:"MuiSelect",slot:"Select",overridesResolver:function(e,t){var n=e.ownerState;return[Da({},"&.".concat(Wm.select),t.select),Da({},"&.".concat(Wm.select),t[n.variant]),Da({},"&.".concat(Wm.multiple),t.multiple)]}})(km,Da({},"&.".concat(Wm.select),{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"})),Bm=lf("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:function(e,t){var n=e.ownerState;return[t.icon,n.variant&&t["icon".concat(Of(n.variant))],n.open&&t.iconOpen]}})(Mm),zm=lf("input",{shouldForwardProp:function(e){return af(e)&&"classes"!==e},name:"MuiSelect",slot:"NativeInput",overridesResolver:function(e,t){return t.nativeInput}})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Um(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function Ym(e){return null==e||"string"===typeof e&&!e.trim()}var Xm=e.forwardRef((function(t,n){var r=t["aria-describedby"],o=t["aria-label"],i=t.autoFocus,a=t.autoWidth,s=t.children,l=t.className,c=t.defaultOpen,u=t.defaultValue,p=t.disabled,d=t.displayEmpty,f=t.IconComponent,g=t.inputRef,v=t.labelId,b=t.MenuProps,w=void 0===b?{}:b,C=t.multiple,x=t.name,S=t.onBlur,E=t.onChange,_=t.onClose,R=t.onFocus,O=t.onOpen,A=t.open,P=t.readOnly,T=t.renderValue,D=t.SelectDisplayProps,k=void 0===D?{}:D,N=t.tabIndex,M=t.value,I=t.variant,L=void 0===I?"standard":I,F=Wo(t,Vm),G=m(Fm({controlled:M,default:u,name:"Select"}),2),H=G[0],W=G[1],V=m(Fm({controlled:A,default:c,name:"Select"}),2),j=V[0],B=V[1],z=e.useRef(null),U=e.useRef(null),Y=m(e.useState(null),2),X=Y[0],q=Y[1],K=e.useRef(null!=A).current,$=m(e.useState(),2),Q=$[0],Z=$[1],J=Af(n,g),ee=e.useCallback((function(e){U.current=e,e&&q(e)}),[]);e.useImperativeHandle(J,(function(){return{focus:function(){U.current.focus()},node:z.current,value:H}}),[H]),e.useEffect((function(){c&&j&&X&&!K&&(Z(a?null:X.clientWidth),U.current.focus())}),[X,a]),e.useEffect((function(){i&&U.current.focus()}),[i]),e.useEffect((function(){if(v){var e=Yg(U.current).getElementById(v);if(e){var t=function(){getSelection().isCollapsed&&U.current.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[v]);var te,ne,re=function(e,t){e?O&&O(t):_&&_(t),K||(Z(a?null:X.clientWidth),B(e))},oe=e.Children.toArray(s),ie=function(e){return function(t){var n;if(t.currentTarget.hasAttribute("tabindex")){if(C){n=Array.isArray(H)?H.slice():[];var r=H.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),H!==n&&(W(n),E)){var o=t.nativeEvent||t,i=new o.constructor(o.type,o);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:x}}),E(i,e)}C||re(!1,t)}}},ae=null!==X&&j;delete F["aria-invalid"];var se=[],le=!1;(Ff({value:H})||d)&&(T?te=T(H):le=!0);var ce=oe.map((function(t){if(!e.isValidElement(t))return null;var n;if(C){if(!Array.isArray(H))throw new Error(Ia(2));(n=H.some((function(e){return Um(e,t.props.value)})))&&le&&se.push(t.props.children)}else(n=Um(H,t.props.value))&&le&&(ne=t.props.children);return n&&!0,e.cloneElement(t,{"aria-selected":n?"true":"false",onClick:ie(t),onKeyUp:function(e){" "===e.key&&e.preventDefault(),t.props.onKeyUp&&t.props.onKeyUp(e)},role:"option",selected:n,value:void 0,"data-value":t.props.value})}));le&&(te=C?0===se.length?null:se.reduce((function(e,t,n){return e.push(t),n<se.length-1&&e.push(", "),e}),[]):ne);var ue,pe=Q;!a&&K&&X&&(pe=X.clientWidth),ue="undefined"!==typeof N?N:p?null:0;var de=k.id||(x?"mui-component-select-".concat(x):void 0),he=y({},t,{variant:L,value:H,open:ae}),fe=function(e){var t=e.classes,n=e.variant,r=e.disabled,o=e.multiple,i=e.open;return Vh({select:["select",n,r&&"disabled",o&&"multiple"],icon:["icon","icon".concat(Of(n)),i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},Gm,t)}(he);return(0,h.jsxs)(e.Fragment,{children:[(0,h.jsx)(jm,y({ref:ee,tabIndex:ue,role:"button","aria-disabled":p?"true":void 0,"aria-expanded":ae?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[v,de].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:function(e){if(!P){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),re(!0,e))}},onMouseDown:p||P?null:function(e){0===e.button&&(e.preventDefault(),U.current.focus(),re(!0,e))},onBlur:function(e){!ae&&S&&(Object.defineProperty(e,"target",{writable:!0,value:{value:H,name:x}}),S(e))},onFocus:R},k,{ownerState:he,className:jo(fe.select,l,k.className),id:de,children:Ym(te)?Hm||(Hm=(0,h.jsx)("span",{className:"notranslate",children:"\u200b"})):te})),(0,h.jsx)(zm,y({value:Array.isArray(H)?H.join(","):H,name:x,ref:z,"aria-hidden":!0,onChange:function(e){var t=oe.map((function(e){return e.props.value})).indexOf(e.target.value);if(-1!==t){var n=oe[t];W(n.props.value),E&&E(e,n)}},tabIndex:-1,disabled:p,className:fe.nativeInput,autoFocus:i,ownerState:he},F)),(0,h.jsx)(Bm,{as:f,className:fe.icon,ownerState:he}),(0,h.jsx)(Am,y({id:"menu-".concat(x||""),anchorEl:X,open:ae,onClose:function(e){re(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},w,{MenuListProps:y({"aria-labelledby":v,role:"listbox",disableListWrap:!0},w.MenuListProps),PaperProps:y({},w.PaperProps,{style:y({minWidth:pe},null!=w.PaperProps?w.PaperProps.style:null)}),children:ce}))]})})),qm=Xm;function Km(e){return Hf("MuiSvgIcon",e)}Wf("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var $m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Qm=lf("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,"inherit"!==n.color&&t["color".concat(Of(n.color))],t["fontSize".concat(Of(n.fontSize))]]}})((function(e){var t,n,r,o,i,a,s,l,c,u,p,d,h,f,g,v,m,y=e.theme,b=e.ownerState;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:null==(t=y.transitions)||null==(n=t.create)?void 0:n.call(t,"fill",{duration:null==(r=y.transitions)||null==(o=r.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(i=y.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=y.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=y.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875"}[b.fontSize],color:null!=(p=null==(d=y.palette)||null==(h=d[b.color])?void 0:h.main)?p:{action:null==(f=y.palette)||null==(g=f.action)?void 0:g.active,disabled:null==(v=y.palette)||null==(m=v.action)?void 0:m.disabled,inherit:void 0}[b.color]}})),Zm=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiSvgIcon"}),r=n.children,o=n.className,i=n.color,a=void 0===i?"inherit":i,s=n.component,l=void 0===s?"svg":s,c=n.fontSize,u=void 0===c?"medium":c,p=n.htmlColor,d=n.inheritViewBox,f=void 0!==d&&d,g=n.titleAccess,v=n.viewBox,m=void 0===v?"0 0 24 24":v,b=Wo(n,$m),w=y({},n,{color:a,component:l,fontSize:u,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:m}),C={};f||(C.viewBox=m);var x=function(e){var t=e.color,n=e.fontSize,r=e.classes;return Vh({root:["root","inherit"!==t&&"color".concat(Of(t)),"fontSize".concat(Of(n))]},Km,r)}(w);return(0,h.jsxs)(Qm,y({as:l,className:jo(x.root,o),ownerState:w,focusable:"false",color:p,"aria-hidden":!g||void 0,role:g?"img":void 0,ref:t},C,b,{children:[r,g?(0,h.jsx)("title",{children:g}):null]}))}));Zm.muiName="SvgIcon";var Jm=Zm;function ey(t,n){var r=function(e,r){return(0,h.jsx)(Jm,y({"data-testid":"".concat(n,"Icon"),ref:r},e,{children:t}))};return r.muiName=Jm.muiName,e.memo(e.forwardRef(r))}var ty,ny,ry=ey((0,h.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),oy=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],iy={name:"MuiSelect",overridesResolver:function(e,t){return t.root},shouldForwardProp:function(e){return of(e)&&"variant"!==e},slot:"Root"},ay=lf(rg,iy)(""),sy=lf(xg,iy)(""),ly=lf(pg,iy)(""),cy=e.forwardRef((function(t,n){var r=pf({name:"MuiSelect",props:t}),o=r.autoWidth,i=void 0!==o&&o,a=r.children,s=r.classes,l=void 0===s?{}:s,c=r.className,u=r.defaultOpen,p=void 0!==u&&u,d=r.displayEmpty,f=void 0!==d&&d,g=r.IconComponent,v=void 0===g?ry:g,m=r.id,b=r.input,w=r.inputProps,C=r.label,x=r.labelId,S=r.MenuProps,E=r.multiple,_=void 0!==E&&E,R=r.native,O=void 0!==R&&R,A=r.onClose,P=r.onOpen,T=r.open,D=r.renderValue,k=r.SelectDisplayProps,N=r.variant,M=void 0===N?"outlined":N,I=Wo(r,oy),L=O?Lm:qm,F=Ef({props:r,muiFormControl:Rf(),states:["variant"]}).variant||M,G=b||{standard:ty||(ty=(0,h.jsx)(ay,{})),outlined:(0,h.jsx)(sy,{label:C}),filled:ny||(ny=(0,h.jsx)(ly,{}))}[F],H=function(e){return e.classes}(y({},r,{variant:F,classes:l})),W=Af(n,G.ref);return e.cloneElement(G,y({inputComponent:L,inputProps:y({children:a,IconComponent:v,variant:F,type:void 0,multiple:_},O?{id:m}:{autoWidth:i,defaultOpen:p,displayEmpty:f,labelId:x,MenuProps:S,onClose:A,onOpen:P,open:T,renderValue:D,SelectDisplayProps:y({id:m},k)},w,{classes:w?Na(H,w.classes):H},b?b.props.inputProps:{})},_&&O&&"outlined"===F?{notched:!0}:{},{ref:W,className:jo(G.props.className,c),variant:F},I))}));cy.muiName="Select";var uy=cy;function py(e){return Hf("MuiTextField",e)}Wf("MuiTextField",["root"]);var dy=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],hy={standard:rg,filled:pg,outlined:xg},fy=lf(Hg,{name:"MuiTextField",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),gy=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiTextField"}),r=n.autoComplete,o=n.autoFocus,i=void 0!==o&&o,a=n.children,s=n.className,l=n.color,c=void 0===l?"primary":l,u=n.defaultValue,p=n.disabled,d=void 0!==p&&p,f=n.error,g=void 0!==f&&f,v=n.FormHelperTextProps,m=n.fullWidth,b=void 0!==m&&m,w=n.helperText,C=n.id,x=n.InputLabelProps,S=n.inputProps,E=n.InputProps,_=n.inputRef,R=n.label,O=n.maxRows,A=n.minRows,P=n.multiline,T=void 0!==P&&P,D=n.name,k=n.onBlur,N=n.onChange,M=n.onFocus,I=n.placeholder,L=n.required,F=void 0!==L&&L,G=n.rows,H=n.select,W=void 0!==H&&H,V=n.SelectProps,j=n.type,B=n.value,z=n.variant,U=void 0===z?"outlined":z,Y=Wo(n,dy),X=y({},n,{autoFocus:i,color:c,disabled:d,error:g,fullWidth:b,multiline:T,required:F,select:W,variant:U}),q=function(e){return Vh({root:["root"]},py,e.classes)}(X);var K={};"outlined"===U&&(x&&"undefined"!==typeof x.shrink&&(K.notched=x.shrink),K.label=R),W&&(V&&V.native||(K.id=void 0),K["aria-describedby"]=void 0);var $=zh(C),Q=w&&$?"".concat($,"-helper-text"):void 0,Z=R&&$?"".concat($,"-label"):void 0,J=hy[U],ee=(0,h.jsx)(J,y({"aria-describedby":Q,autoComplete:r,autoFocus:i,defaultValue:u,fullWidth:b,multiline:T,name:D,rows:G,maxRows:O,minRows:A,type:j,value:B,id:$,inputRef:_,onBlur:k,onChange:N,onFocus:M,placeholder:I,inputProps:S},K,E));return(0,h.jsxs)(fy,y({className:jo(q.root,s),disabled:d,error:g,fullWidth:b,ref:t,required:F,color:c,variant:U,ownerState:X},Y,{children:[null!=R&&""!==R&&(0,h.jsx)(Ng,y({htmlFor:$,id:Z},x,{children:R})),W?(0,h.jsx)(uy,y({"aria-describedby":Q,id:$,labelId:Z,value:B,input:ee},V,{children:a})):ee,w&&(0,h.jsx)(Ug,y({id:Q},v,{children:w}))]}))})),vy=gy;function my(e){return Hf("MuiTypography",e)}Wf("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var yy=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],by=lf("span",{name:"MuiTypography",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat(Of(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((function(e){var t=e.theme,n=e.ownerState;return y({margin:0},n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),wy={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Cy={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},xy=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiTypography"}),r=function(e){return Cy[e]||e}(n.color),o=nl(y({},n,{color:r})),i=o.align,a=void 0===i?"inherit":i,s=o.className,l=o.component,c=o.gutterBottom,u=void 0!==c&&c,p=o.noWrap,d=void 0!==p&&p,f=o.paragraph,g=void 0!==f&&f,v=o.variant,m=void 0===v?"body1":v,b=o.variantMapping,w=void 0===b?wy:b,C=Wo(o,yy),x=y({},o,{align:a,color:r,className:s,component:l,gutterBottom:u,noWrap:d,paragraph:g,variant:m,variantMapping:w}),S=l||(g?"p":w[m]||wy[m])||"span",E=function(e){var t=e.align,n=e.gutterBottom,r=e.noWrap,o=e.paragraph,i=e.variant,a=e.classes;return Vh({root:["root",i,"inherit"!==e.align&&"align".concat(Of(t)),n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},my,a)}(x);return(0,h.jsx)(by,y({as:S,ref:t,ownerState:x,className:jo(E.root,s)},C))})),Sy=xy;function Ey(e){return Hf("MuiInputAdornment",e)}var _y,Ry,Oy=Wf("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),Ay=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Py=lf("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["position".concat(Of(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((function(e){var t=e.theme,n=e.ownerState;return y({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:t.palette.action.active},"filled"===n.variant&&Da({},"&.".concat(Oy.positionStart,"&:not(.").concat(Oy.hiddenLabel,")"),{marginTop:16}),"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),Ty=e.forwardRef((function(t,n){var r=pf({props:t,name:"MuiInputAdornment"}),o=r.children,i=r.className,a=r.component,s=void 0===a?"div":a,l=r.disablePointerEvents,c=void 0!==l&&l,u=r.disableTypography,p=void 0!==u&&u,d=r.position,f=r.variant,g=Wo(r,Ay),v=Rf()||{},m=f;f&&v.variant,v&&!m&&(m=v.variant);var b=y({},r,{hiddenLabel:v.hiddenLabel,size:v.size,disablePointerEvents:c,position:d,variant:m}),w=function(e){var t=e.classes,n=e.disablePointerEvents,r=e.hiddenLabel,o=e.position,i=e.size,a=e.variant;return Vh({root:["root",n&&"disablePointerEvents",o&&"position".concat(Of(o)),a,r&&"hiddenLabel",i&&"size".concat(Of(i))]},Ey,t)}(b);return(0,h.jsx)(_f.Provider,{value:null,children:(0,h.jsx)(Py,y({as:s,ownerState:b,className:jo(w.root,i),ref:n},g,{children:"string"!==typeof o||p?(0,h.jsxs)(e.Fragment,{children:["start"===d?_y||(_y=(0,h.jsx)("span",{className:"notranslate",children:"\u200b"})):null,o]}):(0,h.jsx)(Sy,{color:"text.secondary",children:o})}))})})),Dy=Ty,ky=Nv,Ny=!0,My=!1,Iy={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ly(e){e.metaKey||e.altKey||e.ctrlKey||(Ny=!0)}function Fy(){Ny=!1}function Gy(){"hidden"===this.visibilityState&&My&&(Ny=!0)}function Hy(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return Ny||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!Iy[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}var Wy=function(){var t=e.useCallback((function(e){var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",Ly,!0),t.addEventListener("mousedown",Fy,!0),t.addEventListener("pointerdown",Fy,!0),t.addEventListener("touchstart",Fy,!0),t.addEventListener("visibilitychange",Gy,!0))}),[]),n=e.useRef(!1);return{isFocusVisibleRef:n,onFocus:function(e){return!!Hy(e)&&(n.current=!0,!0)},onBlur:function(){return!!n.current&&(My=!0,window.clearTimeout(Ry),Ry=window.setTimeout((function(){My=!1}),100),n.current=!1,!0)},ref:t}};function Vy(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function jy(t,n){var r=Object.create(null);return t&&e.Children.map(t,(function(e){return e})).forEach((function(t){r[t.key]=function(t){return n&&(0,e.isValidElement)(t)?n(t):t}(t)})),r}function By(e,t,n){return null!=n[t]?n[t]:e.props[t]}function zy(t,n,r){var o=jy(t.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(n,o);return Object.keys(i).forEach((function(a){var s=i[a];if((0,e.isValidElement)(s)){var l=a in n,c=a in o,u=n[a],p=(0,e.isValidElement)(u)&&!u.props.in;!c||l&&!p?c||!l||p?c&&l&&(0,e.isValidElement)(u)&&(i[a]=(0,e.cloneElement)(s,{onExited:r.bind(null,s),in:u.props.in,exit:By(s,"exit",t),enter:By(s,"enter",t)})):i[a]=(0,e.cloneElement)(s,{in:!1}):i[a]=(0,e.cloneElement)(s,{onExited:r.bind(null,s),in:!0,exit:By(s,"exit",t),enter:By(s,"enter",t)})}})),i}var Uy=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Yy=function(t){function n(e,n){var r,o=(r=t.call(this,e,n)||this).handleExited.bind(u(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}hv(n,t);var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(t,n){var r,o,i=n.children,a=n.handleExited;return{children:n.firstRender?(r=t,o=a,jy(r.children,(function(t){return(0,e.cloneElement)(t,{onExited:o.bind(null,t),in:!0,appear:By(t,"appear",r),enter:By(t,"enter",r),exit:By(t,"exit",r)})}))):zy(t,i,a),firstRender:!1}},r.handleExited=function(e,t){var n=jy(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=y({},t.children);return delete n[e.key],{children:n}})))},r.render=function(){var t=this.props,n=t.component,r=t.childFactory,o=Wo(t,["component","childFactory"]),i=this.state.contextValue,a=Uy(this.state.children).map(r);return delete o.appear,delete o.enter,delete o.exit,null===n?e.createElement(gv.Provider,{value:i},a):e.createElement(gv.Provider,{value:i},e.createElement(n,o,a))},n}(e.Component);Yy.propTypes={},Yy.defaultProps={component:"div",childFactory:function(e){return e}};var Xy=Yy;var qy=function(t){var n=t.className,r=t.classes,o=t.pulsate,i=void 0!==o&&o,a=t.rippleX,s=t.rippleY,l=t.rippleSize,c=t.in,u=t.onExited,p=t.timeout,d=m(e.useState(!1),2),f=d[0],g=d[1],v=jo(n,r.ripple,r.rippleVisible,i&&r.ripplePulsate),y={width:l,height:l,top:-l/2+s,left:-l/2+a},b=jo(r.child,f&&r.childLeaving,i&&r.childPulsate);return c||f||g(!0),e.useEffect((function(){if(!c&&null!=u){var e=setTimeout(u,p);return function(){clearTimeout(e)}}}),[u,c,p]),(0,h.jsx)("span",{className:v,style:y,children:(0,h.jsx)("span",{className:b})})};var Ky,$y,Qy,Zy,Jy,eb,tb,nb,rb=Wf("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ob=["center","classes","className"],ib=Nf(Jy||(Jy=Ky||(Ky=Vy(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),ab=Nf(eb||(eb=$y||($y=Vy(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),sb=Nf(tb||(tb=Qy||(Qy=Vy(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),lb=lf("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),cb=lf(qy,{name:"MuiTouchRipple",slot:"Ripple"})(nb||(nb=Zy||(Zy=Vy(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),rb.rippleVisible,ib,550,(function(e){return e.theme.transitions.easing.easeInOut}),rb.ripplePulsate,(function(e){return e.theme.transitions.duration.shorter}),rb.child,rb.childLeaving,ab,550,(function(e){return e.theme.transitions.easing.easeInOut}),rb.childPulsate,sb,(function(e){return e.theme.transitions.easing.easeInOut})),ub=e.forwardRef((function(t,n){var r=pf({props:t,name:"MuiTouchRipple"}),o=r.center,i=void 0!==o&&o,a=r.classes,s=void 0===a?{}:a,l=r.className,c=Wo(r,ob),u=m(e.useState([]),2),p=u[0],d=u[1],f=e.useRef(0),g=e.useRef(null);e.useEffect((function(){g.current&&(g.current(),g.current=null)}),[p]);var v=e.useRef(!1),b=e.useRef(null),w=e.useRef(null),C=e.useRef(null);e.useEffect((function(){return function(){clearTimeout(b.current)}}),[]);var x=e.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,i=e.cb;d((function(e){return[].concat(el(e),[(0,h.jsx)(cb,{classes:{ripple:jo(s.ripple,rb.ripple),rippleVisible:jo(s.rippleVisible,rb.rippleVisible),ripplePulsate:jo(s.ripplePulsate,rb.ripplePulsate),child:jo(s.child,rb.child),childLeaving:jo(s.childLeaving,rb.childLeaving),childPulsate:jo(s.childPulsate,rb.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},f.current)])})),f.current+=1,g.current=i}),[s]),S=e.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,a=t.center,s=void 0===a?i||t.pulsate:a,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var u,p,d,h=c?null:C.current,f=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(f.width/2),p=Math.round(f.height/2);else{var g=e.touches?e.touches[0]:e,m=g.clientX,y=g.clientY;u=Math.round(m-f.left),p=Math.round(y-f.top)}if(s)(d=Math.sqrt((2*Math.pow(f.width,2)+Math.pow(f.height,2))/3))%2===0&&(d+=1);else{var S=2*Math.max(Math.abs((h?h.clientWidth:0)-u),u)+2,E=2*Math.max(Math.abs((h?h.clientHeight:0)-p),p)+2;d=Math.sqrt(Math.pow(S,2)+Math.pow(E,2))}e.touches?null===w.current&&(w.current=function(){x({pulsate:o,rippleX:u,rippleY:p,rippleSize:d,cb:n})},b.current=setTimeout((function(){w.current&&(w.current(),w.current=null)}),80)):x({pulsate:o,rippleX:u,rippleY:p,rippleSize:d,cb:n})}}),[i,x]),E=e.useCallback((function(){S({},{pulsate:!0})}),[S]),_=e.useCallback((function(e,t){if(clearTimeout(b.current),"touchend"===e.type&&w.current)return w.current(),w.current=null,void(b.current=setTimeout((function(){_(e,t)})));w.current=null,d((function(e){return e.length>0?e.slice(1):e})),g.current=t}),[]);return e.useImperativeHandle(n,(function(){return{pulsate:E,start:S,stop:_}}),[E,S,_]),(0,h.jsx)(lb,y({className:jo(s.root,rb.root,l),ref:C},c,{children:(0,h.jsx)(Xy,{component:null,exit:!0,children:p})}))})),pb=ub;function db(e){return Hf("MuiButtonBase",e)}var hb,fb=Wf("MuiButtonBase",["root","disabled","focusVisible"]),gb=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],vb=lf("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:function(e,t){return t.root}})((Da(hb={display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"}},"&.".concat(fb.disabled),{pointerEvents:"none",cursor:"default"}),Da(hb,"@media print",{colorAdjust:"exact"}),hb)),mb=e.forwardRef((function(t,n){var r=pf({props:t,name:"MuiButtonBase"}),o=r.action,i=r.centerRipple,a=void 0!==i&&i,s=r.children,l=r.className,c=r.component,u=void 0===c?"button":c,p=r.disabled,d=void 0!==p&&p,f=r.disableRipple,g=void 0!==f&&f,v=r.disableTouchRipple,b=void 0!==v&&v,w=r.focusRipple,C=void 0!==w&&w,x=r.LinkComponent,S=void 0===x?"a":x,E=r.onBlur,_=r.onClick,R=r.onContextMenu,O=r.onDragLeave,A=r.onFocus,P=r.onFocusVisible,T=r.onKeyDown,D=r.onKeyUp,k=r.onMouseDown,N=r.onMouseLeave,M=r.onMouseUp,I=r.onTouchEnd,L=r.onTouchMove,F=r.onTouchStart,G=r.tabIndex,H=void 0===G?0:G,W=r.TouchRippleProps,V=r.touchRippleRef,j=r.type,B=Wo(r,gb),z=e.useRef(null),U=e.useRef(null),Y=Af(U,V),X=Wy(),q=X.isFocusVisibleRef,K=X.onFocus,$=X.onBlur,Q=X.ref,Z=m(e.useState(!1),2),J=Z[0],ee=Z[1];d&&J&&ee(!1),e.useImperativeHandle(o,(function(){return{focusVisible:function(){ee(!0),z.current.focus()}}}),[]);var te=m(e.useState(!1),2),ne=te[0],re=te[1];e.useEffect((function(){re(!0)}),[]);var oe=ne&&!g&&!d;function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;return ky((function(r){return t&&t(r),!n&&U.current&&U.current[e](r),!0}))}e.useEffect((function(){J&&C&&!g&&ne&&U.current.pulsate()}),[g,C,J,ne]);var ae=ie("start",k),se=ie("stop",R),le=ie("stop",O),ce=ie("stop",M),ue=ie("stop",(function(e){J&&e.preventDefault(),N&&N(e)})),pe=ie("start",F),de=ie("stop",I),he=ie("stop",L),fe=ie("stop",(function(e){$(e),!1===q.current&&ee(!1),E&&E(e)}),!1),ge=ky((function(e){z.current||(z.current=e.currentTarget),K(e),!0===q.current&&(ee(!0),P&&P(e)),A&&A(e)})),ve=function(){var e=z.current;return u&&"button"!==u&&!("A"===e.tagName&&e.href)},me=e.useRef(!1),ye=ky((function(e){C&&!me.current&&J&&U.current&&" "===e.key&&(me.current=!0,U.current.stop(e,(function(){U.current.start(e)}))),e.target===e.currentTarget&&ve()&&" "===e.key&&e.preventDefault(),T&&T(e),e.target===e.currentTarget&&ve()&&"Enter"===e.key&&!d&&(e.preventDefault(),_&&_(e))})),be=ky((function(e){C&&" "===e.key&&U.current&&J&&!e.defaultPrevented&&(me.current=!1,U.current.stop(e,(function(){U.current.pulsate(e)}))),D&&D(e),_&&e.target===e.currentTarget&&ve()&&" "===e.key&&!e.defaultPrevented&&_(e)})),we=u;"button"===we&&(B.href||B.to)&&(we=S);var Ce={};"button"===we?(Ce.type=void 0===j?"button":j,Ce.disabled=d):(B.href||B.to||(Ce.role="button"),d&&(Ce["aria-disabled"]=d));var xe=Af(Q,z),Se=Af(n,xe);var Ee=y({},r,{centerRipple:a,component:u,disabled:d,disableRipple:g,disableTouchRipple:b,focusRipple:C,tabIndex:H,focusVisible:J}),_e=function(e){var t=e.disabled,n=e.focusVisible,r=e.focusVisibleClassName,o=Vh({root:["root",t&&"disabled",n&&"focusVisible"]},db,e.classes);return n&&r&&(o.root+=" ".concat(r)),o}(Ee);return(0,h.jsxs)(vb,y({as:we,className:jo(_e.root,l),ownerState:Ee,onBlur:fe,onClick:_,onContextMenu:se,onFocus:ge,onKeyDown:ye,onKeyUp:be,onMouseDown:ae,onMouseLeave:ue,onMouseUp:ce,onDragLeave:le,onTouchEnd:de,onTouchMove:he,onTouchStart:pe,ref:Se,tabIndex:d?-1:H,type:j},Ce,B,{children:[s,oe?(0,h.jsx)(pb,y({ref:Y,center:a},W)):null]}))})),yb=mb;function bb(e){return Hf("MuiIconButton",e)}var wb=Wf("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Cb=["edge","children","className","color","disabled","disableFocusRipple","size"],xb=lf(yb,{name:"MuiIconButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,"default"!==n.color&&t["color".concat(Of(n.color))],n.edge&&t["edge".concat(Of(n.edge))],t["size".concat(Of(n.size))]]}})((function(e){var t=e.theme,n=e.ownerState;return y({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:t.palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:Sl(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(function(e){var t=e.theme,n=e.ownerState;return y({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&y({color:t.palette[n.color].main},!n.disableRipple&&{"&:hover":{backgroundColor:Sl(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},Da({},"&.".concat(wb.disabled),{backgroundColor:"transparent",color:t.palette.action.disabled}))})),Sb=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiIconButton"}),r=n.edge,o=void 0!==r&&r,i=n.children,a=n.className,s=n.color,l=void 0===s?"default":s,c=n.disabled,u=void 0!==c&&c,p=n.disableFocusRipple,d=void 0!==p&&p,f=n.size,g=void 0===f?"medium":f,v=Wo(n,Cb),m=y({},n,{edge:o,color:l,disabled:u,disableFocusRipple:d,size:g}),b=function(e){var t=e.classes,n=e.disabled,r=e.color,o=e.edge,i=e.size;return Vh({root:["root",n&&"disabled","default"!==r&&"color".concat(Of(r)),o&&"edge".concat(Of(o)),"size".concat(Of(i))]},bb,t)}(m);return(0,h.jsx)(xb,y({className:jo(b.root,a),centerRipple:!0,focusRipple:!d,disabled:u,ref:t,ownerState:m},v,{children:i}))})),Eb=Sb,_b=ey((0,h.jsx)("path",{d:"M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"RemoveCircleOutline"),Rb=ey((0,h.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"AddCircleOutline"),Ob=function(e){var t=Ch(),n=t.values,r=t.setFieldValue;return(0,h.jsx)(Lh,{type:"tel",as:vy,name:e.name,label:e.label,InputProps:{style:{fontSize:40,maxWidth:300},startAdornment:(0,h.jsx)(Dy,{position:"start",children:(0,h.jsx)(Eb,{onClick:function(){r(e.name,Math.max(parseInt(n[e.name])-1,0))},touch:"true",children:(0,h.jsx)(_b,{style:{fontSize:50}})})}),endAdornment:(0,h.jsx)(Dy,{position:"end",children:(0,h.jsx)(Eb,{onClick:function(){r(e.name,Math.max(parseInt(n[e.name])+1,0))},touch:"true",children:(0,h.jsx)(Rb,{style:{fontSize:50}})})})}})};function Ab(e){return Hf("MuiFormControlLabel",e)}var Pb=Wf("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error"]),Tb=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","value"],Db=lf("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[Da({},"& .".concat(Pb.label),t.label),t.root,t["labelPlacement".concat(Of(n.labelPlacement))]]}})((function(e){var t=e.theme,n=e.ownerState;return y(Da({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16},"&.".concat(Pb.disabled),{cursor:"default"}),"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},Da({},"& .".concat(Pb.label),Da({},"&.".concat(Pb.disabled),{color:t.palette.text.disabled})))})),kb=e.forwardRef((function(t,n){var r=pf({props:t,name:"MuiFormControlLabel"}),o=r.className,i=r.componentsProps,a=void 0===i?{}:i,s=r.control,l=r.disabled,c=r.disableTypography,u=r.label,p=r.labelPlacement,d=void 0===p?"end":p,f=Wo(r,Tb),g=Rf(),v=l;"undefined"===typeof v&&"undefined"!==typeof s.props.disabled&&(v=s.props.disabled),"undefined"===typeof v&&g&&(v=g.disabled);var m={disabled:v};["checked","name","onChange","value","inputRef"].forEach((function(e){"undefined"===typeof s.props[e]&&"undefined"!==typeof r[e]&&(m[e]=r[e])}));var b=Ef({props:r,muiFormControl:g,states:["error"]}),w=y({},r,{disabled:v,labelPlacement:d,error:b.error}),C=function(e){var t=e.classes,n=e.disabled,r=e.labelPlacement,o=e.error;return Vh({root:["root",n&&"disabled","labelPlacement".concat(Of(r)),o&&"error"],label:["label",n&&"disabled"]},Ab,t)}(w),x=u;return null==x||x.type===Sy||c||(x=(0,h.jsx)(Sy,y({component:"span",className:C.label},a.typography,{children:x}))),(0,h.jsxs)(Db,y({className:jo(C.root,o),ownerState:w,ref:n},f,{children:[e.cloneElement(s,m),x]}))}));function Nb(e){return Hf("PrivateSwitchBase",e)}Wf("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var Mb=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Ib=lf(yb)((function(e){var t=e.ownerState;return y({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),Lb=lf("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Fb=e.forwardRef((function(e,t){var n=e.autoFocus,r=e.checked,o=e.checkedIcon,i=e.className,a=e.defaultChecked,s=e.disabled,l=e.disableFocusRipple,c=void 0!==l&&l,u=e.edge,p=void 0!==u&&u,d=e.icon,f=e.id,g=e.inputProps,v=e.inputRef,b=e.name,w=e.onBlur,C=e.onChange,x=e.onFocus,S=e.readOnly,E=e.required,_=e.tabIndex,R=e.type,O=e.value,A=Wo(e,Mb),P=m(Fm({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),2),T=P[0],D=P[1],k=Rf(),N=s;k&&"undefined"===typeof N&&(N=k.disabled);var M="checkbox"===R||"radio"===R,I=y({},e,{checked:T,disabled:N,disableFocusRipple:c,edge:p}),L=function(e){var t=e.classes,n=e.checked,r=e.disabled,o=e.edge;return Vh({root:["root",n&&"checked",r&&"disabled",o&&"edge".concat(Of(o))],input:["input"]},Nb,t)}(I);return(0,h.jsxs)(Ib,y({component:"span",className:jo(L.root,i),centerRipple:!0,focusRipple:!c,disabled:N,tabIndex:null,role:void 0,onFocus:function(e){x&&x(e),k&&k.onFocus&&k.onFocus(e)},onBlur:function(e){w&&w(e),k&&k.onBlur&&k.onBlur(e)},ownerState:I,ref:t},A,{children:[(0,h.jsx)(Lb,y({autoFocus:n,checked:r,defaultChecked:a,className:L.input,disabled:N,id:M&&f,name:b,onChange:function(e){if(!e.nativeEvent.defaultPrevented){var t=e.target.checked;D(t),C&&C(e,t)}},readOnly:S,ref:v,required:E,ownerState:I,tabIndex:_,type:R},"checkbox"===R&&void 0===O?{}:{value:O},g)),T?o:d]}))})),Gb=ey((0,h.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Hb=ey((0,h.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Wb=ey((0,h.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Vb(e){return Hf("MuiCheckbox",e)}var jb=Wf("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),Bb=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size"],zb=lf(Fb,{shouldForwardProp:function(e){return of(e)||"classes"===e},name:"MuiCheckbox",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t["color".concat(Of(n.color))]]}})((function(e){var t,n=e.theme,r=e.ownerState;return y({color:n.palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:Sl("default"===r.color?n.palette.action.active:n.palette[r.color].main,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&(Da(t={},"&.".concat(jb.checked,", &.").concat(jb.indeterminate),{color:n.palette[r.color].main}),Da(t,"&.".concat(jb.disabled),{color:n.palette.action.disabled}),t))})),Ub=(0,h.jsx)(Hb,{}),Yb=(0,h.jsx)(Gb,{}),Xb=(0,h.jsx)(Wb,{}),qb=e.forwardRef((function(t,n){var r,o,i=pf({props:t,name:"MuiCheckbox"}),a=i.checkedIcon,s=void 0===a?Ub:a,l=i.color,c=void 0===l?"primary":l,u=i.icon,p=void 0===u?Yb:u,d=i.indeterminate,f=void 0!==d&&d,g=i.indeterminateIcon,v=void 0===g?Xb:g,m=i.inputProps,b=i.size,w=void 0===b?"medium":b,C=Wo(i,Bb),x=f?v:p,S=f?v:s,E=y({},i,{color:c,indeterminate:f,size:w}),_=function(e){var t=e.classes,n=e.indeterminate,r=e.color;return y({},t,Vh({root:["root",n&&"indeterminate","color".concat(Of(r))]},Vb,t))}(E);return(0,h.jsx)(zb,y({type:"checkbox",inputProps:y({"data-indeterminate":f},m),icon:e.cloneElement(x,{fontSize:null!=(r=x.props.fontSize)?r:w}),checkedIcon:e.cloneElement(S,{fontSize:null!=(o=S.props.fontSize)?o:w}),ownerState:E,ref:n},C,{classes:_}))})),Kb=qb;function $b(e){return Hf("MuiFormGroup",e)}Wf("MuiFormGroup",["root","row","error"]);var Qb=["className","row"],Zb=lf("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.row&&t.row]}})((function(e){return y({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.ownerState.row&&{flexDirection:"row"})})),Jb=e.forwardRef((function(e,t){var n=pf({props:e,name:"MuiFormGroup"}),r=n.className,o=n.row,i=void 0!==o&&o,a=Wo(n,Qb),s=y({},n,{row:i,error:Ef({props:n,muiFormControl:Rf(),states:["error"]}).error}),l=function(e){var t=e.classes;return Vh({root:["root",e.row&&"row",e.error&&"error"]},$b,t)}(s);return(0,h.jsx)(Zb,y({className:jo(l.root,r),ownerState:s,ref:t},a))}));var ew=e.createContext(void 0),tw=zh,nw=["actions","children","defaultValue","name","onChange","value"],rw=e.forwardRef((function(t,n){var r=t.actions,o=t.children,i=t.defaultValue,a=t.name,s=t.onChange,l=t.value,c=Wo(t,nw),u=e.useRef(null),p=m(Fm({controlled:l,default:i,name:"RadioGroup"}),2),d=p[0],f=p[1];e.useImperativeHandle(r,(function(){return{focus:function(){var e=u.current.querySelector("input:not(:disabled):checked");e||(e=u.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var g=Af(n,u),v=tw(a);return(0,h.jsx)(ew.Provider,{value:{name:v,onChange:function(e){f(e.target.value),s&&s(e,e.target.value)},value:d},children:(0,h.jsx)(Jb,y({role:"radiogroup",ref:g},c,{children:o}))})})),ow=ey((0,h.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),iw=ey((0,h.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),aw=lf("span")({position:"relative",display:"flex"}),sw=lf(ow)({transform:"scale(1)"}),lw=lf(iw)((function(e){var t=e.theme,n=e.ownerState;return y({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},n.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})}));var cw=function(e){var t=e.checked,n=void 0!==t&&t,r=e.classes,o=void 0===r?{}:r,i=e.fontSize,a=y({},e,{checked:n});return(0,h.jsxs)(aw,{className:o.root,ownerState:a,children:[(0,h.jsx)(sw,{fontSize:i,className:o.background,ownerState:a}),(0,h.jsx)(lw,{fontSize:i,className:o.dot,ownerState:a})]})},uw=Mv;function pw(e){return Hf("MuiRadio",e)}var dw=Wf("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary"]),hw=["checked","checkedIcon","color","icon","name","onChange","size"],fw=lf(Fb,{shouldForwardProp:function(e){return of(e)||"classes"===e},name:"MuiRadio",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["color".concat(Of(n.color))]]}})((function(e){var t=e.theme,n=e.ownerState;return y({color:t.palette.text.secondary,"&:hover":{backgroundColor:Sl("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&Da({},"&.".concat(dw.checked),{color:t.palette[n.color].main}),Da({},"&.".concat(dw.disabled),{color:t.palette.action.disabled}))}));var gw=(0,h.jsx)(cw,{checked:!0}),vw=(0,h.jsx)(cw,{}),mw=e.forwardRef((function(t,n){var r,o,i=pf({props:t,name:"MuiRadio"}),a=i.checked,s=i.checkedIcon,l=void 0===s?gw:s,c=i.color,u=void 0===c?"primary":c,p=i.icon,d=void 0===p?vw:p,f=i.name,g=i.onChange,v=i.size,m=void 0===v?"medium":v,b=Wo(i,hw),w=y({},i,{color:u,size:m}),C=function(e){var t=e.classes,n=e.color;return y({},t,Vh({root:["root","color".concat(Of(n))]},pw,t))}(w),x=e.useContext(ew),S=a,E=uw(g,x&&x.onChange),_=f;return x&&("undefined"===typeof S&&(S=function(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}(x.value,i.value)),"undefined"===typeof _&&(_=x.name)),(0,h.jsx)(fw,y({type:"radio",icon:e.cloneElement(d,{fontSize:null!=(r=vw.props.fontSize)?r:m}),checkedIcon:e.cloneElement(l,{fontSize:null!=(o=gw.props.fontSize)?o:m}),ownerState:w,classes:C,name:_,checked:S,onChange:E,ref:n},b))})),yw=mw;function bw(e){return Hf("MuiButton",e)}var ww=Wf("MuiButton",["root","text","textInherit","textPrimary","textSecondary","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","contained","containedInherit","containedPrimary","containedSecondary","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var Cw=e.createContext({}),xw=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Sw=function(e){return y({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}})},Ew=lf(yb,{shouldForwardProp:function(e){return of(e)||"classes"===e},name:"MuiButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],t["".concat(n.variant).concat(Of(n.color))],t["size".concat(Of(n.size))],t["".concat(n.variant,"Size").concat(Of(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((function(e){var t,n,r,o=e.theme,i=e.ownerState;return y({},o.typography.button,(Da(t={minWidth:64,padding:"6px 16px",borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":y({textDecoration:"none",backgroundColor:o.vars?"rgba(".concat(o.vars.palette.text.primaryChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Sl(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===i.variant&&"inherit"!==i.color&&{backgroundColor:o.vars?"rgba(".concat(o.vars.palette[i.color].mainChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Sl(o.palette[i.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===i.variant&&"inherit"!==i.color&&{border:"1px solid ".concat((o.vars||o).palette[i.color].main),backgroundColor:o.vars?"rgba(".concat(o.vars.palette[i.color].mainChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Sl(o.palette[i.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===i.variant&&{backgroundColor:(o.vars||o).palette.grey.A100,boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2],backgroundColor:(o.vars||o).palette.grey[300]}},"contained"===i.variant&&"inherit"!==i.color&&{backgroundColor:(o.vars||o).palette[i.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[i.color].main}}),"&:active":y({},"contained"===i.variant&&{boxShadow:(o.vars||o).shadows[8]})},"&.".concat(ww.focusVisible),y({},"contained"===i.variant&&{boxShadow:(o.vars||o).shadows[6]})),Da(t,"&.".concat(ww.disabled),y({color:(o.vars||o).palette.action.disabled},"outlined"===i.variant&&{border:"1px solid ".concat((o.vars||o).palette.action.disabledBackground)},"outlined"===i.variant&&"secondary"===i.color&&{border:"1px solid ".concat((o.vars||o).palette.action.disabled)},"contained"===i.variant&&{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground})),t),"text"===i.variant&&{padding:"6px 8px"},"text"===i.variant&&"inherit"!==i.color&&{color:(o.vars||o).palette[i.color].main},"outlined"===i.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===i.variant&&"inherit"!==i.color&&{color:(o.vars||o).palette[i.color].main,border:o.vars?"1px solid rgba(".concat(o.vars.palette[i.color].mainChannel," / 0.5)"):"1px solid ".concat(Sl(o.palette[i.color].main,.5))},"contained"===i.variant&&{color:o.vars?o.vars.palette.text.primary:null==(n=(r=o.palette).getContrastText)?void 0:n.call(r,o.palette.grey[300]),backgroundColor:(o.vars||o).palette.grey[300],boxShadow:(o.vars||o).shadows[2]},"contained"===i.variant&&"inherit"!==i.color&&{color:(o.vars||o).palette[i.color].contrastText,backgroundColor:(o.vars||o).palette[i.color].main},"inherit"===i.color&&{color:"inherit",borderColor:"currentColor"},"small"===i.size&&"text"===i.variant&&{padding:"4px 5px",fontSize:o.typography.pxToRem(13)},"large"===i.size&&"text"===i.variant&&{padding:"8px 11px",fontSize:o.typography.pxToRem(15)},"small"===i.size&&"outlined"===i.variant&&{padding:"3px 9px",fontSize:o.typography.pxToRem(13)},"large"===i.size&&"outlined"===i.variant&&{padding:"7px 21px",fontSize:o.typography.pxToRem(15)},"small"===i.size&&"contained"===i.variant&&{padding:"4px 10px",fontSize:o.typography.pxToRem(13)},"large"===i.size&&"contained"===i.variant&&{padding:"8px 22px",fontSize:o.typography.pxToRem(15)},i.fullWidth&&{width:"100%"})}),(function(e){var t;return e.ownerState.disableElevation&&(Da(t={boxShadow:"none","&:hover":{boxShadow:"none"}},"&.".concat(ww.focusVisible),{boxShadow:"none"}),Da(t,"&:active",{boxShadow:"none"}),Da(t,"&.".concat(ww.disabled),{boxShadow:"none"}),t)})),_w=lf("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:function(e,t){var n=e.ownerState;return[t.startIcon,t["iconSize".concat(Of(n.size))]]}})((function(e){var t=e.ownerState;return y({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},Sw(t))})),Rw=lf("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:function(e,t){var n=e.ownerState;return[t.endIcon,t["iconSize".concat(Of(n.size))]]}})((function(e){var t=e.ownerState;return y({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},Sw(t))})),Ow=e.forwardRef((function(t,n){var r=e.useContext(Cw),o=pf({props:cf(r,t),name:"MuiButton"}),i=o.children,a=o.color,s=void 0===a?"primary":a,l=o.component,c=void 0===l?"button":l,u=o.className,p=o.disabled,d=void 0!==p&&p,f=o.disableElevation,g=void 0!==f&&f,v=o.disableFocusRipple,m=void 0!==v&&v,b=o.endIcon,w=o.focusVisibleClassName,C=o.fullWidth,x=void 0!==C&&C,S=o.size,E=void 0===S?"medium":S,_=o.startIcon,R=o.type,O=o.variant,A=void 0===O?"text":O,P=Wo(o,xw),T=y({},o,{color:s,component:c,disabled:d,disableElevation:g,disableFocusRipple:m,fullWidth:x,size:E,type:R,variant:A}),D=function(e){var t=e.color,n=e.disableElevation,r=e.fullWidth,o=e.size,i=e.variant,a=e.classes;return y({},a,Vh({root:["root",i,"".concat(i).concat(Of(t)),"size".concat(Of(o)),"".concat(i,"Size").concat(Of(o)),"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon","iconSize".concat(Of(o))],endIcon:["endIcon","iconSize".concat(Of(o))]},bw,a))}(T),k=_&&(0,h.jsx)(_w,{className:D.startIcon,ownerState:T,children:_}),N=b&&(0,h.jsx)(Rw,{className:D.endIcon,ownerState:T,children:b});return(0,h.jsxs)(Ew,y({ownerState:T,className:jo(u,r.className),component:c,disabled:d,focusRipple:!m,focusVisibleClassName:jo(D.focusVisible,w),ref:n,type:R},P,{classes:D,children:[k,i,N]}))})),Aw=Ow,Pw=function(){var t={display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"center",sm:"center"},justifyContent:{xs:"flex-start",sm:"center"},bgcolor:"background.paper",p:2,m:1,gap:2,maxWidth:"fit-content",borderRadius:"10px",boxShadow:7},n=Lo(),r=n.localdb,o=(n.setLocaldb,Fo()),i=o.remotedb,a=(o.setRemotedb,ko()),s=(a.processedDataBucket,a.setProcessedDataBucket,F()),l="";null!=s.state&&(l=s.state.id),console.log(l);var c=m((0,e.useState)(!1),2),u=c[0],p=c[1],d=m((0,e.useState)(null),2),f=d[0],g=d[1],v=(0,e.useCallback)((function(e,t){var n=t.setSubmitting;t.resetForm;u&&f.$id==e.$id?r.saveChanges(f,e).then((function(e){alert("Changes Saved Successfully!"),n(!1)})).then(r.sync(i)).catch(console.log):r.save(e).then((function(e){alert("Saved Successfully!"),n(!1)})).then(r.sync(i)).catch(console.log)}),[r,f]);return(0,e.useEffect)((function(){r.all().then((function(e){var t=Da({$id:l,fouls:"0",fouls_tech:"0",flipped:!1,red_cards:"0",yellow_cards:"0",disabled:!1,taxi_auto:!1,upper_hub_auto:"0",lower_hub_auto:"0",upper_hub_teleop:"0",lower_hub_teleop:"0",climb_level:"0",alliance:"",defence:"0"},"disabled",!1);null!=l&&"undefined"!==typeof e[l]&&(t=e[l],p(!0)),g(t)}))}),[g]),null==f?null:(console.log(f),(0,h.jsxs)("div",{children:[(0,h.jsx)("br",{}),(0,h.jsx)(Rh,{initialValues:f,validateOnChange:"false",onSubmit:v,children:function(e){e.values,e.setValues,e.errors,e.touched,e.handleChange,e.handleBlur,e.handleSubmit;var n=e.isSubmitting;return(0,h.jsxs)(Dh,{children:[(0,h.jsxs)(nc,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,h.jsx)(nc,{sx:t,children:(0,h.jsx)(Lh,{type:"input",as:vy,name:"$id",label:"Match Key"})}),(0,h.jsxs)(nc,{sx:t,children:[(0,h.jsx)(Ob,{name:"upper_hub_auto",label:"Upper Hub Auto"}),(0,h.jsx)(Ob,{name:"lower_hub_auto",label:"Lower Hub Auto"}),(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:Kb,type:"checkbox",name:"taxi_auto"}),label:"Auto Taxi"})]}),(0,h.jsxs)(nc,{sx:t,children:[(0,h.jsx)(Ob,{name:"upper_hub_teleop",label:"Upper Hub Teleop"}),(0,h.jsx)(Ob,{name:"lower_hub_teleop",label:"Lower Hub Teleop"})]}),(0,h.jsx)(nc,{sx:t,children:(0,h.jsxs)(Hg,{component:"fieldset",children:[(0,h.jsx)(Pg,{component:"legend",children:"Climbing"}),(0,h.jsxs)(rw,{"aria-label":"Climbing",name:"climb_level",row:!0,children:[(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:yw,type:"radio",name:"climb_level",value:"0"}),label:"None"}),(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:yw,type:"radio",name:"climb_level",value:"1"}),label:"Low"}),(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:yw,type:"radio",name:"climb_level",value:"2"}),label:"Mid"}),(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:yw,type:"radio",name:"climb_level",value:"3"}),label:"High"}),(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:yw,type:"radio",name:"climb_level",value:"4"}),label:"Traversal"})]})]})}),(0,h.jsxs)(nc,{sx:t,children:[(0,h.jsxs)(nc,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,h.jsx)(Ob,{name:"fouls",label:"Fouls"}),(0,h.jsx)(Ob,{name:"fouls_tech",label:"Tech Fouls"})]}),(0,h.jsxs)(nc,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,h.jsx)(Ob,{name:"red_cards",label:"Red Cards"}),(0,h.jsx)(Ob,{name:"yellow_cards",label:"Yellow Cards"})]})]}),(0,h.jsxs)(nc,{sx:t,children:[(0,h.jsxs)(Hg,{component:"fieldset",children:[(0,h.jsx)(Pg,{component:"legend",children:"Defense"}),(0,h.jsxs)(rw,{"aria-label":"Defense",name:"defence",row:!0,children:[(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:yw,type:"radio",name:"defence",value:"0"}),label:"None"}),(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:yw,type:"radio",name:"defence",value:"1"}),label:"Poor"}),(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:yw,type:"radio",name:"defence",value:"2"}),label:"Good"}),(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:yw,type:"radio",name:"defence",value:"3"}),label:"Exceptional"})]})]}),(0,h.jsx)(kb,{control:(0,h.jsx)(Lh,{as:Kb,type:"checkbox",name:"disabled"}),label:"Disabled"})]}),(0,h.jsx)(nc,{sx:Wh(Wh({},t),{},{display:"flex",flexDirection:"column"}),children:(0,h.jsx)(Aw,{type:"submit",disabled:n,children:"Save"})})]}),(0,h.jsx)("div",{})]})}})]}))},Tw=function(){var t=Lo(),n=t.localdb,r=(t.setLocaldb,m((0,e.useState)(null),2)),o=r[0],i=r[1];if((0,e.useEffect)((function(){n.all().then((function(e){i(e.team_list)}))}),[i]),null==o)return(0,h.jsx)("div",{});console.log("test"),console.log(o);var a=function(e){return(0,h.jsx)(ie,{to:"/Team",state:{team:e.number},style:{color:"inherit"},children:(0,h.jsx)("h3",{children:e.number})})},s=Object.keys(o.teams).map((function(e,t){return(0,h.jsx)(nc,{children:(0,h.jsx)(a,{number:e})},t)}));return(0,h.jsx)(nc,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:(0,h.jsx)(nc,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",bgcolor:"background.paper",p:2,m:1,gap:2,maxWidth:"fit-content",borderRadius:"10px",boxShadow:7},children:s})})},Dw=n(7004),kw=n.n(Dw),Nw=function(){var t=Lo(),n=t.localdb,r=(t.setLocaldb,(0,e.useCallback)((function(e){n.save({$id:"schedule",type:"schedule",matches:e})}),[n])),o=(0,e.useCallback)((function(e){n.save({$id:"team_list",type:"team_list",teams:e})}),[n]),i=(0,e.useCallback)((function(){kw().get("https://www.thebluealliance.com/api/v3/event/2022utwv/matches").set("X-TBA-Auth-Key","6aXgVYCAcyy4O7FwCGLqj5ATcima5k25smssLqUuHAHTCvGtCWXX7aoM9xNWfaSm").end((function(e,t){r(function(t){t.sort((function(e,t){return e.predicted_time-t.predicted_time}));var n=[];console.log(t);var r,o=oc(t);try{for(o.s();!(r=o.n()).done;){var i,a=r.value,s=[],l=[],c=oc(a.alliances.red.team_keys);try{for(c.s();!(i=c.n()).done;){var u=i.value;s.push(u.substring(3))}}catch(e){c.e(e)}finally{c.f()}var p,d=oc(a.alliances.blue.team_keys);try{for(d.s();!(p=d.n()).done;){var h=p.value;l.push(h.substring(3))}}catch(e){d.e(e)}finally{d.f()}n.push({match_id:a.key.split("_")[1],red:s,blue:l,score_breakdown:a.score_breakdown})}}catch(e){o.e(e)}finally{o.f()}return n}(JSON.parse(t.text)))})),kw().get("https://www.thebluealliance.com/api/v3/event/2022utwv/teams").set("X-TBA-Auth-Key","6aXgVYCAcyy4O7FwCGLqj5ATcima5k25smssLqUuHAHTCvGtCWXX7aoM9xNWfaSm").end((function(e,t){o(function(t){t.sort((function(e,t){return e.key>t.key}));var n,r={},o=oc(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;r[i.team_number]={nickname:i.nickname,number:i.team_number,website:i.website}}}catch(e){o.e(e)}finally{o.f()}return r}(JSON.parse(t.text)))}))})),a=(0,e.useCallback)((function(){n.cleanup()}),[n]);return(0,h.jsxs)(nc,{children:[(0,h.jsx)(Aw,{onClick:i,children:"Update Matches Doc"}),(0,h.jsx)(Aw,{onClick:a,children:"Cleanup DB"})]})},Mw=function(t){var n=Lo(),r=n.localdb,o=(n.setLocaldb,Fo().remotedb),i=t.team;console.log(i);var a={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",bgcolor:"background.paper",p:2,m:1,gap:2,maxWidth:"fit-content",borderRadius:"10px",boxShadow:7,minWidth:200},s=m((0,e.useState)(null),2),l=s[0],c=s[1],u=m((0,e.useState)(""),2),p=u[0],d=u[1],f=(0,e.useCallback)((function(e,t){var n=t.setSubmitting;t.resetForm;r.saveChanges(l,e).then((function(e){alert("Saved Successfully!"),n(!1)})).then(r.sync(o)).catch(console.log)}),[r,l]);return(0,e.useEffect)((function(){r.all().then((function(e){var t={$id:i,weight:"",drive_train:"",drive_motors:"",wheels:"",climb_level:"",which_hub:"",shooter_type:"",alignment_strategy:"",misc_design:""};if("undefined"!==typeof e[i]&&(t=e[i]),void 0!==typeof e.team_list&&(console.log("team list"),console.log(e.team_list),void 0!==typeof e.team_list.teams[i])){var n=e.team_list.teams[i];d(n.number+" "+n.nickname)}c(t)}))}),[c]),null==l?null:(console.log(l),(0,h.jsx)(nc,{children:(0,h.jsxs)(nc,{sx:a,children:[(0,h.jsx)("h3",{children:p}),(0,h.jsx)(Rh,{initialValues:l,onSubmit:f,children:function(e){var t=e.isSubmitting;return(0,h.jsxs)(Dh,{children:[(0,h.jsx)(Lh,{type:"input",as:vy,name:"weight",label:"Weight"}),(0,h.jsx)(Lh,{type:"input",as:vy,name:"drive_train",label:"Drive Train Type"}),(0,h.jsx)(Lh,{type:"input",as:vy,name:"drive_motors",label:"# of Drive Motors"}),(0,h.jsx)(Lh,{type:"input",as:vy,name:"wheels",label:"Wheels"}),(0,h.jsx)(Lh,{type:"input",as:vy,name:"climb_level",label:"Climb Level"}),(0,h.jsx)(Lh,{type:"input",as:vy,name:"which_hub",label:"Which Hub"}),(0,h.jsx)(Lh,{type:"input",as:vy,name:"shooter_type",label:"Shooter Type"}),(0,h.jsx)(Lh,{type:"input",as:vy,name:"alignment_strategy",label:"Alignment Strat"}),(0,h.jsx)(Lh,{type:"input",as:vy,name:"misc_design",label:"Misc"}),(0,h.jsx)(nc,{sx:Wh(Wh({},a),{},{display:"flex",flexDirection:"column"}),children:(0,h.jsx)(Aw,{type:"submit",disabled:t,children:"Save"})})]})}})]})}))},Iw=function(){var e=F().state.team;return(0,h.jsx)("div",{children:(0,h.jsx)(Mw,{team:e})})},Lw=function(){var e=F().state.teams;return(0,h.jsx)("div",{children:(0,h.jsxs)(nc,{sx:{display:"flex",flexDirection:"row",gap:1,overflowX:"scroll"},children:[(0,h.jsx)(Mw,{team:e[0]}),(0,h.jsx)(Mw,{team:e[1]}),(0,h.jsx)(Mw,{team:e[2]}),(0,h.jsx)(Mw,{team:e[3]}),(0,h.jsx)(Mw,{team:e[4]}),(0,h.jsx)(Mw,{team:e[5]})]})})},Fw="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";var Gw=function(t){var n=t.children,r=t.theme,o=ul(),i=e.useMemo((function(){var e=null===o?r:function(e,t){return"function"===typeof t?t(e):y({},e,t)}(o,r);return null!=e&&(e[Fw]=null!==o),e}),[r,o]);return(0,h.jsx)(cl.Provider,{value:i,children:n})};function Hw(e){var t=fl();return(0,h.jsx)(la.Provider,{value:"object"===typeof t?t:{},children:e.children})}var Ww=function(e){var t=e.children,n=e.theme;return(0,h.jsx)(Gw,{theme:n,children:(0,h.jsx)(Hw,{children:t})})},Vw=function(e){var t=Ch(),n=t.values,r=(t.submitForm,ko()),o=r.processedDataBucket;r.setProcessedDataBucket;return null==o||"undefined"===typeof o.teamData[n.team_number]?null:o.teamData[n.team_number].notes.map((function(e,t){return(0,h.jsx)("h3",{children:e},t)}))},jw=function(){var t=Lo(),n=t.localdb,r=(t.setLocaldb,Fo()),o=r.remotedb,i=(r.setRemotedb,ko()),a=(i.processedDataBucket,i.setProcessedDataBucket),s={display:"flex",flexDirection:"column",alignItems:{xs:"center",sm:"center"},justifyContent:{xs:"flex-start",sm:"center"},bgcolor:"background.paper",p:2,m:1,gap:2,maxWidth:"fit-content",borderRadius:"10px",boxShadow:7},l=(0,e.useCallback)((function(e,t){var r=t.setSubmitting,i=t.resetForm;n.put(Wh({_id:"notes_team_"+e.team_number+(new Date).toISOString(),type:"notes"},e)).then((function(e){alert("Notes Saved Successfully!"),console.log(e),console.log(n),n.replicate.to(o,{retry:!0})})).catch((function(e){console.log("Failed To Save Notes!"),alert(e)})),i(),r(!1),To(n,a)}),[n,o,a,To]);return(0,h.jsxs)("div",{children:[(0,h.jsx)("br",{}),(0,h.jsx)(Rh,{initialValues:{team_number:"",notes:""},validateOnChange:"false",onSubmit:l,children:function(e){e.values,e.setValues,e.errors,e.touched,e.handleChange,e.handleBlur,e.handleSubmit;var t=e.isSubmitting;return(0,h.jsxs)(Dh,{children:[(0,h.jsxs)(nc,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,h.jsxs)(nc,{sx:s,children:[(0,h.jsx)(Lh,{type:"input",as:vy,name:"team_number",label:"Team #"}),(0,h.jsx)(Lh,{type:"input",as:vy,multiline:!0,rows:3,name:"notes",label:"Notes"}),(0,h.jsx)(Aw,{type:"submit",disabled:t,children:"Submit"})]}),(0,h.jsx)(nc,{sx:s,children:(0,h.jsx)(Vw,{})})]}),(0,h.jsx)("div",{})]})}})]})};var Bw=function(){console.log("WHAT THE FUCK");var e=ec({palette:{mode:"dark",background:{paper:"#203030"},text:{primary:"#edf8f3",secondary:"#acd3bf"},red_alliance:"#ec2e63",blue_alliance:"#2d74eb"},typography:{fontSize:18}});return(0,h.jsx)(Ww,{theme:e,children:(0,h.jsx)(Go,{children:(0,h.jsx)(No,{children:(0,h.jsxs)(oe,{children:[(0,h.jsx)(de,{}),(0,h.jsx)("div",{className:"App",children:(0,h.jsxs)(M,{children:[(0,h.jsx)(k,{path:"/",element:(0,h.jsx)(pc,{})}),(0,h.jsx)(k,{path:"/Dashboard",element:(0,h.jsx)(cc,{})}),(0,h.jsx)(k,{path:"/Input",element:(0,h.jsx)(Pw,{})}),(0,h.jsx)(k,{path:"/Notes",element:(0,h.jsx)(jw,{})}),(0,h.jsx)(k,{path:"/Schedule",element:(0,h.jsx)(Gh,{})}),(0,h.jsx)(k,{path:"/TeamList",element:(0,h.jsx)(Tw,{})}),(0,h.jsx)(k,{path:"/Dev",element:(0,h.jsx)(Nw,{})}),(0,h.jsx)(k,{path:"/Team",element:(0,h.jsx)(Iw,{})}),(0,h.jsx)(k,{path:"/Match",element:(0,h.jsx)(Lw,{})}),(0,h.jsx)(k,{path:"/404",element:(0,h.jsx)(Ho,{})}),(0,h.jsx)(k,{path:"*",element:(0,h.jsx)(Ho,{})})]})})]})})})})},zw=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Uw(e,t){navigator.serviceWorker.register(e).then((function(e){e.onupdatefound=function(){var n=e.installing;null!=n&&(n.onstatechange=function(){"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((function(e){console.error("Error during service worker registration:",e)}))}var Yw=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,r=t.getFID,o=t.getFCP,i=t.getLCP,a=t.getTTFB;n(e),r(e),o(e),i(e),a(e)}))};r.render((0,h.jsx)(e.StrictMode,{children:(0,h.jsx)(Bw,{})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){if(new URL("",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("","/service-worker.js");zw?(!function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then((function(n){var r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then((function(e){e.unregister().then((function(){window.location.reload()}))})):Uw(e,t)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(t,e),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")}))):Uw(t,e)}))}}(),Yw()}()})();
|
|
//# sourceMappingURL=main.64a1750c.js.map |