mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 18:02:34 +00:00
316 lines
2.0 MiB
JavaScript
316 lines
2.0 MiB
JavaScript
|
|
var co=Object.defineProperty;var uo=(s,e,t)=>e in s?co(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var G=(s,e,t)=>(uo(s,typeof e!="symbol"?e+"":e,t),t);function _mergeNamespaces(s,e){for(var t=0;t<e.length;t++){const i=e[t];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in s)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(s,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}function bind$4(s,e){return function(){return s.apply(e,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,kindOf=(s=>e=>{const t=toString.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=s=>(s=s.toLowerCase(),e=>kindOf(e)===s),typeOfTest=s=>e=>typeof e===s,{isArray:isArray$2}=Array,isUndefined=typeOfTest("undefined");function isBuffer(s){return s!==null&&!isUndefined(s)&&s.constructor!==null&&!isUndefined(s.constructor)&&isFunction$4(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&isArrayBuffer(s.buffer),e}const isString$1=typeOfTest("string"),isFunction$4=typeOfTest("function"),isNumber$1=typeOfTest("number"),isObject$4=s=>s!==null&&typeof s=="object",isBoolean=s=>s===!0||s===!1,isPlainObject=s=>{if(kindOf(s)!=="object")return!1;const e=getPrototypeOf(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=s=>isObject$4(s)&&isFunction$4(s.pipe),isFormData=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||isFunction$4(s.append)&&((e=kindOf(s))==="formdata"||e==="object"&&isFunction$4(s.toString)&&s.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),trim$2=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let i,n;if(typeof s!="object"&&(s=[s]),isArray$2(s))for(i=0,n=s.length;i<n;i++)e.call(null,s[i],i,s);else{const o=t?Object.getOwnPropertyNames(s):Object.keys(s),r=o.length;let a;for(i=0;i<r;i++)a=o[i],e.call(null,s[a],a,s)}}function findKey$1(s,e){e=e.toLowerCase();const t=Object.keys(s);let i=t.length,n;for(;i-- >0;)if(n=t[i],e===n.toLowerCase())return n;return null}const _global=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),isContextDefined=s=>!isUndefined(s)&&s!==_global;function merge$1(){const{caseless:s}=isContextDefined(this)&&this||{},e={},t=(i,n)=>{const o=s&&findKey$1(e,n)||n;isPlainObject(e[o])&&isPlainObject(i)?e[o]=merge$1(e[o],i):isPlainObject(i)?e[o]=merge$1({},i):isArray$2(i)?e[o]=i.slice():e[o]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&forEach(arguments[i],t);return e}const extend=(s,e,t,{allOwnKeys:i}={})=>(forEach(e,(n,o)=>{t&&isFunction$4(n)?s[o]=bind$4(n,t):s[o]=n},{allOwnKeys:i}),s),stripBOM=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),inherits=(s,e,t,i)=>{s.prototype=Object.create(e.prototype,i),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},toFlatObject=(s,e,t,i)=>{let n,o,r;const a={};if(e=e||{},s==null)return e;do{for(n=Object.getOwnPropertyNames(s),o=n.length;o-- >0;)r=n[o],(!i||i(r,s,e))&&!a[r]&&(e[r]=s[r],a[r]=!0);s=t!==!1&&getPrototypeOf(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},endsWith=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const i=s.indexOf(e,t);return i!==-1&&i===t},toArray=s=>{if(!s)return null;if(isArray$2(s))return s;let e=s.length;if(!isNumber$1(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},isTypedArray=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(s,
|
||
|
|
`).forEach(function(r){n=r.indexOf(":"),t=r.substring(0,n).trim().toLowerCase(),i=r.substring(n+1).trim(),!(!t||e[t]&&ignoreDuplicateOf[t])&&(t==="set-cookie"?e[t]?e[t].push(i):e[t]=[i]:e[t]=e[t]?e[t]+", "+i:i)}),e},$internals=Symbol("internals");function normalizeHeader(s){return s&&String(s).trim().toLowerCase()}function normalizeValue(s){return s===!1||s==null?s:utils$2.isArray(s)?s.map(normalizeValue):String(s)}function parseTokens(s){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=t.exec(s);)e[i[1]]=i[2];return e}const isValidHeaderName=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function matchHeaderValue(s,e,t,i,n){if(utils$2.isFunction(i))return i.call(this,e,t);if(n&&(e=t),!!utils$2.isString(e)){if(utils$2.isString(i))return e.indexOf(i)!==-1;if(utils$2.isRegExp(i))return i.test(e)}}function formatHeader(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}function buildAccessors(s,e){const t=utils$2.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(s,i+t,{value:function(n,o,r){return this[i].call(this,e,n,o,r)},configurable:!0})})}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function o(a,l,d){const h=normalizeHeader(l);if(!h)throw new Error("header name must be a non-empty string");const p=utils$2.findKey(n,h);(!p||n[p]===void 0||d===!0||d===void 0&&n[p]!==!1)&&(n[p||l]=normalizeValue(a))}const r=(a,l)=>utils$2.forEach(a,(d,h)=>o(d,h,l));return utils$2.isPlainObject(e)||e instanceof this.constructor?r(e,t):utils$2.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)?r(parseHeaders(e),t):e!=null&&o(t,e,i),this}get(e,t){if(e=normalizeHeader(e),e){const i=utils$2.findKey(this,e);if(i){const n=this[i];if(!t)return n;if(t===!0)return parseTokens(n);if(utils$2.isFunction(t))return t.call(this,n,i);if(utils$2.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e),e){const i=utils$2.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||matchHeaderValue(this,this[i],i,t)))}return!1}delete(e,t){const i=this;let n=!1;function o(r){if(r=normalizeHeader(r),r){const a=utils$2.findKey(i,r);a&&(!t||matchHeaderValue(i,i[a],a,t))&&(delete i[a],n=!0)}}return utils$2.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;for(;i--;){const o=t[i];(!e||matchHeaderValue(this,this[o],o,e,!0))&&(delete this[o],n=!0)}return n}normalize(e){const t=this,i={};return utils$2.forEach(this,(n,o)=>{const r=utils$2.findKey(i,o);if(r){t[r]=normalizeValue(n),delete t[o];return}const a=e?formatHeader(o):String(o).trim();a!==o&&delete t[o],t[a]=normalizeValue(n),i[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils$2.forEach(this,(i,n)=>{i!=null&&i!==!1&&(t[n]=e&&utils$2.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
||
|
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(n=>i.set(n)),i}static accessor(e){const i=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function o(r){const a=normalizeHeader(r);i[a]||(buildAccessors(n,r),i[a]=!0)}return utils$2.isArray(e)?e.forEach(o):o(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$2.reduceDescriptors(AxiosHeaders.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(i){this[t]=i}}});utils$2.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(s,e){const t=this||defaults$3,i=e||t,n=AxiosHeaders$1.from(i.headers);let o=i.data;return utils$2.forEach(s,function(a){o=a.call(t,o,n.normalize(),e?e.status:void 0)}),n.normalize(),o}function isCancel(s){return!!(s&&s.__CANCEL__)}function CanceledError(s,e,t){AxiosError.call(this,s??"canceled",AxiosError.ERR_CANCELED,e,t),this.name="CanceledError"}utils$2.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(s,e,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?s(t):e(new AxiosError("Request failed with status code "+t.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const cookies=platform.hasStandardBrowserEnv?{write(s,e,t,i,n,o){const r=[s+"="+encodeURIComponent(e)];utils$2.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),utils$2.isString(i)&&r.push("path="+i),utils$2.isString(n)&&r.push("domain="+n),o===!0&&r.push("secure"),document.cookie=r.join("; ")},read(s){const e=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function combineURLs(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function buildFullPath(s,e){return s&&!isAbsoluteURL(e)?combineURLs(s,e):e}const isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function n(o){let r=o;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(r){const a=utils$2.isString(r)?n(r):r;return a.protocol===i.protocol&&a.host===i.host}}():function(){return function(){return!0}}();function parseProtocol(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function speedometer(s,e){s=s||10;const t=new Array(s),i=new Array(s);let n=0,o=0,r;return e=e!==void 0?e:1e3,function(l){const d=Date.now(),h=i[o];r||(r=d),t[n]=l,i[n]=d;let p=o,m=0;for(;p!==n;)m+=t[p++],p=p%s;if(n=(n+1)%s,n===o&&(o=(o+1)%s),d-r<e)return;const v=h&&d-h;return v?Math.round(m*1e3/v):void 0}}function progressEventReducer(s,e){let t=0;const i=speedometer(50,250);return n=>{const o=n.loaded,r=n.lengthComputable?n.total:void 0,a=o-t,l=i(a),d=o<=r;t=o;const h={loaded:o,total:r,progress:r?o/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&d?(r-o)/l:void 0,event:n};h[e?"download":"upload"]=!0,s(h)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(s){return new Promise(function(t,i){let n=s.data;const o=AxiosHeaders$1.from(s.headers).normalize();let{responseType:r,withXSRFToken:a}=s,l;function d(){s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let h;if(utils$2.isFormData(n)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((h=o.getContentType())!==!1){const[b,...S]=h?h.split(";").map(E=>E.trim()).
|
||
|
|
`+o.map(renderReason).join(`
|
||
|
|
`):" "+renderReason(o[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return i},adapters:knownAdapters};function throwIfCancellationRequested(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new CanceledError(null,s)}function dispatchRequest(s){return throwIfCancellationRequested(s),s.headers=AxiosHeaders$1.from(s.headers),s.data=transformData.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),adapters$1.getAdapter(s.adapter||defaults$3.adapter)(s).then(function(i){return throwIfCancellationRequested(s),i.data=transformData.call(s,s.transformResponse,i),i.headers=AxiosHeaders$1.from(i.headers),i},function(i){return isCancel(i)||(throwIfCancellationRequested(s),i&&i.response&&(i.response.data=transformData.call(s,s.transformResponse,i.response),i.response.headers=AxiosHeaders$1.from(i.response.headers))),Promise.reject(i)})}const headersToObject=s=>s instanceof AxiosHeaders$1?s.toJSON():s;function mergeConfig(s,e){e=e||{};const t={};function i(d,h,p){return utils$2.isPlainObject(d)&&utils$2.isPlainObject(h)?utils$2.merge.call({caseless:p},d,h):utils$2.isPlainObject(h)?utils$2.merge({},h):utils$2.isArray(h)?h.slice():h}function n(d,h,p){if(utils$2.isUndefined(h)){if(!utils$2.isUndefined(d))return i(void 0,d,p)}else return i(d,h,p)}function o(d,h){if(!utils$2.isUndefined(h))return i(void 0,h)}function r(d,h){if(utils$2.isUndefined(h)){if(!utils$2.isUndefined(d))return i(void 0,d)}else return i(void 0,h)}function a(d,h,p){if(p in e)return i(d,h);if(p in s)return i(void 0,d)}const l={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(d,h)=>n(headersToObject(d),headersToObject(h),!0)};return utils$2.forEach(Object.keys(Object.assign({},s,e)),function(h){const p=l[h]||n,m=p(s[h],e[h],h);utils$2.isUndefined(m)&&p!==a||(t[h]=m)}),t}const VERSION$2="1.6.7",validators$1={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{validators$1[s]=function(i){return typeof i===s||"a"+(e<1?"n ":" ")+s}});const deprecatedWarnings={};validators$1.transitional=function(e,t,i){function n(o,r){return"[Axios v"+VERSION$2+"] Transitional option '"+o+"'"+r+(i?". "+i:"")}return(o,r,a)=>{if(e===!1)throw new AxiosError(n(r," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!deprecatedWarnings[r]&&(deprecatedWarnings[r]=!0,console.warn(n(r," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,r,a):!0}};function assertOptions(s,e,t){if(typeof s!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const i=Object.keys(s);let n=i.length;for(;n-- >0;){const o=i[n],r=e[o];if(r){const a=s[o],l=a===void 0||r(a,o,s);if(l!==!0)throw new AxiosError("option "+o+" must be "+l,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new AxiosError("Unknown option "+o,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;const o=n.stack?n.stack.replace(/^.+\n/,""):"";i.stack?o&&!String(i.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
||
|
|
`+o):i.stack=o}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=mergeConfig(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:o}=t;i!==void 0&&validator.assertOptions(i,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),n!=null&&(utils$2.isFunction(n)?t.paramsSerializer={serialize:n}:validator.assertOptions(n,{encode:validators.function,serialize:validators.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&utils$2.merge(o.common,o[t.method]);o&&utils$2.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),t.headers=AxiosHeaders$1.concat(r,o);const a=[];let l=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(t)===!1||(l=l&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const d=[];this.interceptors.response.forEach(function(b){d.push(b.fulfilled,b.rejected)});let h,p=0,m;if(!l){const y=[dispatchRequest.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,d),m=y.length,h=Promise.resolve(t);p<m;)h=h.then(y[p++],y[p++]);return h}m=a.length;let v=t;for(p=0;p<m;){const y=a[p++],b=a[p++];try{v=y(v)}catch(S){b.call(this,S);break}}try{h=dispatchRequest.call(this,v)}catch(y){return Promise.reject(y)}for(p=0,m=d.length;p<m;)h=h.then(d[p++],d[p++]);return h}getUri(e){e=mergeConfig(this.defaults,e);const t=buildFullPath(e.baseURL,e.url);return buildURL(t,e.params,e.paramsSerializer)}}utils$2.forEach(["delete","get","head","options"],function(e){Axios.prototype[e]=function(t,i){return this.request(mergeConfig(i||{},{method:e,url:t,data:(i||{}).data}))}});utils$2.forEach(["post","put","patch"],function(e){function t(i){return function(o,r,a){return this.request(mergeConfig(a||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}Axios.prototype[e]=t(),Axios.prototype[e+"Form"]=t(!0)});const Axios$1=Axios;class CancelToken{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const i=this;this.promise.then(n=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](n);i._listeners=null}),this.promise.then=n=>{let o;const r=new Promise(a=>{i.subscribe(a),o=a}).then(n);return r.cancel=function(){i.unsubscribe(o)},r},e(function(o,r,a){i.reason||(i.reason=new CanceledError(o,r,a),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new CancelToken(function(n){e=n}),cancel:e}}}const CancelToken$1=CancelToken;function spread(s){return function(t){return s.apply(null,t)}}function isAxiosError(s){return utils$2.isObject(s)&&s.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,Servi
|
||
|
|
`+gap+a.join(`,
|
||
|
|
`+gap)+`
|
||
|
|
`+r+"]":"["+a.join(",")+"]",gap=r,n}if(rep&&typeof rep=="object")for(o=rep.length,t=0;t<o;t+=1)typeof rep[t]=="string"&&(i=rep[t],n=str(i,l),n&&a.push(quote(i)+(gap?": ":":")+n));else for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(n=str(i,l),n&&a.push(quote(i)+(gap?": ":":")+n));return n=a.length===0?"{}":gap?`{
|
||
|
|
`+gap+a.join(`,
|
||
|
|
`+gap)+`
|
||
|
|
`+r+"}":"{"+a.join(",")+"}",gap=r,n}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(s,e,t){var i;if(gap="",indent="",typeof t=="number")for(i=0;i<t;i+=1)indent+=" ";else typeof t=="string"&&(indent=t);if(rep=e,e&&typeof e!="function"&&(typeof e!="object"||typeof e.length!="number"))throw new Error("JSON.stringify");return str("",{"":s})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(s,e){var t,i,n=s[e];if(n&&typeof n=="object")for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&(i=walk(n,t),i!==void 0?n[t]=i:delete n[t]);return reviver.call(s,e,n)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(s){return"\\u"+("0000"+s.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()),json2$1}var json2=json2Plugin;function json2Plugin(){return requireJson2(),{}}var engine=storeEngine,storages=all,plugins=[json2],store_legacy=engine.createStore(storages,plugins);const store$1=getDefaultExportFromCjs(store_legacy);var util=util$7,bind$1=util.bind,each$2=util.each,create=util.create,slice$1=util.slice,events=eventsPlugin$1;function eventsPlugin$1(){var s=_newPubSub();return{watch:e,unwatch:t,once:i,set:n,remove:o,clearAll:r};function e(a,l,d){return s.on(l,bind$1(this,d))}function t(a,l){s.off(l)}function i(a,l,d){s.once(l,bind$1(this,d))}function n(a,l,d){var h=this.get(l);a(),s.fire(l,d,h)}function o(a,l){var d=this.get(l);a(),s.fire(l,void 0,d)}function r(a){var l={};this.each(function(d,h){l[h]=d}),a(),each$2(l,function(d,h){s.fire(h,void 0,d)})}}function _newPubSub(){return create(_pubSubBase,{_id:0,_subSignals:{},_subCallbacks:{}})}var _pubSubBase={_id:null,_subCallbacks:null,_subSignals:null,on:function(s,e){return this._subCallbacks[s]||(this._subCallbacks[s]={}),this._id+=1,this._subCallbacks[s][this._id]=e,this._subSignals[this._id]=s,this._id},off:function(s){var e=this._subSignals[s];delete this._subCallbacks[e][s],delete this._subSignals[s]},once:function(s,e){var t=this.on(s,bind$1(this,function(){e.apply(this,arguments),this.off(t)}))},fire:function(s){var e=slice$1(arguments,1);each$2(this._subCallbacks[s],function(t){t.apply(this,e)})}},eventsPlugin=events,observe=[eventsPlugin,observePlugin];function observePlugin(){return{observe:s,unobserve:e};function s(t,i,n){var o=this.watch(i,n);return n(this.get(i)),o}function e(t,i){this.unwatch(i)}}const observePlugin$1=getDefaultExportFromCjs(observe);var flushPending=!1,flushing=!1,queue=[],lastFlushedIndex=-1;function scheduler(s){queueJob(s)}function queueJob(s){queue.includes(s)||queue.push(s),queueFlush()}function dequeueJob(s){let e=queue.indexOf(s);e!==-1&&e>lastFlushedIndex&&queue.splice(e,1)}function queueFlush(){!flushing&&!flushPending&&(flushPending=!0,queueMicrotask(flushJobs))}function flushJobs(){flushPending=!1,flushing=!0;for(let s=0;s<queue.length;s++)queue[s](),lastFlushedIndex=s;queue.length=0,lastFlushedIndex=-1,flushing=!1}var reactive,effect$3,release,raw,shouldSchedule=!0;function disableEffectScheduling(s){shouldSchedule=!1,s(),shouldSchedule=!0}function setReactivityEngine(s){reactive=s.reactive,release=s.release,effect$3=e=>s.effect(e,{scheduler:t=>{shouldSchedule?scheduler(t):t()}}),raw=s.raw}function overrideEffect(s){effect$3=s}function elementBoundEffect(s){let e=()=>{};return[i=>{let n=effect$3(i);return s._x_effects||(s._x_effects=new Set,s._x_runEffects=()=>{s._x_effects.forEach(o=>o())}),s._x_effects.add(n),e=()=>{n!==void 0&&(s._x_effects.delete(n),release(n))},n},()=>{e()}]}function watch(s,e){let t=!0,i,n=effect$3(()=>{let o=s();JSON.stringify(o),t?i=o:queueMicrotask(()=>{e(o,i),i=o}),t=!1});return()=>release(n)}function dispatch(s,e,t={}){s.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0,cancelable:!0}))}function walk(s,e){if(typeof ShadowRoo
|
||
|
|
|
||
|
|
${t?'Expression: "'+t+`"
|
||
|
|
|
||
|
|
`:""}`,e),setTimeout(()=>{throw s},0)}var shouldAutoEvaluateFunctions=!0;function dontAutoEvaluateFunctions(s){let e=shouldAutoEvaluateFunctions;shouldAutoEvaluateFunctions=!1;let t=s();return shouldAutoEvaluateFunctions=e,t}function evaluate(s,e,t={}){let i;return evaluateLater(s,e)(n=>i=n,t),i}function evaluateLater(...s){return theEvaluatorFunction(...s)}var theEvaluatorFunction=normalEvaluator;function setEvaluator(s){theEvaluatorFunction=s}function normalEvaluator(s,e){let t={};injectMagics(t,s);let i=[t,...closestDataStack(s)],n=typeof e=="function"?generateEvaluatorFromFunction(i,e):generateEvaluatorFromString(i,e,s);return tryCatch.bind(null,s,e,n)}function generateEvaluatorFromFunction(s,e){return(t=()=>{},{scope:i={},params:n=[]}={})=>{let o=e.apply(mergeProxies([i,...s]),n);runIfTypeOfFunction(t,o)}}var evaluatorMemo={};function generateFunctionFromString(s,e){if(evaluatorMemo[s])return evaluatorMemo[s];let t=Object.getPrototypeOf(async function(){}).constructor,i=/^[\n\s]*if.*\(.*\)/.test(s.trim())||/^(let|const)\s/.test(s.trim())?`(async()=>{ ${s} })()`:s,o=(()=>{try{let r=new t(["__self","scope"],`with (scope) { __self.result = ${i} }; __self.finished = true; return __self.result;`);return Object.defineProperty(r,"name",{value:`[Alpine] ${s}`}),r}catch(r){return handleError(r,e,s),Promise.resolve()}})();return evaluatorMemo[s]=o,o}function generateEvaluatorFromString(s,e,t){let i=generateFunctionFromString(e,t);return(n=()=>{},{scope:o={},params:r=[]}={})=>{i.result=void 0,i.finished=!1;let a=mergeProxies([o,...s]);if(typeof i=="function"){let l=i(i,a).catch(d=>handleError(d,t,e));i.finished?(runIfTypeOfFunction(n,i.result,a,r,t),i.result=void 0):l.then(d=>{runIfTypeOfFunction(n,d,a,r,t)}).catch(d=>handleError(d,t,e)).finally(()=>i.result=void 0)}}}function runIfTypeOfFunction(s,e,t,i,n){if(shouldAutoEvaluateFunctions&&typeof e=="function"){let o=e.apply(t,i);o instanceof Promise?o.then(r=>runIfTypeOfFunction(s,r,t,i)).catch(r=>handleError(r,n,e)):s(o)}else typeof e=="object"&&e instanceof Promise?e.then(o=>s(o)):s(e)}var prefixAsString="x-";function prefix(s=""){return prefixAsString+s}function setPrefix(s){prefixAsString=s}var directiveHandlers={};function directive(s,e){return directiveHandlers[s]=e,{before(t){if(!directiveHandlers[t]){console.warn(String.raw`Cannot find directive \`${t}\`. \`${s}\` will use the default order of execution`);return}const i=directiveOrder.indexOf(t);directiveOrder.splice(i>=0?i:directiveOrder.indexOf("DEFAULT"),0,s)}}}function directives(s,e,t){if(e=Array.from(e),s._x_virtualDirectives){let o=Object.entries(s._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),r=attributesOnly(o);o=o.map(a=>r.find(l=>l.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),e=e.concat(o)}let i={};return e.map(toTransformedAttributes((o,r)=>i[o]=r)).filter(outNonAlpineAttributes).map(toParsedDirectives(i,t)).sort(byPriority).map(o=>getDirectiveHandler(s,o))}function attributesOnly(s){return Array.from(s).map(toTransformedAttributes()).filter(e=>!outNonAlpineAttributes(e))}var isDeferringHandlers=!1,directiveHandlerStacks=new Map,currentHandlerStackKey=Symbol();function deferHandlingDirectives(s){isDeferringHandlers=!0;let e=Symbol();currentHandlerStackKey=e,directiveHandlerStacks.set(e,[]);let t=()=>{for(;directiveHandlerStacks.get(e).length;)directiveHandlerStacks.get(e).shift()();directiveHandlerStacks.delete(e)},i=()=>{isDeferringHandlers=!1,t()};s(t),i()}function getElementBoundUtilities(s){let e=[],t=a=>e.push(a),[i,n]=elementBoundEffect(s);return e.push(n),[{Alpine:alpine_default,effect:i,cleanup:t,evaluateLater:evaluateLater.bind(evaluateLater,s),evaluate:evaluate.bind(evaluate,s)},()=>e.forEach(a=>a())]}function getDirectiveHandler(s,e){let t=()=>{},i=directiveHandlers[e.type]||t,[n,o]=getElementBoundUtilities(s);onAttributeRemoved(s,e.original,o);let r=()=>{s._x_ignore||s._x_ignoreSelf||(i.inline&&i.inline(s,e,n),i=i.bind(i,s,e,n),isDeferringHandlers?directiveHandlerStacks.get(currentHandlerStackKey).push(i):i())};return r.runCleanups=o,r}var startingWith=(s,e)=>({name
|
||
|
|
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
||
|
|
* Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||
|
|
*/const elementMap=new Map,Data={set(s,e,t){elementMap.has(s)||elementMap.set(s,new Map);const i=elementMap.get(s);if(!i.has(e)&&i.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`);return}i.set(e,t)},get(s,e){return elementMap.has(s)&&elementMap.get(s).get(e)||null},remove(s,e){if(!elementMap.has(s))return;const t=elementMap.get(s);t.delete(e),t.size===0&&elementMap.delete(s)}},MAX_UID=1e6,MILLISECONDS_MULTIPLIER=1e3,TRANSITION_END="transitionend",parseSelector=s=>(s&&window.CSS&&window.CSS.escape&&(s=s.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),s),toType=s=>s==null?`${s}`:Object.prototype.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase(),getUID=s=>{do s+=Math.floor(Math.random()*MAX_UID);while(document.getElementById(s));return s},getTransitionDurationFromElement=s=>{if(!s)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(s);const i=Number.parseFloat(e),n=Number.parseFloat(t);return!i&&!n?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*MILLISECONDS_MULTIPLIER)},triggerTransitionEnd=s=>{s.dispatchEvent(new Event(TRANSITION_END))},isElement=s=>!s||typeof s!="object"?!1:(typeof s.jquery<"u"&&(s=s[0]),typeof s.nodeType<"u"),getElement=s=>isElement(s)?s.jquery?s[0]:s:typeof s=="string"&&s.length>0?document.querySelector(parseSelector(s)):null,isVisible$1=s=>{if(!isElement(s)||s.getClientRects().length===0)return!1;const e=getComputedStyle(s).getPropertyValue("visibility")==="visible",t=s.closest("details:not([open])");if(!t)return e;if(t!==s){const i=s.closest("summary");if(i&&i.parentNode!==t||i===null)return!1}return e},isDisabled=s=>!s||s.nodeType!==Node.ELEMENT_NODE||s.classList.contains("disabled")?!0:typeof s.disabled<"u"?s.disabled:s.hasAttribute("disabled")&&s.getAttribute("disabled")!=="false",findShadowRoot=s=>{if(!document.documentElement.attachShadow)return null;if(typeof s.getRootNode=="function"){const e=s.getRootNode();return e instanceof ShadowRoot?e:null}return s instanceof ShadowRoot?s:s.parentNode?findShadowRoot(s.parentNode):null},noop$3=()=>{},reflow=s=>{s.offsetHeight},getjQuery=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,DOMContentLoadedCallbacks=[],onDOMContentLoaded=s=>{document.readyState==="loading"?(DOMContentLoadedCallbacks.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of DOMContentLoadedCallbacks)e()}),DOMContentLoadedCallbacks.push(s)):s()},isRTL=()=>document.documentElement.dir==="rtl",defineJQueryPlugin=s=>{onDOMContentLoaded(()=>{const e=getjQuery();if(e){const t=s.NAME,i=e.fn[t];e.fn[t]=s.jQueryInterface,e.fn[t].Constructor=s,e.fn[t].noConflict=()=>(e.fn[t]=i,s.jQueryInterface)}})},execute=(s,e=[],t=s)=>typeof s=="function"?s(...e):t,executeAfterTransition=(s,e,t=!0)=>{if(!t){execute(s);return}const i=5,n=getTransitionDurationFromElement(e)+i;let o=!1;const r=({target:a})=>{a===e&&(o=!0,e.removeEventListener(TRANSITION_END,r),execute(s))};e.addEventListener(TRANSITION_END,r),setTimeout(()=>{o||triggerTransitionEnd(e)},n)},getNextActiveElement=(s,e,t,i)=>{const n=s.length;let o=s.indexOf(e);return o===-1?!t&&i?s[n-1]:s[0]:(o+=t?1:-1,i&&(o=(o+n)%n),s[Math.max(0,Math.min(o,n-1))])},namespaceRegex=/[^.]*(?=\..*)\.|.*/,stripNameRegex=/\..*/,stripUidRegex=/::\d+$/,eventRegistry={};let uidEvent=1;const customEvents={mouseenter:"mouseover",mouseleave:"mouseout"},nativeEvents=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function makeEventUid(s,e){return e&&`${e}::${uidEvent++}`|
|
||
|
|
`)===0?W.substr(1,W.length):W}).forEach(function(W){var X=W.split(":"),U=X.shift().trim();if(U){var se=X.join(":").trim();$.append(U,se)}}),$}x.call(V.prototype);function K(F,$){if(!(this instanceof K))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');$||($={}),this.type="default",this.status=$.status===void 0?200:$.status,this.ok=this.status>=200&&this.status<300,this.statusText=$.statusText===void 0?"":""+$.statusText,this.headers=new b($.headers),this.url=$.url||"",this._initBody(F)}x.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},K.error=function(){var F=new K(null,{status:0,statusText:""});return F.type="error",F};var J=[301,302,303,307,308];K.redirect=function(F,$){if(J.indexOf($)===-1)throw new RangeError("Invalid status code");return new K(null,{status:$,headers:{location:F}})},r.DOMException=a.DOMException;try{new r.DOMException}catch{r.DOMException=function($,Y){this.message=$,this.name=Y;var W=Error($);this.stack=W.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function Z(F,$){return new Promise(function(Y,W){var X=new V(F,$);if(X.signal&&X.signal.aborted)return W(new r.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function se(){U.abort()}U.onload=function(){var ae={status:U.status,statusText:U.statusText,headers:B(U.getAllResponseHeaders()||"")};ae.url="responseURL"in U?U.responseURL:ae.headers.get("X-Request-URL");var oe="response"in U?U.response:U.responseText;setTimeout(function(){Y(new K(oe,ae))},0)},U.onerror=function(){setTimeout(function(){W(new TypeError("Network request failed"))},0)},U.ontimeout=function(){setTimeout(function(){W(new TypeError("Network request failed"))},0)},U.onabort=function(){setTimeout(function(){W(new r.DOMException("Aborted","AbortError"))},0)};function pe(ae){try{return ae===""&&a.location.href?a.location.href:ae}catch{return ae}}U.open(X.method,pe(X.url),!0),X.credentials==="include"?U.withCredentials=!0:X.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&(l.blob?U.responseType="blob":l.arrayBuffer&&X.headers.get("Content-Type")&&X.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(U.responseType="arraybuffer")),$&&typeof $.headers=="object"&&!($.headers instanceof b)?Object.getOwnPropertyNames($.headers).forEach(function(ae){U.setRequestHeader(ae,v($.headers[ae]))}):X.headers.forEach(function(ae,oe){U.setRequestHeader(oe,ae)}),X.signal&&(X.signal.addEventListener("abort",se),U.onreadystatechange=function(){U.readyState===4&&X.signal.removeEventListener("abort",se)}),U.send(typeof X._bodyInit>"u"?null:X._bodyInit)})}return Z.polyfill=!0,a.fetch||(a.fetch=Z,a.Headers=b,a.Request=V,a.Response=K),r.Headers=b,r.Request=V,r.Response=K,r.fetch=Z,r})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var n=t.fetch?t:i;e=n.fetch,e.default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,s.exports=e}(browserPonyfill,browserPonyfill.exports)),browserPonyfill.exports}(function(s,e){var t;if(typeof fetch=="function"&&(typeof commonjsGlobal<"u"&&commonjsGlobal.fetch?t=commonjsGlobal.fetch:typeof window<"u"&&window.fetch?t=window.fetch:t=fetch),typeof commonjsRequire<"u"&&(typeof window>"u"||typeof window.document>"u")){var i=t||requireBrowserPonyfill();i.default&&(i=i.default),e.default=i,s.exports=e.default}})(getFetch$1,getFetch$1.exports);var getFetchExports=getFetch$1.exports;const getFetch=getDefaultExportFromCjs(getFetchExports),fetchNode=_mergeNamespaces({__proto__:null,default:getFetch},[getFetchExports]);function ownKeys$2(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable})),t.push.apply(t,i)}return t}function _objectSpread$2(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ownKeys
|
||
|
|
* @kurkle/color v0.3.2
|
||
|
|
* https://github.com/kurkle/color#readme
|
||
|
|
* (c) 2023 Jukka Kurkela
|
||
|
|
* Released under the MIT License
|
||
|
|
*/function round(s){return s+.5|0}const lim=(s,e,t)=>Math.max(Math.min(s,t),e);function p2b(s){return lim(round(s*2.55),0,255)}function n2b(s){return lim(round(s*255),0,255)}function b2n(s){return lim(round(s/2.55)/100,0,1)}function n2p(s){return lim(round(s*100),0,100)}const map$1={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},hex=[..."0123456789ABCDEF"],h1=s=>hex[s&15],h2=s=>hex[(s&240)>>4]+hex[s&15],eq=s=>(s&240)>>4===(s&15),isShort=s=>eq(s.r)&&eq(s.g)&&eq(s.b)&&eq(s.a);function hexParse(s){var e=s.length,t;return s[0]==="#"&&(e===4||e===5?t={r:255&map$1[s[1]]*17,g:255&map$1[s[2]]*17,b:255&map$1[s[3]]*17,a:e===5?map$1[s[4]]*17:255}:(e===7||e===9)&&(t={r:map$1[s[1]]<<4|map$1[s[2]],g:map$1[s[3]]<<4|map$1[s[4]],b:map$1[s[5]]<<4|map$1[s[6]],a:e===9?map$1[s[7]]<<4|map$1[s[8]]:255})),t}const alpha=(s,e)=>s<255?e(s):"";function hexString(s){var e=isShort(s)?h1:h2;return s?"#"+e(s.r)+e(s.g)+e(s.b)+alpha(s.a,e):void 0}const HUE_RE=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function hsl2rgbn(s,e,t){const i=e*Math.min(t,1-t),n=(o,r=(o+s/30)%12)=>t-i*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function hsv2rgbn(s,e,t){const i=(n,o=(n+s/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function hwb2rgbn(s,e,t){const i=hsl2rgbn(s,1,.5);let n;for(e+t>1&&(n=1/(e+t),e*=n,t*=n),n=0;n<3;n++)i[n]*=1-e-t,i[n]+=e;return i}function hueValue(s,e,t,i,n){return s===n?(e-t)/i+(e<t?6:0):e===n?(t-s)/i+2:(s-e)/i+4}function rgb2hsl(s){const t=s.r/255,i=s.g/255,n=s.b/255,o=Math.max(t,i,n),r=Math.min(t,i,n),a=(o+r)/2;let l,d,h;return o!==r&&(h=o-r,d=a>.5?h/(2-o-r):h/(o+r),l=hueValue(t,i,n,h,o),l=l*60+.5),[l|0,d||0,a]}function calln(s,e,t,i){return(Array.isArray(e)?s(e[0],e[1],e[2]):s(e,t,i)).map(n2b)}function hsl2rgb(s,e,t){return calln(hsl2rgbn,s,e,t)}function hwb2rgb(s,e,t){return calln(hwb2rgbn,s,e,t)}function hsv2rgb(s,e,t){return calln(hsv2rgbn,s,e,t)}function hue(s){return(s%360+360)%360}function hueParse(s){const e=HUE_RE.exec(s);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?p2b(+e[5]):n2b(+e[5]));const n=hue(+e[2]),o=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?i=hwb2rgb(n,o,r):e[1]==="hsv"?i=hsv2rgb(n,o,r):i=hsl2rgb(n,o,r),{r:i[0],g:i[1],b:i[2],a:t}}function rotate(s,e){var t=rgb2hsl(s);t[0]=hue(t[0]+e),t=hsl2rgb(t),s.r=t[0],s.g=t[1],s.b=t[2]}function hslString(s){if(!s)return;const e=rgb2hsl(s),t=e[0],i=n2p(e[1]),n=n2p(e[2]);return s.a<255?`hsla(${t}, ${i}%, ${n}%, ${b2n(s.a)})`:`hsl(${t}, ${i}%, ${n}%)`}const map={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},names$1={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"
|
||
|
|
* Chart.js v4.4.1
|
||
|
|
* https://www.chartjs.org
|
||
|
|
* (c) 2023 Chart.js Contributors
|
||
|
|
* Released under the MIT License
|
||
|
|
*/function noop$1(){}const uid=(()=>{let s=0;return()=>s++})();function isNullOrUndef(s){return s===null||typeof s>"u"}function isArray(s){if(Array.isArray&&Array.isArray(s))return!0;const e=Object.prototype.toString.call(s);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function isObject(s){return s!==null&&Object.prototype.toString.call(s)==="[object Object]"}function isNumberFinite(s){return(typeof s=="number"||s instanceof Number)&&isFinite(+s)}function finiteOrDefault(s,e){return isNumberFinite(s)?s:e}function valueOrDefault(s,e){return typeof s>"u"?e:s}const toPercentage=(s,e)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100:+s/e,toDimension=(s,e)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100*e:+s;function callback(s,e,t){if(s&&typeof s.call=="function")return s.apply(t,e)}function each(s,e,t,i){let n,o,r;if(isArray(s))if(o=s.length,i)for(n=o-1;n>=0;n--)e.call(t,s[n],n);else for(n=0;n<o;n++)e.call(t,s[n],n);else if(isObject(s))for(r=Object.keys(s),o=r.length,n=0;n<o;n++)e.call(t,s[r[n]],r[n])}function _elementsEqual(s,e){let t,i,n,o;if(!s||!e||s.length!==e.length)return!1;for(t=0,i=s.length;t<i;++t)if(n=s[t],o=e[t],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function clone(s){if(isArray(s))return s.map(clone);if(isObject(s)){const e=Object.create(null),t=Object.keys(s),i=t.length;let n=0;for(;n<i;++n)e[t[n]]=clone(s[t[n]]);return e}return s}function isValidKey(s){return["__proto__","prototype","constructor"].indexOf(s)===-1}function _merger(s,e,t,i){if(!isValidKey(s))return;const n=e[s],o=t[s];isObject(n)&&isObject(o)?merge(n,o,i):e[s]=clone(o)}function merge(s,e,t){const i=isArray(e)?e:[e],n=i.length;if(!isObject(s))return s;t=t||{};const o=t.merger||_merger;let r;for(let a=0;a<n;++a){if(r=i[a],!isObject(r))continue;const l=Object.keys(r);for(let d=0,h=l.length;d<h;++d)o(l[d],s,r,t)}return s}function mergeIf(s,e){return merge(s,e,{merger:_mergerIf})}function _mergerIf(s,e,t){if(!isValidKey(s))return;const i=e[s],n=t[s];isObject(i)&&isObject(n)?mergeIf(i,n):Object.prototype.hasOwnProperty.call(e,s)||(e[s]=clone(n))}const keyResolvers={"":s=>s,x:s=>s.x,y:s=>s.y};function _splitKey(s){const e=s.split("."),t=[];let i="";for(const n of e)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function _getKeyResolver(s){const e=_splitKey(s);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function resolveObjectKey(s,e){return(keyResolvers[e]||(keyResolvers[e]=_getKeyResolver(e)))(s)}function _capitalize(s){return s.charAt(0).toUpperCase()+s.slice(1)}const defined$1=s=>typeof s<"u",isFunction$1=s=>typeof s=="function",setsEqual=(s,e)=>{if(s.size!==e.size)return!1;for(const t of s)if(!e.has(t))return!1;return!0};function _isClickEvent(s){return s.type==="mouseup"||s.type==="click"||s.type==="contextmenu"}const PI=Math.PI,TAU=2*PI,PITAU=TAU+PI,INFINITY=Number.POSITIVE_INFINITY,RAD_PER_DEG=PI/180,HALF_PI=PI/2,QUARTER_PI=PI/4,TWO_THIRDS_PI=PI*2/3,log10=Math.log10,sign=Math.sign;function almostEquals(s,e,t){return Math.abs(s-e)<t}function niceNum(s){const e=Math.round(s);s=almostEquals(s,e,s/1e3)?e:s;const t=Math.pow(10,Math.floor(log10(s))),i=s/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function _factorize(s){const e=[],t=Math.sqrt(s);let i;for(i=1;i<t;i++)s%i===0&&(e.push(i),e.push(s/i));return t===(t|0)&&e.push(t),e.sort((n,o)=>n-o).pop(),e}function isNumber(s){return!isNaN(parseFloat(s))&&isFinite(s)}function almostWhole(s,e){const t=Math.round(s);return t-e<=s&&t+e>=s}function _setMinAndMaxByKey(s,e,t){let i,n,o;for(i=0,n=s.length;i<n;i++)o=s[i][t],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function toRadians(s){return s*(PI/180)}function toDegrees(s){return s*(180/PI)}function _decimalPlaces(s){if(!isNumberFinite(s))return;let e=1,t=0;for(;Math.round(s*e)/e!==s;)e*=10,t++;return t}function getAngleFromPoint(s,e){const t=e.x-s.x,i=e.y-s.y,n=Math.sqrt(t*t+i*i);let o=Math.atan2(i,t);return o<-.5*PI&&(o+=TAU),{angle:o,distance:n}}function distanceBetweenPoints(s,e){return Math.sqrt(Math.pow(e.x-s.x,2)+Math.pow(e.y-s.y,2))}function _ang
|
||
|
|
* Chart.js v4.4.1
|
||
|
|
* https://www.chartjs.org
|
||
|
|
* (c) 2023 Chart.js Contributors
|
||
|
|
* Released under the MIT License
|
||
|
|
*/class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,n){const o=t.listeners[n],r=t.duration;o.forEach(a=>a({chart:e,initial:t.initial,numSteps:r,currentStep:Math.min(i-t.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const o=i.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,i,e,"progress")),o.length||(i.running=!1,this._notify(n,i,e,"complete"),i.initial=!1),t+=o.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,n)=>Math.max(i,n._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var animator=new Animator;const transparent="transparent",interpolators={boolean(s,e,t){return t>.5?e:s},color(s,e,t){const i=color(s||transparent),n=i.valid&&color(e||transparent);return n&&n.valid?n.mix(i,t).hexString():e},number(s,e,t){return s+(e-s)*t}};class Animation{constructor(e,t,i,n){const o=t[i];n=resolve([e.to,n,o,e.from]);const r=resolve([e.from,o,n]);this._active=!0,this._fn=e.fn||interpolators[e.type||typeof r],this._easing=effects[e.easing]||effects.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const n=this._target[this._prop],o=i-this._start,r=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=resolve([e.to,t,n,e.from]),this._from=resolve([e.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||t<i),!this._active){this._target[n]=a,this._notify(!0);return}if(t<0){this._target[n]=o;return}l=t/i%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][t]()}}class Animations{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!isObject(e))return;const t=Object.keys(defaults.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{const o=e[n];if(!isObject(o))return;const r={};for(const a of t)r[a]=o[a];(isArray(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!i.has(a))&&i.set(a,r)})})}_animateOptions(e,t){const i=t.options,n=resolveTargetOptions(e,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&awaitAll(e.options.$animations,i).then(()=>{e.options=i},()=>{}),o}_createAnimations(e,t){const i=this._properties,n=[],o=e.$animations||(e.$animations={}),r=Object.keys(t),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const d=r[l];if(d.charAt(0)==="$")continue;if(d==="options"){n.push(...this._animateOptions(e,t));continue}const h=t[d];let p=o[d];const m=i.get(d)
|
||
|
|
`)>-1?s.split(`
|
||
|
|
`):s}function createTooltipItem(s,e){const{element:t,datasetIndex:i,index:n}=e,o=s.getDatasetMeta(i).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:s,label:r,parsed:o.getParsed(n),raw:s.data.datasets[i].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:i,element:t}}function getTooltipSize(s,e){const t=s.chart.ctx,{body:i,footer:n,title:o}=s,{boxWidth:r,boxHeight:a}=e,l=toFont(e.bodyFont),d=toFont(e.titleFont),h=toFont(e.footerFont),p=o.length,m=n.length,v=i.length,y=toPadding(e.padding);let b=y.height,S=0,E=i.reduce((A,D)=>A+D.before.length+D.lines.length+D.after.length,0);if(E+=s.beforeBody.length+s.afterBody.length,p&&(b+=p*d.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),E){const A=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;b+=v*A+(E-v)*l.lineHeight+(E-1)*e.bodySpacing}m&&(b+=e.footerMarginTop+m*h.lineHeight+(m-1)*e.footerSpacing);let T=0;const R=function(A){S=Math.max(S,t.measureText(A).width+T)};return t.save(),t.font=d.string,each(s.title,R),t.font=l.string,each(s.beforeBody.concat(s.afterBody),R),T=e.displayColors?r+2+e.boxPadding:0,each(i,A=>{each(A.before,R),each(A.lines,R),each(A.after,R)}),T=0,t.font=h.string,each(s.footer,R),t.restore(),S+=y.width,{width:S,height:b}}function determineYAlign(s,e){const{y:t,height:i}=e;return t<i/2?"top":t>s.height-i/2?"bottom":"center"}function doesNotFitWithAlign(s,e,t,i){const{x:n,width:o}=i,r=t.caretSize+t.caretPadding;if(s==="left"&&n+o+r>e.width||s==="right"&&n-o-r<0)return!0}function determineXAlign(s,e,t,i){const{x:n,width:o}=t,{width:r,chartArea:{left:a,right:l}}=s;let d="center";return i==="center"?d=n<=(a+l)/2?"left":"right":n<=o/2?d="left":n>=r-o/2&&(d="right"),doesNotFitWithAlign(d,s,e,t)&&(d="center"),d}function determineAlignment(s,e,t){const i=t.yAlign||e.yAlign||determineYAlign(s,t);return{xAlign:t.xAlign||e.xAlign||determineXAlign(s,e,t,i),yAlign:i}}function alignX(s,e){let{x:t,width:i}=s;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function alignY(s,e,t){let{y:i,height:n}=s;return e==="top"?i+=t:e==="bottom"?i-=n+t:i-=n/2,i}function getBackgroundPoint(s,e,t,i){const{caretSize:n,caretPadding:o,cornerRadius:r}=s,{xAlign:a,yAlign:l}=t,d=n+o,{topLeft:h,topRight:p,bottomLeft:m,bottomRight:v}=toTRBLCorners(r);let y=alignX(e,a);const b=alignY(e,l,d);return l==="center"?a==="left"?y+=d:a==="right"&&(y-=d):a==="left"?y-=Math.max(h,m)+n:a==="right"&&(y+=Math.max(p,v)+n),{x:_limitValue(y,0,i.width-e.width),y:_limitValue(b,0,i.height-e.height)}}function getAlignedX(s,e,t){const i=toPadding(t.padding);return e==="center"?s.x+s.width/2:e==="right"?s.x+s.width-i.right:s.x+i.left}function getBeforeAfterBodyLines(s){return pushOrConcat([],splitNewlines(s))}function createTooltipContext(s,e,t){return createContext(s,{tooltip:e,tooltipItems:t,type:"tooltip"})}function overrideCallbacks(s,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?s.override(t):s}const defaultCallbacks={beforeTitle:noop$1,title(s){if(s.length>0){const e=s[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return t[e.dataIndex]}return""},afterTitle:noop$1,beforeBody:noop$1,beforeLabel:noop$1,label(s){if(this&&this.options&&this.options.mode==="dataset")return s.label+": "+s.formattedValue||s.formattedValue;let e=s.dataset.label||"";e&&(e+=": ");const t=s.formattedValue;return isNullOrUndef(t)||(e+=t),e},labelColor(s){const t=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(s){const t=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:noop$1,afterBody:noop$1,beforeFooter:noop$1,footer:noop$1,afterFooter:noop$1};function invokeCallbackWithFallback(s,e,t,i){const n=s[
|
||
|
|
* chartjs-chart-sankey v0.12.0
|
||
|
|
* https://github.com/kurkle/chartjs-chart-sankey#readme
|
||
|
|
* (c) 2022 Jukka Kurkela
|
||
|
|
* Released under the MIT license
|
||
|
|
*/function toTextLines(s){const e=[],t=isArray(s)?s:isNullOrUndef(s)?[]:[s];for(;t.length;){const i=t.pop();typeof i=="string"?e.unshift.apply(e,i.split(`
|
||
|
|
`)):Array.isArray(i)?t.push.apply(t,i):isNullOrUndef(t)||e.unshift(""+i)}return e}function validateSizeValue(s){return!s||["min","max"].indexOf(s)===-1?"max":s}const defined=s=>s!==void 0;function calculateX(s,e){const t=new Set(e.map(r=>r.to)),i=new Set(e.map(r=>r.from)),n=new Set([...s.keys()]);let o=0;for(;n.size;){const r=nextColumn([...n],t);for(const a of r){const l=s.get(a);defined(l.x)||(l.x=o),n.delete(a)}n.size&&(t.clear(),e.filter(a=>n.has(a.from)).forEach(a=>t.add(a.to)),o++)}return[...s.keys()].filter(r=>!i.has(r)).forEach(r=>{const a=s.get(r);a.column||(a.x=o)}),o}function nextColumn(s,e){const t=s.filter(i=>!e.has(i));return t.length?t:s.slice(0,1)}const nodeByXY=(s,e)=>s.x!==e.x?s.x-e.x:s.y-e.y;let prevCountId=-1;function getCountId(){return prevCountId=prevCountId<100?prevCountId+1:0,prevCountId}function nodeCount(s,e,t=getCountId()){let i=0;for(const n of s)n.node._visited!==t&&(n.node._visited=t,i+=n.node[e].length+nodeCount(n.node[e],e,t));return i}const flowByNodeCount=s=>(e,t)=>nodeCount(e.node[s],s)-nodeCount(t.node[s],s)||e.node[s].length-t.node[s].length;function processFrom(s,e){s.from.sort(flowByNodeCount("from"));for(const t of s.from){const i=t.node;defined(i.y)||(i.y=e,processFrom(i,e)),e=Math.max(i.y+i.out,e)}return e}function processTo(s,e){s.to.sort(flowByNodeCount("to"));for(const t of s.to){const i=t.node;defined(i.y)||(i.y=e,processTo(i,e)),e=Math.max(i.y+i.in,e)}return e}function setOrGetY(s,e){return defined(s.y)?s.y:(s.y=e,e)}function processRest(s,e){const t=s.filter(h=>h.x===0),i=s.filter(h=>h.x===e),n=t.filter(h=>!defined(h.y)),o=i.filter(h=>!defined(h.y)),r=s.filter(h=>h.x>0&&h.x<e&&!defined(h.y));let a=t.reduce((h,p)=>Math.max(h,p.y+p.out||0),0),l=i.reduce((h,p)=>Math.max(h,p.y+p.in||0),0),d=0;return a>=l?(n.forEach(h=>{a=setOrGetY(h,a),a=Math.max(a+h.out,processTo(h,a))}),o.forEach(h=>{l=setOrGetY(h,l),l=Math.max(l+h.in,processTo(h,l))})):(o.forEach(h=>{l=setOrGetY(h,l),l=Math.max(l+h.in,processTo(h,l))}),n.forEach(h=>{a=setOrGetY(h,a),a=Math.max(a+h.out,processTo(h,a))})),r.forEach(h=>{let p=s.filter(m=>m.x===h.x&&defined(m.y)).reduce((m,v)=>Math.max(m,v.y+Math.max(v.in,v.out)),0);p=setOrGetY(h,p),p=Math.max(p+h.in,processFrom(h,p)),p=Math.max(p+h.out,processTo(h,p)),d=Math.max(d,p)}),Math.max(a,l,d)}function calculateY(s,e){s.sort((r,a)=>Math.max(a.in,a.out)-Math.max(r.in,r.out));const t=s[0];t.y=0;const i=processFrom(t,0),n=processTo(t,0),o=processRest(s,e);return Math.max(i,n,o)}function calculateYUsingPriority(s,e){let t=0,i=0;for(let n=0;n<=e;n++){let o=i;const r=s.filter(a=>a.x===n).sort((a,l)=>a.priority-l.priority);i=r[0].to.filter(a=>a.node.x>n+1).reduce((a,l)=>a+l.flow,0)||0;for(const a of r)a.y=o,o+=Math.max(a.out,a.in);t=Math.max(o,t)}return t}function addPadding(s,e){let t=1,i=0,n=0,o=0;const r=[];s.sort(nodeByXY);for(const a of s){if(a.y){if(a.x===0)r.push(a.y);else{for(i!==a.x&&(i=a.x,n=0),t=n+1;t<r.length&&!(r[t]>a.y);t++);n=t}a.y+=t*e,t++}o=Math.max(o,a.y+Math.max(a.in,a.out))}return o}function sortFlows(s,e){s.forEach(t=>{const i=Math[e](t.in||t.out,t.out||t.in),n=i<t.in,o=i<t.out;let r=0,a=t.from.length;t.from.sort((l,d)=>l.node.y+l.node.out/2-(d.node.y+d.node.out/2)).forEach((l,d)=>{n?l.addY=d*(i-l.flow)/(a-1):(l.addY=r,r+=l.flow)}),r=0,a=t.to.length,t.to.sort((l,d)=>l.node.y+l.node.in/2-(d.node.y+d.node.in/2)).forEach((l,d)=>{o?l.addY=d*(i-l.flow)/(a-1):(l.addY=r,r+=l.flow)})})}function layout(s,e,t,i){const n=[...s.values()],o=calculateX(s,e),a=(t?calculateYUsingPriority(n,o):calculateY(n,o))*.03,l=addPadding(n,a);return sortFlows(n,i),{maxX:o,maxY:l}}function buildNodesFromRawData(s){const e=new Map;for(let i=0;i<s.length;i++){const{from:n,to:o,flow:r}=s[i];if(!e.has(n))e.set(n,{key:n,in:0,out:r,from:[],to:[{key:o,flow:r,index:i}]});else{const a=e.get(n);a.out+=r,a.to.push({key:o,flow:r,index:i})}if(!e.has(o))e.set(o,{key:o,in:r,out:0,from:[{key:n,flow:r,index:i}],to:[]});else{const a=e.get(o);a.in+=r,a.from.push({key:n,flow:r,index:i})}}const t=(i,n)=>n.flow-i.flow;return[...e.values()].forEach(i=>{i.from=i.from.sort(t),i.from.forEach(n=>{n.node=e.get
|
||
|
|
* chartjs-adapter-date-fns v3.0.0
|
||
|
|
* https://www.chartjs.org
|
||
|
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
||
|
|
* Released under the MIT license
|
||
|
|
*/const FORMATS={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};adapters._date.override({_id:"date-fns",formats:function(){return FORMATS},parse:function(s,e){if(s===null||typeof s>"u")return null;const t=typeof s;return t==="number"||s instanceof Date?s=toDate(s):t==="string"&&(typeof e=="string"?s=parse$1(s,e,new Date,this.options):s=parseISO(s,this.options)),isValid(s)?s.getTime():null},format:function(s,e){return format(s,e,this.options)},add:function(s,e,t){switch(t){case"millisecond":return addMilliseconds(s,e);case"second":return addSeconds(s,e);case"minute":return addMinutes(s,e);case"hour":return addHours(s,e);case"day":return addDays(s,e);case"week":return addWeeks(s,e);case"month":return addMonths(s,e);case"quarter":return addQuarters(s,e);case"year":return addYears(s,e);default:return s}},diff:function(s,e,t){switch(t){case"millisecond":return differenceInMilliseconds(s,e);case"second":return differenceInSeconds(s,e);case"minute":return differenceInMinutes(s,e);case"hour":return differenceInHours(s,e);case"day":return differenceInDays(s,e);case"week":return differenceInWeeks(s,e);case"month":return differenceInMonths(s,e);case"quarter":return differenceInQuarters(s,e);case"year":return differenceInYears(s,e);default:return 0}},startOf:function(s,e,t){switch(e){case"second":return startOfSecond(s);case"minute":return startOfMinute(s);case"hour":return startOfHour(s);case"day":return startOfDay(s);case"week":return startOfWeek(s);case"isoWeek":return startOfWeek(s,{weekStartsOn:+t});case"month":return startOfMonth(s);case"quarter":return startOfQuarter(s);case"year":return startOfYear(s);default:return s}},endOf:function(s,e){switch(e){case"second":return endOfSecond(s);case"minute":return endOfMinute(s);case"hour":return endOfHour(s);case"day":return endOfDay(s);case"week":return endOfWeek(s);case"month":return endOfMonth(s);case"quarter":return endOfQuarter(s);case"year":return endOfYear(s);default:return s}}});const leaflet="",DEFAULTS$1={showAllSuggestions:!1,suggestionsThreshold:1,maximumItems:0,autoselectFirst:!0,ignoreEnter:!1,updateOnSelect:!1,highlightTyped:!1,highlightClass:"",fullWidth:!1,fixed:!1,fuzzy:!1,startsWith:!1,fillIn:!1,preventBrowserAutocomplete:!1,itemClass:"",activeClasses:["bg-primary","text-white"],labelField:"label",valueField:"value",searchFields:["label"],queryParam:"query",items:[],source:null,hiddenInput:!1,hiddenValue:"",clearControl:"",datalist:"",server:"",serverMethod:"GET",serverParams:{},serverDataKey:"data",fetchOptions:{},liveServer:!1,noCache:!0,debounceTime:300,notFoundMessage:"",onRenderItem:(s,e,t)=>e,onSelectItem:(s,e)=>{},onServerResponse:(s,e)=>s.json(),onChange:(s,e)=>{},onBeforeFetch:s=>{},onAfterFetch:s=>{}},LOADING_CLASS$1="is-loading",ACTIVE_CLASS$1="is-active",SHOW_CLASS$1="show",NEXT$1="next",PREV$1="prev",INSTANCE_MAP$1=new WeakMap;let counter$1=0,activeCounter=0;function debounce$2(s,e=300){let t;return(...i)=>{clearTimeout(t),t=setTimeout(()=>{s.apply(this,i)},e)}}function removeDiacritics$1(s){return s.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function normalize$1(s){return s?removeDiacritics$1(s.toString()).toLowerCase():""}function fuzzyMatch$1(s,e){if(s.indexOf(e)>=0)return!0;let t=0;for(let i=0;i<e.length;i++){const n=e[i];if(n!=" "&&(t=s.indexOf(n,t)+1,t<=0))return!1}return!0}function insertAfter(s,e){return s.parentNode.insertBefore(e,s.nextSibling)}function decodeHtml(s){var e=document.createElement("textarea");return e.innerHTML=s,e.value}function attrs$1(s,e){for(const[t,i]of Object.entries(e))s.setAttribute(t,i)}function zwijit(s){s.ariaLabel=s.innerText,s.innerHTML=s.innerText.split("").map(e=>e+"‍").join("")}function nested$1(s,e="window"){return s.split(".").reduce((t,i)=>t[i],e)}class Autocomplete{constructor(e,t={}){G(this,"handleEvent",e=>{["scroll","resize"].includes(e.type)?(this._timer&&window.cancelAnimationFrame(this._timer),this._timer=window.requestAnimationFrame(()=>{this[`on${
|
||
|
|
<path fill-rule="evenodd" d="M2 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H3.707l10.147 10.146a.5.5 0 0 1-.708.708L3 3.707V8.5a.5.5 0 0 1-1 0z"/>
|
||
|
|
</svg>`,n.append(r),n.classList.add("d-flex","justify-content-between"),r.addEventListener("click",a=>{this._searchInput.value=t.label,this._searchInput.focus()})}return o.addEventListener("mouseenter",r=>{this._keyboardNavigation||(this.removeSelection(),n.querySelector("a").classList.add(...this._activeClasses()))}),o.addEventListener("mousedown",r=>{r.preventDefault()}),o.addEventListener("click",r=>{r.preventDefault(),this._preventInput=!0,this._searchInput.value=decodeHtml(t.label),this._hiddenInput&&(this._hiddenInput.value=t.value),this._config.onSelectItem(t,this),this.hideSuggestions(),this._preventInput=!1}),n}_showSuggestions(){if(document.activeElement!=this._searchInput)return;const e=normalize$1(this._searchInput.value);this._dropElement.innerHTML="";const t=Object.keys(this._items);let i=0,n=null;const o=[];for(let r=0;r<t.length;r++){const a=t[r],l=this._items[a],d=this._config.showAllSuggestions||e.length===0;let h=e.length==0&&this._config.suggestionsThreshold===0;!d&&e.length>0&&this._config.searchFields.forEach(m=>{const v=normalize$1(l[m]);let y=!1;if(this._config.fuzzy)y=fuzzyMatch$1(v,e);else{const b=v.indexOf(e);y=this._config.startsWith?b===0:b>=0}y&&(h=!0)});const p=h||e.length===0;if(d||h){if(i++,l.group&&!o.includes(l.group)){const v=this._createGroup(l.group);this._dropElement.appendChild(v),o.push(l.group)}const m=this._createItem(e,l);if(!n&&p&&(n=m),this._dropElement.appendChild(m),this._config.maximumItems>0&&i>=this._config.maximumItems)break}}if(n&&this._config.autoselectFirst&&(this.removeSelection(),this._moveSelection(NEXT$1,n)),i===0)if(this._config.notFoundMessage){const r=this._createLi();r.innerHTML=`<span class="dropdown-item">${this._config.notFoundMessage}</span>`,this._dropElement.appendChild(r),this._showDropdown()}else this.hideSuggestions();else this._showDropdown()}_createLi(){const e=document.createElement("li");return e.setAttribute("role","presentation"),e}_showDropdown(){this._dropElement.classList.add(SHOW_CLASS$1),this._dropElement.setAttribute("role","menu"),attrs$1(this._searchInput,{"aria-expanded":"true"}),this._positionMenu()}toggleSuggestions(e=!0){this._dropElement.classList.contains(SHOW_CLASS$1)?this.hideSuggestions():this.showOrSearch(e)}hideSuggestions(){this._dropElement.classList.remove(SHOW_CLASS$1),attrs$1(this._searchInput,{"aria-expanded":"false"}),this.removeSelection()}getInput(){return this._searchInput}getDropMenu(){return this._dropElement}_positionMenu(){const e=window.getComputedStyle(this._searchInput),t=this._searchInput.getBoundingClientRect(),i=e.direction==="rtl",n=this._config.fullWidth,o=this._config.fixed;let r=null,a=null;o&&(r=t.x,a=t.y+t.height,i&&!n&&(r-=this._dropElement.offsetWidth-t.width)),this._dropElement.style.transform="unset",n&&(this._dropElement.style.width=this._searchInput.offsetWidth+"px"),r!==null&&(this._dropElement.style.left=r+"px"),a!==null&&(this._dropElement.style.top=a+"px");const l=this._dropElement.getBoundingClientRect(),d=window.innerHeight;if(l.y+l.height>d){const h=n?t.height+4:t.height;this._dropElement.style.transform="translateY(calc(-100.1% - "+h+"px))"}}_fetchData(){this._items={},this._addItems(this._config.items);const e=this._config.datalist;if(e){const t=document.querySelector(`#${e}`);if(t){const i=Array.from(t.children).map(n=>{const o=n.getAttribute("value")??n.innerHTML.toLowerCase(),r=n.innerHTML;return{value:o,label:r}});this._addItems(i)}else console.error(`Datalist not found ${e}`)}this._setHiddenVal(),this._config.server&&!this._config.liveServer&&this._loadFromServer()}_setHiddenVal(){if(this._config.hiddenInput&&!this._config.hiddenValue)for(const[e,t]of Object.entries(this._items))t.label==this._searchInput.value&&(this._hiddenInput.value=e)}_addItems(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i],o=e[n];if(o.group&&o.items){o.items.forEach(l=>l.group=o.group),this._addItems(o.items);continue}const r=typeof o=="string"?o:o.label,a=typeof o!="object"?{}:o;a.label=o[this._config.labelField]??r,a.value=o[this._config.valueField]??n,a.label&&(this._items[a.val
|
||
|
|
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
||
|
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||
|
|
*/(function(s,e){(function(t,i){i(e)})(commonjsGlobal,function(t){var i="1.9.4";function n(c){var u,g,C,w;for(g=1,C=arguments.length;g<C;g++){w=arguments[g];for(u in w)c[u]=w[u]}return c}var o=Object.create||function(){function c(){}return function(u){return c.prototype=u,new c}}();function r(c,u){var g=Array.prototype.slice;if(c.bind)return c.bind.apply(c,g.call(arguments,1));var C=g.call(arguments,2);return function(){return c.apply(u,C.length?C.concat(g.call(arguments)):arguments)}}var a=0;function l(c){return"_leaflet_id"in c||(c._leaflet_id=++a),c._leaflet_id}function d(c,u,g){var C,w,P,O;return O=function(){C=!1,w&&(P.apply(g,w),w=!1)},P=function(){C?w=arguments:(c.apply(g,arguments),setTimeout(O,u),C=!0)},P}function h(c,u,g){var C=u[1],w=u[0],P=C-w;return c===C&&g?c:((c-w)%P+P)%P+w}function p(){return!1}function m(c,u){if(u===!1)return c;var g=Math.pow(10,u===void 0?6:u);return Math.round(c*g)/g}function v(c){return c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")}function y(c){return v(c).split(/\s+/)}function b(c,u){Object.prototype.hasOwnProperty.call(c,"options")||(c.options=c.options?o(c.options):{});for(var g in u)c.options[g]=u[g];return c.options}function S(c,u,g){var C=[];for(var w in c)C.push(encodeURIComponent(g?w.toUpperCase():w)+"="+encodeURIComponent(c[w]));return(!u||u.indexOf("?")===-1?"?":"&")+C.join("&")}var E=/\{ *([\w_ -]+) *\}/g;function T(c,u){return c.replace(E,function(g,C){var w=u[C];if(w===void 0)throw new Error("No value provided for variable "+g);return typeof w=="function"&&(w=w(u)),w})}var R=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function A(c,u){for(var g=0;g<c.length;g++)if(c[g]===u)return g;return-1}var D="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(c){return window["webkit"+c]||window["moz"+c]||window["ms"+c]}var M=0;function I(c){var u=+new Date,g=Math.max(0,16-(u-M));return M=u+g,window.setTimeout(c,g)}var V=window.requestAnimationFrame||x("RequestAnimationFrame")||I,z=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(c){window.clearTimeout(c)};function B(c,u,g){if(g&&V===I)c.call(u);else return V.call(window,r(c,u))}function K(c){c&&z.call(window,c)}var J={__proto__:null,extend:n,create:o,bind:r,get lastId(){return a},stamp:l,throttle:d,wrapNum:h,falseFn:p,formatNum:m,trim:v,splitWords:y,setOptions:b,getParamString:S,template:T,isArray:R,indexOf:A,emptyImageUrl:D,requestFn:V,cancelFn:z,requestAnimFrame:B,cancelAnimFrame:K};function Z(){}Z.extend=function(c){var u=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},g=u.__super__=this.prototype,C=o(g);C.constructor=u,u.prototype=C;for(var w in this)Object.prototype.hasOwnProperty.call(this,w)&&w!=="prototype"&&w!=="__super__"&&(u[w]=this[w]);return c.statics&&n(u,c.statics),c.includes&&(F(c.includes),n.apply(null,[C].concat(c.includes))),n(C,c),delete C.statics,delete C.includes,C.options&&(C.options=g.options?o(g.options):{},n(C.options,c.options)),C._initHooks=[],C.callInitHooks=function(){if(!this._initHooksCalled){g.callInitHooks&&g.callInitHooks.call(this),this._initHooksCalled=!0;for(var P=0,O=C._initHooks.length;P<O;P++)C._initHooks[P].call(this)}},u},Z.include=function(c){var u=this.prototype.options;return n(this.prototype,c),c.options&&(this.prototype.options=u,this.mergeOptions(c.options)),this},Z.mergeOptions=function(c){return n(this.prototype.options,c),this},Z.addInitHook=function(c){var u=Array.prototype.slice.call(arguments,1),g=typeof c=="function"?c:function(){this[c].apply(this,u)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(g),this};function F(c){if(!(typeof L>"u"||!L||!L.Mixin)){c=R(c)?c:[c];for(var u=0;u<c.length;u++)c[u]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var $={on:function(c,u,g){if(typeof c=="object")for(var C in c)this._on(C,c[C],u);else{c=y(c);for(va
|
||
|
|
It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
||
|
|
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`;Object.getOwnPropertyNames(i).forEach(r=>{if(typeof i[r]=="function"&&!e.includes(r)){const l=()=>{console.warn(o(r))};n[r]={value:l,writable:!0}}}),Object.defineProperties(s,n)}function isNonNullObject(s){return typeof s=="object"&&s!==null}const ObjectUtils=Object.freeze(Object.defineProperty({__proto__:null,cloneObject,deepCloneDefinition,getAllValuesInObject,getValueUsingField,isNonNullObject,iterateObject,mergeDeep,removeAllReferences},Symbol.toStringTag,{value:"Module"})),doOnceFlags={};function doOnce(s,e){doOnceFlags[e]||(s(),doOnceFlags[e]=!0)}function warnOnce(s){doOnce(()=>console.warn("AG Grid: "+s),s)}function errorOnce(s){doOnce(()=>console.error("AG Grid: "+s),s)}function getFunctionName(s){if(s.name)return s.name;const e=/function\s+([^\(]+)/.exec(s.toString());return e&&e.length===2?e[1].trim():null}function isFunction(s){return!!(s&&s.constructor&&s.call&&s.apply)}function executeInAWhile(s){executeAfter(s,400)}const executeNextVMTurnFuncs=[];let executeNextVMTurnPending=!1;function executeNextVMTurn(s){executeNextVMTurnFuncs.push(s),!executeNextVMTurnPending&&(executeNextVMTurnPending=!0,window.setTimeout(()=>{const e=executeNextVMTurnFuncs.slice();executeNextVMTurnFuncs.length=0,executeNextVMTurnPending=!1,e.forEach(t=>t())},0))}function executeAfter(s,e=0){s.length>0&&window.setTimeout(()=>s.forEach(t=>t()),e)}function debounce(s,e){let t;return function(...i){const n=this;window.clearTimeout(t),t=window.setTimeout(function(){s.apply(n,i)},e)}}function throttle(s,e){let t=0;return function(...i){const n=this,o=new Date().getTime();o-t<e||(t=o,s.apply(n,i))}}function waitUntil(s,e,t=100,i){const n=new Date().getTime();let o=null,r=!1;const a=()=>{const l=new Date().getTime()-n>t;(s()||l)&&(e(),r=!0,o!=null&&(window.clearInterval(o),o=null),l&&i&&console.warn(i))};a(),r||(o=window.setInterval(a,10))}function compose(...s){return e=>s.reduce((t,i)=>i(t),e)}const noop=()=>{},FunctionUtils=Object.freeze(Object.defineProperty({__proto__:null,compose,debounce,doOnce,errorOnce,executeAfter,executeInAWhile,executeNextVMTurn,getFunctionName,isFunction,noop,throttle,waitUntil,warnOnce},Symbol.toStringTag,{value:"Module"}));var ModuleNames;(function(s){s.CommunityCoreModule="@ag-grid-community/core",s.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",s.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",s.CsvExportModule="@ag-grid-community/csv-export",s.EnterpriseCoreModule="@ag-grid-enterprise/core",s.RowGroupingModule="@ag-grid-enterprise/row-grouping",s.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",s.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",s.MenuModule="@ag-grid-enterprise/menu",s.SetFilterModule="@ag-grid-enterprise/set-filter",s.MultiFilterModule="@ag-grid-enterprise/multi-filter",s.StatusBarModule="@ag-grid-enterprise/status-bar",s.SideBarModule="@ag-grid-enterprise/side-bar",s.RangeSelectionModule="@ag-grid-enterprise/range-selection",s.MasterDetailModule="@ag-grid-enterprise/master-detail",s.RichSelectModule="@ag-grid-enterprise/rich-select",s.GridChartsModule="@ag-grid-enterprise/charts",s.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",s.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",s.ExcelExportModule="@ag-grid-enterprise/excel-export",s.ClipboardModule="@ag-grid-enterprise/clipboard",s.SparklinesModule="@ag-grid-enterprise/sparklines",s.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",s.AngularModule="@ag-grid-community/angular",s.ReactModule="@ag-grid-community/react",s.VueModule="@ag-grid-community/vue"})(ModuleNames||(ModuleNames={}));class ModuleRegistry{static register(e){ModuleRegistry.__register(e,!0,void 0)}static registerModules(e){ModuleRegistry.__registerModules(e,!0,void 0)}static __register(e,t,i){ModuleRegistry.runVersionChecks(e),i!==void 0?(ModuleRegistry.areGridScopedModules=!0,ModuleRegistry.gridModulesMap[i]===void 0&&(ModuleRegistry.gridModulesMap[i]={}),ModuleRegistr
|
||
|
|
|
||
|
|
<script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>
|
||
|
|
|
||
|
|
For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(ModuleRegistry.moduleBased||ModuleRegistry.moduleBased===void 0){let a=(n=Object.entries(ModuleNames).find(([l,d])=>d===e))===null||n===void 0?void 0:n[0];r=`AG Grid: unable to use ${t} as the ${a} is not registered${ModuleRegistry.areGridScopedModules?` for gridId: ${i}`:""}. Check if you have registered the module:
|
||
|
|
|
||
|
|
import { ModuleRegistry } from '@ag-grid-community/core';
|
||
|
|
import { ${a} } from '${e}';
|
||
|
|
|
||
|
|
ModuleRegistry.registerModules([ ${a} ]);
|
||
|
|
|
||
|
|
For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else r=`AG Grid: unable to use ${t} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
|
||
|
|
|
||
|
|
import 'ag-grid-enterprise';
|
||
|
|
|
||
|
|
For more info see: https://www.ag-grid.com/javascript-grid/packages/`;return doOnce(()=>{console.warn(r)},o),!1}static __warnEnterpriseChartDisabled(e){const i="ag-charts-enterprise"+":"+e,o=`AG Grid: the '${e}' chart type is not supported in AG Charts Community. See https://ag-grid.com/javascript-data-grid/integrated-charts/ for more details.`;doOnce(()=>{console.warn(o)},i)}static __isRegistered(e,t){var i;return!!ModuleRegistry.globalModulesMap[e]||!!(!((i=ModuleRegistry.gridModulesMap[t])===null||i===void 0)&&i[e])}static __getRegisteredModules(e){return[...values(ModuleRegistry.globalModulesMap),...values(ModuleRegistry.gridModulesMap[e]||{})]}static __getGridRegisteredModules(e){var t;return values((t=ModuleRegistry.gridModulesMap[e])!==null&&t!==void 0?t:{})||[]}static __isPackageBased(){return!ModuleRegistry.moduleBased}}ModuleRegistry.globalModulesMap={};ModuleRegistry.gridModulesMap={};ModuleRegistry.areGridScopedModules=!1;class Context{constructor(e,t){if(this.beanWrappers={},this.destroyed=!1,!e||!e.beanClasses)return;this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();const i=this.getBeanInstances();this.wireBeans(i),this.logger.log(">> ag-Application Context ready - component is alive")}getBeanInstances(){return values(this.beanWrappers).map(e=>e.beanInstance)}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e}wireBeans(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),exists(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),iterateObject(this.beanWrappers,(t,i)=>{let n;i.bean.__agBeanMetaData&&i.bean.__agBeanMetaData.autowireMethods&&i.bean.__agBeanMetaData.autowireMethods.agConstructor&&(n=i.bean.__agBeanMetaData.autowireMethods.agConstructor);const o=this.getBeansForParameters(n,i.bean.name),r=new(i.bean.bind.apply(i.bean,[null,...o]));i.beanInstance=r});const e=Object.keys(this.beanWrappers).join(", ");this.logger.log(`created beans: ${e}`)}createBeanWrapper(e){const t=e.__agBeanMetaData;if(!t){let n;e.prototype.constructor?n=getFunctionName(e.prototype.constructor):n=""+e,console.error(`Context item ${n} is not a bean`);return}const i={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=i}autoWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(i,n)=>{const o=i.agClassAttributes;o&&o.forEach(r=>{const a=this.lookupBeanInstance(n,r.beanName,r.optional);t[r.attributeName]=a})})})}methodWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(i,n)=>{iterateObject(i.autowireMethods,(o,r)=>{if(o==="agConstructor")return;const a=this.getBeansForParameters(r,n);t[o].apply(t,a)})})})}forEachMetaDataInHierarchy(e,t){let i=Object.getPrototypeOf(e);for(;i!=null;){const n=i.constructor;if(n.hasOwnProperty("__agBeanMetaData")){const o=n.__agBeanMetaData,r=this.getBeanName(n);t(o,r)}i=Object.getPrototypeOf(i)}}getBeanName(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;const t=e.toString();return t.substring(9,t.indexOf("("))}getBeansForParameters(e,t){const i=[];return e&&iterateObject(e,(n,o)=>{const r=this.lookupBeanInstance(t,o);i[Number(n)]=r}),i}lookupBeanInstance(e,t,i=!1){if(this.destroyed)return this.logger.log(`AG Grid: bean reference ${t} is used after the grid is destroyed!`),null;if(t==="context")return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];const n=this.beanWrappers[t];return n?n.beanInstance:(i||console.error(`AG Grid: unable to find bean reference ${t} while initialising ${e}`),null)}callLifeCycleMethods(e,t){e.forEach(i=>this.callLifeCycleMethodsOnBean(i,t))}callLifeCycleMethodsOnBean(e,t,i){const n={};this.forEachMetaDataInHierarchy(e,r=>{const a=r[t];a&&a.forEach(l=>{l!=i&&(n[l]=!0)})}),Object.keys(n).forEach(r=>e[r]())}getBean(e){retur
|
||
|
|
<span style="display: inline-block; width: 1px"></span>
|
||
|
|
<span style="display: inline-block; width: 1px"></span>
|
||
|
|
</div>`,document.body.appendChild(s),s.scrollLeft=1,rtlNegativeScroll=Math.floor(s.scrollLeft)===0,document.body.removeChild(s),rtlNegativeScroll}function getScrollLeft(s,e){let t=s.scrollLeft;return e&&(t=Math.abs(t),isBrowserChrome()&&!isRtlNegativeScroll()&&(t=s.scrollWidth-s.clientWidth-t)),t}function setScrollLeft(s,e,t){t&&(isRtlNegativeScroll()?e*=-1:(isBrowserSafari()||isBrowserChrome())&&(e=s.scrollWidth-s.clientWidth-e)),s.scrollLeft=e}function clearElement(s){for(;s&&s.firstChild;)s.removeChild(s.firstChild)}function removeFromParent(s){s&&s.parentNode&&s.parentNode.removeChild(s)}function isInDOM(s){return!!s.offsetParent}function isVisible(s){const e=s;return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!isInDOM(s)||window.getComputedStyle(s).visibility!=="visible")}function loadTemplate(s){const e=document.createElement("div");return e.innerHTML=(s||"").trim(),e.firstChild}function ensureDomOrder(s,e,t){t&&t.nextSibling===e||(t?t.nextSibling?s.insertBefore(e,t.nextSibling):s.appendChild(e):s.firstChild&&s.firstChild!==e&&s.insertAdjacentElement("afterbegin",e))}function setDomChildOrder(s,e){for(let t=0;t<e.length;t++){const i=e[t],n=s.children[t];n!==i&&s.insertBefore(i,n)}}function insertWithDomOrder(s,e,t){t?t.insertAdjacentElement("afterend",e):s.firstChild?s.insertAdjacentElement("afterbegin",e):s.appendChild(e)}function addStylesToElement(s,e){if(e)for(const[t,i]of Object.entries(e)){if(!t||!t.length||i==null)continue;const n=camelCaseToHyphenated(t),o=i.toString(),r=o.replace(/\s*!important/g,""),a=r.length!=o.length?"important":void 0;s.style.setProperty(n,r,a)}}function isHorizontalScrollShowing(s){return s.clientWidth<s.scrollWidth}function isVerticalScrollShowing(s){return s.clientHeight<s.scrollHeight}function setElementWidth(s,e){e==="flex"?(s.style.removeProperty("width"),s.style.removeProperty("minWidth"),s.style.removeProperty("maxWidth"),s.style.flex="1 1 auto"):setFixedWidth(s,e)}function setFixedWidth(s,e){e=formatSize(e),s.style.width=e.toString(),s.style.maxWidth=e.toString(),s.style.minWidth=e.toString()}function setElementHeight(s,e){e==="flex"?(s.style.removeProperty("height"),s.style.removeProperty("minHeight"),s.style.removeProperty("maxHeight"),s.style.flex="1 1 auto"):setFixedHeight(s,e)}function setFixedHeight(s,e){e=formatSize(e),s.style.height=e.toString(),s.style.maxHeight=e.toString(),s.style.minHeight=e.toString()}function formatSize(s){return typeof s=="number"?`${s}px`:s}function isNodeOrElement(s){return s instanceof Node||s instanceof HTMLElement}function copyNodeList(s){if(s==null)return[];const e=[];return nodeListForEach(s,t=>e.push(t)),e}function iterateNamedNodeMap(s,e){if(s)for(let t=0;t<s.length;t++){const i=s[t];e(i.name,i.value)}}function addOrRemoveAttribute(s,e,t){t==null?s.removeAttribute(e):s.setAttribute(e,t.toString())}function nodeListForEach(s,e){if(s!=null)for(let t=0;t<s.length;t++)e(s[t])}function bindCellRendererToHtmlElement(s,e){s.then(t=>{const i=t.getGui();i!=null&&(typeof i=="object"?e.appendChild(i):e.innerHTML=i)})}const DomUtils=Object.freeze(Object.defineProperty({__proto__:null,FOCUSABLE_EXCLUDE,FOCUSABLE_SELECTOR,addOrRemoveAttribute,addStylesToElement,bindCellRendererToHtmlElement,clearElement,copyNodeList,ensureDomOrder,formatSize,getAbsoluteHeight,getAbsoluteWidth,getElementRectWithOffset,getElementSize,getInnerHeight,getInnerWidth,getScrollLeft,insertWithDomOrder,isElementChildOfClass,isFocusableFormField,isHorizontalScrollShowing,isInDOM,isNodeOrElement,isRtlNegativeScroll,isVerticalScrollShowing,isVisible,iterateNamedNodeMap,loadTemplate,nodeListForEach,radioCssClass,removeFromParent,setDisabled,setDisplayed,setDomChildOrder,setElementHeight,setElementWidth,setFixedHeight,setFixedWidth,setScrollLeft,setVisible},Symbol.toStringTag,{value:"Module"}));function fuzzyCheckStrings(s,e,t){const i={},n=s.filter(o=>!e.some(r=>r===o));return n.length>0&&n.forEach(o=>i[o]=fuzzySuggestions(o,t).values),i}function fuzzySuggestions(s,e,t,i){let n=e.map((a,l)=>({value:a,relevance:stringWeightedDistances(s.toLowerCase(),a
|
||
|
|
<div class="ag-floating-filter-input" role="presentation">
|
||
|
|
<ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>
|
||
|
|
</div>`)}destroy(){super.destroy()}init(e){this.params=e;const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}}__decorate$2s([RefSelector("eFloatingFilterText")],ReadOnlyFloatingFilter.prototype,"eFloatingFilterText",void 0);__decorate$2s([Autowired("columnModel")],ReadOnlyFloatingFilter.prototype,"columnModel",void 0);class DateCompWrapper{constructor(e,t,i,n){this.alive=!0,this.context=e,this.eParent=n,t.getDateCompDetails(i).newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}this.dateComp=a,a&&(n.appendChild(a.getGui()),a.afterGuiAttached&&a.afterGuiAttached(),this.tempValue&&a.setDate(this.tempValue),this.disabled!=null&&this.setDateCompDisabled(this.disabled))})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}setDisplayed(e){setDisplayed(this.eParent,e)}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}afterGuiAttached(e){this.dateComp&&typeof this.dateComp.afterGuiAttached=="function"&&this.dateComp.afterGuiAttached(e)}updateParams(e){var t,i;let n=!1;!((t=this.dateComp)===null||t===void 0)&&t.refresh&&typeof this.dateComp.refresh=="function"&&this.dateComp.refresh(e)!==null&&(n=!0),!n&&(!((i=this.dateComp)===null||i===void 0)&&i.onParamsUpdated)&&typeof this.dateComp.onParamsUpdated=="function"&&this.dateComp.onParamsUpdated(e)!==null&&warnOnce("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(e)}}class OptionsFactory{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(e=>{if(typeof e=="string")return;const t=[["displayKey"],["displayName"],["predicate","test"]],i=n=>n.some(o=>e[o]!=null)?!0:(console.warn(`AG Grid: ignoring FilterOptionDef as it doesn't contain one of '${n}'`),!1);if(!t.every(i)){this.filterOptions=this.filterOptions.filter(n=>n===e)||[];return}this.customFilterOptions[e.displayKey]=e})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){const t=this.filterOptions[0];typeof t=="string"?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")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}}const FILTER_LOCALE_TEXT={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:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",o
|
||
|
|
<div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>
|
||
|
|
<div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>
|
||
|
|
<div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>
|
||
|
|
<div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>
|
||
|
|
<div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>
|
||
|
|
<div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>
|
||
|
|
<div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>
|
||
|
|
<div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>
|
||
|
|
</div>`;class PositionableFeature extends BeanStub{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,n=e/2-this.getHeight()/2;this.offsetElement(i,n)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:n,minHeight:o,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let d=0,h=0;const p=isVisible(this.element);if(p){const m=this.findBoundaryElement(),v=window.getComputedStyle(m);if(v.minWidth!=null){const y=m.offsetWidth-this.element.offsetWidth;h=parseInt(v.minWidth,10)-y}if(v.minHeight!=null){const y=m.offsetHeight-this.element.offsetHeight;d=parseInt(v.minHeight,10)-y}}if(this.minHeight=o||d,this.minWidth=i||h,n&&this.setWidth(n),r&&this.setHeight(r),(!n||!r)&&this.refreshSize(),e)this.center();else if(a||l)this.offsetElement(a,l);else if(p&&t){let m=this.boundaryEl,v=!0;if(m||(m=this.findBoundaryElement(),v=!1),m){const y=parseFloat(m.style.top),b=parseFloat(m.style.left);v?this.offsetElement(isNaN(b)?0:b,isNaN(y)?0:y):this.setPosition(b,y)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(i),this.moveElementDragListener=i):(this.dragService.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const n=!!e[t],o=this.getResizerElement(t),r={dragStartPixels:0,eElement:o,onDragStart:a=>this.onResizeStart(a,t),onDragging:this.onResize.bind(this),onDragStop:a=>this.onResizeEnd(a,t)};(n||!this.isAlive()&&!n)&&(n?(this.dragService.addDragSource(r),this.resizeListeners.push(r),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=n)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,i=this.element;let n=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)setFixedHeight(i,e),e=getAbsoluteHeight(i),n=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(n?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?setFixedHeight(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const n=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:n.top,a=e?0:o.top;let l=0;if(t){const h=this.element.parentElement;if(h){const{bottom:p}=h.getBoundingClientRect();l=p-n.bottom}}return i+a-r-l}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let n=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)setFixedWidth(t,e),e=getAbsoluteWidth(t),n=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:o}=this.offsetParent,r=i?
|
||
|
|
<form class="ag-filter-wrapper">
|
||
|
|
<div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" ref="eFilterBody">
|
||
|
|
${this.createBodyTemplate()}
|
||
|
|
</div>
|
||
|
|
</form>`;this.setTemplate(i,e),t=this.getGui(),t&&t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.providedFilterParams=e,this.applyActive=ProvidedFilter.isUseApplyButton(e),this.resetButtonsPanel()}updateParams(e){this.providedFilterParams=e,this.applyActive=ProvidedFilter.isUseApplyButton(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(){const{buttons:e}=this.providedFilterParams,t=e&&e.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(clearElement(this.eButtonsPanel),this.buttonListeners.forEach(o=>o==null?void 0:o()),this.buttonListeners=[]):t&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!t){this.eButtonsPanel&&removeFromParent(this.eButtonsPanel);return}const i=document.createDocumentFragment(),n=o=>{let r,a;switch(o){case"apply":r=this.translate("applyFilter"),a=h=>this.onBtApply(!1,!1,h);break;case"clear":r=this.translate("clearFilter"),a=()=>this.onBtClear();break;case"reset":r=this.translate("resetFilter"),a=()=>this.onBtReset();break;case"cancel":r=this.translate("cancelFilter"),a=h=>{this.onBtCancel(h)};break;default:console.warn("AG Grid: Unknown button type specified");return}const d=loadTemplate(`<button
|
||
|
|
type="${o==="apply"?"submit":"button"}"
|
||
|
|
ref="${o}FilterButton"
|
||
|
|
class="ag-button ag-standard-button ag-filter-apply-panel-button"
|
||
|
|
>${r}
|
||
|
|
</button>`);this.buttonListeners.push(this.addManagedListener(d,"click",a)),i.append(d)};convertToSet(e).forEach(o=>n(o)),this.eButtonsPanel.append(i),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){const e=ProvidedFilter.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),t=debounce(this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.providedFilterParams.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const i=()=>{this.onUiChanged(!1,"prevent"),t==null||t()};e!=null?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const i=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(i,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,i){if(i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")){const o="columnFilter";this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:o})}const{closeOnApply:n}=this.providedFilterParams;n&&this.applyActive&&!e&&!t&&this.close(i)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,i=t&&t.key;let n;(i==="Enter"||i==="Space")&&(n={keyboardEvent:t}),this.hidePopup(n),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const i=this.isModelValid(this.getModelFromUi()),n=this.getRefElement("applyFilterButton");n&&setDisabled(n,!i)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e==null?void 0:e.container)}refreshFilterResizer(e){if(!this.positionableFeature||e==="toolPanel")return;const t=e==="floatingFilter"||e==="columnFilter",{positionableFeature:i,gridOptionsService:n}=this;t?(i.restoreLastSize(),i.setResizable(n.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}static getDebounceMs(e,t){return ProvidedFilter.isUseApplyButton(e)?(e.debounceMs!=null&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):e.debounceMs!=null?e.debounceMs:t}static isUseApplyButton(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0}refresh(e){return this.providedFilterParams=e,!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.localeService.getLocaleTextFunc()(e,FILTER_LOCALE_TEXT[e])}getCellValue(e){return this.providedFilterParams.getValue(e)}getPositionableElement(){return this.eFilterBody}}__decorate$2p([Autowired("rowModel")],ProvidedFilter.prototype,"rowModel",void 0);__decorate$2p([RefSelector("eFilterBody")],ProvidedFilter.prototype,"eFilterBody",void 0);__decorate$2p([PostConstruct],ProvidedFilter.prototype,"postConstruct",null);var __decorate$2o=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(type
|
||
|
|
<div class="ag-picker-field" role="presentation">
|
||
|
|
<div ref="eLabel"></div>
|
||
|
|
<div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
|
||
|
|
<div ref="eDisplayField" class="ag-picker-field-display"></div>
|
||
|
|
<div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
|
||
|
|
</div>
|
||
|
|
</div>`;class AgPickerField extends AgAbstractField{constructor(e){if(super(e,(e==null?void 0:e.template)||TEMPLATE$1,e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:n,minPickerWidth:o,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!n,i!=null&&this.setPickerMaxHeight(i),o!=null&&this.setPickerMinWidth(o),r!=null&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedListener(t,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));const{pickerIcon:i}=this.config;if(i){const n=createIconNoSpan(i,this.gridOptionsService);n&&this.eIcon.appendChild(n)}}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gridOptionsService.get("tabIndex").toString()),setAriaExpanded(e,!1),this.ariaRole&&setAriaRole(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case KeyCode.UP:case KeyCode.DOWN:case KeyCode.ENTER:case KeyCode.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case KeyCode.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.gridOptionsService.getDocument(),t=this.pickerComponent.getGui();this.gridOptionsService.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,Events.EVENT_BODY_SCROLL,()=>{this.hidePicker()}));const i=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:n,pickerAriaLabelValue:o,modalPicker:r=!0}=this.config,a={modal:r,eChild:t,closeOnEsc:!0,closedCallback:()=>{const y=e.activeElement===e.body;this.beforeHidePicker(),y&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:i(n,o)},l=this.popupService.addPopup(a),{maxPickerHeight:d,minPickerWidth:h,maxPickerWidth:p,variableWidth:m}=this;m?(h&&(t.style.minWidth=h),t.style.width=formatSize(getAbsoluteWidth(this.eWrapper)),p&&(t.style.maxWidth=p)):setElementWidth(t,p??getAbsoluteWidth(this.eWrapper));const v=d??`${getInnerHeight(this.popupService.getPopupParent())}px`;return t.style.setProperty("max-height",v),t.style.position="absolute",this.alignPickerToComponent(),l.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gridOptionsService.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:t})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!th
|
||
|
|
<div role="presentation">
|
||
|
|
<div ref="eLabel" class="ag-input-field-label"></div>
|
||
|
|
<div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
|
||
|
|
<${n} ref="eInput" class="ag-input-field-input"></${n}>
|
||
|
|
</div>
|
||
|
|
</div>`,t),this.inputType=i,this.displayFieldTag=n}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;const{width:e,value:t}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>this.setValue(e.target.value))}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return setElementWidth(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return addOrRemoveAttribute(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return setAriaLabel(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return setDisabled(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)addOrRemoveAttribute(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";addOrRemoveAttribute(this.eInput,"autocomplete",t)}return this}}__decorate$2l([RefSelector("eLabel")],AgAbstractInputField.prototype,"eLabel",void 0);__decorate$2l([RefSelector("eWrapper")],AgAbstractInputField.prototype,"eWrapper",void 0);__decorate$2l([RefSelector("eInput")],AgAbstractInputField.prototype,"eInput",void 0);class AgCheckbox extends AgAbstractInputField{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}addInputListeners(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchEvent({type:Events.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:i});const n=this.getInputElement(),o={type:Events.EVENT_CHECKBOX_CHANGED,id:n.id,name:n.name,selected:e,previousValue:t};this.eventService.dispatchEvent(o)}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){this.eWrapper.classList.toggle("ag-checked",e===!0),this.eWrapper.classList.toggle("ag-indeterminate",e==null)}}class AgRadioButton extends AgCheckbox{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedListener(this.eventService,Events.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))}onChange(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}}class SimpleFilterModelFormatter{constructor(e,t,i){this.localeService=e,this.options
|
||
|
|
<div class="ag-floating-filter-input" role="presentation">
|
||
|
|
<ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>
|
||
|
|
<div ref="eDateWrapper" style="display: flex;"></div>
|
||
|
|
</div>`)}getDefaultFilterOptions(){return DateFilter.DEFAULT_FILTER_OPTIONS}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new DateFilterModelFormatter(this.filterParams,this.localeService,this.optionsFactory);const t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){if(e){const i=e;this.dateComp.setDate(parseDateTimeFromString(i.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){setDisplayed(this.eDateWrapper,e),setDisplayed(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){const e=this.dateComp.getDate(),t=serialiseDate(e);this.params.parentFilterInstance(i=>{if(i){const n=parseDateTimeFromString(t);i.onFloatingFilterChanged(this.getLastType()||null,n)}})}getDateComponentParams(){const e=ProvidedFilter.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:debounce(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new DateCompWrapper(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){const e=this.gridOptionsService.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}}__decorate$2j([Autowired("userComponentFactory")],DateFloatingFilter.prototype,"userComponentFactory",void 0);__decorate$2j([RefSelector("eReadOnlyText")],DateFloatingFilter.prototype,"eReadOnlyText",void 0);__decorate$2j([RefSelector("eDateWrapper")],DateFloatingFilter.prototype,"eDateWrapper",void 0);var __decorate$2i=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class DefaultDateComponent extends Component{constructor(){super(`
|
||
|
|
<div class="ag-filter-filter">
|
||
|
|
<ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>
|
||
|
|
</div>`)}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);const t=this.gridOptionsService.getDocument(),i=this.eDateInput.getInputElement();this.addManagedListener(i,"mousedown",()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||i.focus()}),this.addManagedListener(i,"input",n=>{n.target===t.activeElement&&(this.eDateInput.isDisabled()||this.params.onDateChanged())})}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&isBrowserSafari(),t.type=i?"date":"text";const{minValidYear:n,maxValidYear:o,minValidDate:r,maxValidDate:a}=e.filterParams||{};if(r&&n&&warnOnce("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),a&&o&&warnOnce("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),r&&a){const[l,d]=[r,a].map(h=>h instanceof Date?h:parseDateTimeFromString(h));l&&d&&l.getTime()>d.getTime()&&warnOnce("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}r?r instanceof Date?t.min=dateToFormattedString(r):t.min=r:n&&(t.min=`${n}-01-01`),a?a instanceof Date?t.max=dateToFormattedString(a):t.max=a:o&&(t.max=`${o}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return parseDateTimeFromString(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(serialiseDate(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(e){return e.filterParams&&e.filterParams.browserDatePicker!=null?e.filterParams.browserDatePicker:isBrowserChrome()||isBrowserFirefox()||isBrowserSafari()&&getSafariVersion()>=14.1}}__decorate$2i([RefSelector("eDateInput")],DefaultDateComponent.prototype,"eDateInput",void 0);class AgInputTextField extends AgAbstractInputField{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){return this.eInput.value!==e&&(this.eInput.value=exists(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=i=>{isEventFromPrintableCharacter(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListener(this.eInput,"keydown",t),this.addManagedListener(this.eInput,"paste",i=>{var n;const o=(n=i.clipboardData)===null||n===void 0?void 0:n.getData("text");o&&o.split("").some(r=>!e.test(r))&&i.preventDefault()})}}class AgInputNumberField extends AgInputTextField{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"blur",()=>{const e=parseFloat(this.eInput.value),t=isNaN(e)?"":this.normalizeValue(e.toString());this.value!==t&&this.setValue(t)}),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any"}onWheel(e){document.activeElement===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));const t=parseFloat(e);return this.min!=null&&t<this.min?e=this.min.toString():this.max!=null&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(this.precision==null)return e;if(t){const n=parseFloat(e).toFixed(this.precision);return parseFloat(n).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return`${i[0]}.${i[1].slice(0,this.precision)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,addOrRemoveAttribute(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,addOrRemoveAttribute(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,addOrRemoveAttribute(this.eInput,"s
|
||
|
|
<div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>
|
||
|
|
`)}getDefaultDebounceMs(){return 500}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){var t;this.params=e;const i=(t=e.browserAutoComplete)!==null&&t!==void 0?t:!1;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=ProvidedFilter.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){const n=ProvidedFilter.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),o=debounce(this.syncUpWithParentFilter.bind(this),n);this.floatingFilterInputService.setValueChangedListener(o)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const t=this.floatingFilterInputService.getValue();clearElement(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}getAriaLabel(e){const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();return`${t} ${i("ariaFilterInput","Filter Input")}`}syncUpWithParentFilter(e){const t=e.key===KeyCode.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=TextFilter.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(n=>{n&&n.onFloatingFilterChanged(this.getLastType()||null,i||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}}__decorate$2h([Autowired("columnModel")],TextInputFloatingFilter.prototype,"columnModel",void 0);__decorate$2h([RefSelector("eFloatingFilterInputContainer")],TextInputFloatingFilter.prototype,"eFloatingFilterInputContainer",void 0);__decorate$2h([PostConstruct],TextInputFloatingFilter.prototype,"postConstruct",null);class FloatingFilterNumberInputService extends BeanStub{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new AgInputNumberField),this.eFloatingFilterTextInput=this.createManagedBean(new AgInputTextField),this.eFloatingFilterTextInput.setDisabled(!0);const t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,n=>this.valueChangedListener(n)),this.setupListeners(i,n=>this.valueChangedListener(n))}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}setValueChangedListener(e){this.valueChangedListener=e}setupListeners(e,t){this.addManagedListener(e,"input",t),this.addManagedListener(e,"keydown",t)}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}}class NumberFloatingFilter extends TextInputFloatingFilter{init(e){var t;super.init(e),this.filterModelFormatter=new NumberFilterModelFormatter(this.localeService,this.optionsFactory,(t=e.filterParams)===null||t===void 0?void 0:t.
|
||
|
|
<span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>
|
||
|
|
<span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>
|
||
|
|
<span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>
|
||
|
|
<span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>
|
||
|
|
<span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>
|
||
|
|
</span>`;__decorate$2g([RefSelector("eSortOrder")],SortIndicatorComp.prototype,"eSortOrder",void 0);__decorate$2g([RefSelector("eSortAsc")],SortIndicatorComp.prototype,"eSortAsc",void 0);__decorate$2g([RefSelector("eSortDesc")],SortIndicatorComp.prototype,"eSortDesc",void 0);__decorate$2g([RefSelector("eSortMixed")],SortIndicatorComp.prototype,"eSortMixed",void 0);__decorate$2g([RefSelector("eSortNone")],SortIndicatorComp.prototype,"eSortNone",void 0);__decorate$2g([Autowired("columnModel")],SortIndicatorComp.prototype,"columnModel",void 0);__decorate$2g([Autowired("sortController")],SortIndicatorComp.prototype,"sortController",void 0);var __decorate$2f=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class HeaderComp extends Component{constructor(){super(...arguments),this.lastMovingChanged=0}destroy(){super.destroy()}refresh(e){return this.params=e,this.workOutTemplate()!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||this.workOutSort()!=this.currentSort||this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide?!1:(this.setDisplayName(e),!0)}workOutTemplate(){var e;let t=(e=this.params.template)!==null&&e!==void 0?e:HeaderComp.TEMPLATE;return t=t&&t.trim?t.trim():t,t}init(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(e)}setDisplayName(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;const t=escapeString(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=t)}}addInIcon(e,t,i){if(t==null)return;const n=createIconNoSpan(e,this.gridOptionsService,i);n&&t.appendChild(n)}setupTap(){const{gridOptionsService:e}=this;if(e.get("suppressTouch"))return;const t=new TouchListener(this.getGui(),!0),i=this.shouldSuppressMenuHide(),n=i&&exists(this.eMenu),o=n?new TouchListener(this.eMenu,!0):t;if(this.params.enableMenu){const r=n?"EVENT_TAP":"EVENT_LONG_TAP",a=l=>this.params.showColumnMenuAfterMouseClick(l.touchStart);this.addManagedListener(o,TouchListener[r],a)}if(this.params.enableSorting){const r=a=>{var l,d;const h=a.touchStart.target;i&&(!((l=this.eMenu)===null||l===void 0)&&l.contains(h)||!((d=this.eFilterButton)===null||d===void 0)&&d.contains(h))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListener(t,TouchListener.EVENT_TAP,r)}if(this.params.enableFilterButton){const r=new TouchListener(this.eFilterButton,!0);this.addManagedListener(r,"tap",()=>this.params.showFilter(this.eFilterButton)),this.addDestroyFunc(()=>r.destroy())}this.addDestroyFunc(()=>t.destroy()),n&&this.addDestroyFunc(()=>o.destroy())}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){removeFromParent(this.eMenu),this.eMenu=void 0;return}const e=this.menuService.isLegacyMenuEnabled();this.addInIcon(e?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!e),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedListener(this.eMenu,"click",()=>this.params.showColumnMenu(this.eMenu)),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(e){var t,i,n,o;const{column:r}=this.params,a=this.menuService.isLegacyMenuEnabled();if(e&&!a){if(this.menuService.isFilterMenuInHeaderEnabled(r))return this.params.showFilter((i=(t=this.eFilterButton)!==null&&t!==void 0?t:this.eMenu)!==null&&i!==void 0?i:this.getGui()),!0}else if(this.params.e
|
||
|
|
<span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
|
||
|
|
<span ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
|
||
|
|
<div ref="eLabel" class="ag-header-cell-label" role="presentation">
|
||
|
|
<span ref="eText" class="ag-header-cell-text"></span>
|
||
|
|
<span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
|
||
|
|
<ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>
|
||
|
|
</div>
|
||
|
|
</div>`;__decorate$2f([Autowired("sortController")],HeaderComp.prototype,"sortController",void 0);__decorate$2f([Autowired("menuService")],HeaderComp.prototype,"menuService",void 0);__decorate$2f([Autowired("columnModel")],HeaderComp.prototype,"columnModel",void 0);__decorate$2f([RefSelector("eFilter")],HeaderComp.prototype,"eFilter",void 0);__decorate$2f([RefSelector("eFilterButton")],HeaderComp.prototype,"eFilterButton",void 0);__decorate$2f([RefSelector("eSortIndicator")],HeaderComp.prototype,"eSortIndicator",void 0);__decorate$2f([RefSelector("eMenu")],HeaderComp.prototype,"eMenu",void 0);__decorate$2f([RefSelector("eLabel")],HeaderComp.prototype,"eLabel",void 0);__decorate$2f([RefSelector("eText")],HeaderComp.prototype,"eText",void 0);__decorate$2f([RefSelector("eSortOrder")],HeaderComp.prototype,"eSortOrder",void 0);__decorate$2f([RefSelector("eSortAsc")],HeaderComp.prototype,"eSortAsc",void 0);__decorate$2f([RefSelector("eSortDesc")],HeaderComp.prototype,"eSortDesc",void 0);__decorate$2f([RefSelector("eSortMixed")],HeaderComp.prototype,"eSortMixed",void 0);__decorate$2f([RefSelector("eSortNone")],HeaderComp.prototype,"eSortNone",void 0);var __decorate$2e=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class HeaderGroupComp extends Component{constructor(){super(HeaderGroupComp.TEMPLATE)}destroy(){super.destroy()}init(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&warnOnce("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");const e=n=>{if(isStopPropagationForAgGrid(n))return;const o=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),o,"uiColumnExpanded")};this.addTouchAndClickListeners(this.eCloseIcon,e),this.addTouchAndClickListeners(this.eOpenIcon,e);const t=n=>{stopPropagationForAgGrid(n)};this.addManagedListener(this.eCloseIcon,"dblclick",t),this.addManagedListener(this.eOpenIcon,"dblclick",t),this.addManagedListener(this.getGui(),"dblclick",e),this.updateIconVisibility();const i=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(i,ProvidedColumnGroup.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(i,ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))}addTouchAndClickListeners(e,t){const i=new TouchListener(e,!0);this.addManagedListener(i,TouchListener.EVENT_TAP,t),this.addDestroyFunc(()=>i.destroy()),this.addManagedListener(e,"click",t)}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const t=this.params.columnGroup.isExpanded();setDisplayed(this.eOpenIcon,t),setDisplayed(this.eCloseIcon,!t)}else setDisplayed(this.eOpenIcon,!1),setDisplayed(this.eCloseIcon,!1)}addInIcon(e,t){const i=createIconNoSpan(e,this.gridOptionsService,null);i&&this.getRefElement(t).appendChild(i)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable()){setDisplayed(this.eOpenIcon,!1),setDisplayed(this.eCloseIcon,!1);return}}setupLabel(){var e;const{displayName:t,columnGroup:i}=this.params;if(exists(t)){const n=escapeString(t,!0);this.getRefElement("agLabel").textContent=n}this.addOrRemoveCssClass("ag-sticky-label",!(!((e=i.getColGroupDef())===null||e===void 0)&&e.suppressStickyLabel))}}HeaderGroupComp.TEMPLATE=`<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">
|
||
|
|
<span ref="agLabel" class="ag-header-group-text" role="presentation"></span>
|
||
|
|
<span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
|
||
|
|
<span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
|
||
|
|
</div>`;__decorate$2e([Autowired("columnModel")],HeaderGroupComp.prototype,"columnModel",void 0);__decorate$2e([RefSelector("agOpened")],HeaderGroupComp.prototype,"eOpenIcon",void 0);__decorate$2e([RefSelector("agClosed")],HeaderGroupComp.prototype,"eCloseIcon",void 0);class PopupComponent extends Component{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}}var __decorate$2d=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class LargeTextCellEditor extends PopupComponent{constructor(){super(LargeTextCellEditor.TEMPLATE)}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),exists(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===KeyCode.LEFT||t===KeyCode.UP||t===KeyCode.RIGHT||t===KeyCode.DOWN||e.shiftKey&&t===KeyCode.ENTER)&&e.stopPropagation()}afterGuiAttached(){const e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){const e=this.eTextArea.getValue();return!exists(e)&&!exists(this.params.value)?this.params.value:this.params.parseValue(e)}}LargeTextCellEditor.TEMPLATE=`<div class="ag-large-text">
|
||
|
|
<ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
|
||
|
|
</div>`;__decorate$2d([RefSelector("eTextArea")],LargeTextCellEditor.prototype,"eTextArea",void 0);var __decorate$2c=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class SelectCellEditor extends PopupComponent{constructor(){super(`<div class="ag-cell-edit-wrapper">
|
||
|
|
<ag-select class="ag-cell-editor" ref="eSelect"></ag-select>
|
||
|
|
</div>`),this.startedByEnter=!1}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:t,valueFormatterService:i,gridOptionsService:n}=this,{values:o,value:r,eventKey:a}=e;if(missing(o)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=a!=null?a===KeyCode.ENTER:!1;let l=!1;o.forEach(m=>{const v={value:m},y=i.formatValue(e.column,null,m),b=y!=null;v.text=b?y:m,t.addOption(v),l=l||r===m}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:d,valueListMaxWidth:h,valueListMaxHeight:p}=e;d!=null&&t.setPickerGap(d),p!=null&&t.setPickerMaxHeight(p),h!=null&&t.setPickerMaxWidth(h),n.get("editType")!=="fullRow"&&this.addManagedListener(this.eSelect,AgSelect.EVENT_ITEM_SELECTED,()=>e.stopEditing())}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}}__decorate$2c([Autowired("valueFormatterService")],SelectCellEditor.prototype,"valueFormatterService",void 0);__decorate$2c([RefSelector("eSelect")],SelectCellEditor.prototype,"eSelect",void 0);var __decorate$2b=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class SimpleCellEditor extends PopupComponent{constructor(e){super(`
|
||
|
|
<div class="ag-cell-edit-wrapper">
|
||
|
|
${e.getTemplate()}
|
||
|
|
</div>`),this.cellEditorInput=e}init(e){this.params=e;const t=this.eInput;this.cellEditorInput.init(t,e);let i;if(e.cellStartedEdit){this.focusAfterAttached=!0;const n=e.eventKey;n===KeyCode.BACKSPACE||e.eventKey===KeyCode.DELETE?i="":n&&n.length===1?i=n:(i=this.cellEditorInput.getStartValue(),n!==KeyCode.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,i=this.cellEditorInput.getStartValue();i!=null&&t.setStartValue(i),this.addManagedListener(t.getGui(),"keydown",n=>{const{key:o}=n;(o===KeyCode.PAGE_UP||o===KeyCode.PAGE_DOWN)&&n.preventDefault()})}afterGuiAttached(){var e,t;const i=this.localeService.getLocaleTextFunc(),n=this.eInput;if(n.setInputAriaLabel(i("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;isBrowserSafari()||n.getFocusableElement().focus();const o=n.getInputElement();this.highlightAllOnFocus?o.select():(t=(e=this.cellEditorInput).setCaret)===null||t===void 0||t.call(e)}focusIn(){const e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}}__decorate$2b([RefSelector("eInput")],SimpleCellEditor.prototype,"eInput",void 0);class TextCellEditorInput{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'}init(e,t){this.eInput=e,this.params=t,t.maxLength!=null&&e.setMaxLength(t.maxLength)}getValue(){const e=this.eInput.getValue();return!exists(e)&&!exists(this.params.value)?this.params.value:this.params.parseValue(e)}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){const e=this.eInput.getValue(),t=exists(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}}class TextCellEditor extends SimpleCellEditor{constructor(){super(new TextCellEditorInput)}}var __decorate$2a=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};const ARROW_UP="↑",ARROW_DOWN="↓";class AnimateShowChangeCellRenderer extends Component{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-change-delta");const i=document.createElement("span");i.setAttribute("class","ag-value-change-value"),e.appendChild(t),e.appendChild(i),this.setTemplateFromElement(e)}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}showDelta(e,t){const i=Math.abs(t),n=e.formatValue(i),o=exists(n)?n:i,r=t>=0;r?this.eDelta.textContent=ARROW_UP+o:this.eDelta.textContent=ARROW_DOWN+o,this.eDelta.classList.toggle("ag-value-change-delta-up",r),this.eDelta.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),clearElement(this.eDelta)}refresh(e,t=!1){const i=e.value;if(i===this.lastValue||(exists(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:exists(e.value)?this.eValue.textContent=i:clearElement(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof i=="number"&&typeof this.lastValue=="number"){const n=i-this.lastValue;this.showDelta(e,n)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}}__decorate$2a([Autowired("filterManager")],AnimateShowChangeCellRenderer.prototype,"filterManager",void 0);var __decorate$29=globalThis&&globalThis.__decorate||function(s,e,t,i){var
|
||
|
|
<div class="ag-selection-checkbox" role="presentation">
|
||
|
|
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
||
|
|
</div>`)}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.rowNode.isSelected();this.eCheckbox.setValue(e,!0)}onClicked(e,t,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:t,event:i,source:"checkboxSelected"})}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",n=>{stopPropagationForAgGrid(n)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",n=>{stopPropagationForAgGrid(n);const o=this.gridOptionsService.get("groupSelectsFiltered"),r=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(r,o)?this.onClicked(!0,o,n||{})===0&&this.onClicked(!1,o,n):r?this.onClicked(!1,o,n):this.onClicked(!0,o,n||{})}),this.addManagedListener(this.rowNode,RowNode.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,RowNode.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,RowNode.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gridOptionsService.get("isRowSelectable")||typeof this.getIsVisible()=="function"){const n=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,Events.EVENT_DISPLAYED_COLUMNS_CHANGED,n),this.addManagedListener(this.rowNode,RowNode.EVENT_DATA_CHANGED,n),this.addManagedListener(this.rowNode,RowNode.EVENT_CELL_CHANGED,n),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(this.eCheckbox.getPreviousValue()===void 0||e===void 0)&&this.gridOptionsService.isRowModelType("clientSide")}showOrHideSelect(){var e,t,i,n;let o=this.rowNode.selectable;const r=this.getIsVisible();if(o)if(typeof r=="function"){const l=(e=this.overrides)===null||e===void 0?void 0:e.callbackParams,d=(t=this.column)===null||t===void 0?void 0:t.createColumnFunctionCallbackParams(this.rowNode);o=d?r(Object.assign(Object.assign({},l),d)):!1}else o=r??!1;if((i=this.column)===null||i===void 0?void 0:i.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!o),this.setVisible(!0),this.setDisplayed(!0);return}if(!((n=this.overrides)===null||n===void 0)&&n.removeHidden){this.setDisplayed(o);return}this.setVisible(o)}getIsVisible(){var e,t;return this.overrides?this.overrides.isVisible:(t=(e=this.column)===null||e===void 0?void 0:e.getColDef())===null||t===void 0?void 0:t.checkboxSelection}}__decorate$28([RefSelector("eCheckbox")],CheckboxSelectionComponent.prototype,"eCheckbox",void 0);__decorate$28([PostConstruct],CheckboxSelectionComponent.prototype,"postConstruct",null);var VerticalDirection;(function(s){s[s.Up=0]="Up",s[s.Down=1]="Down"})(VerticalDirection||(VerticalDirection={}));var HorizontalDirection;(function(s){s[s.Left=0]="Left",s[s.Right=1]="Right"})(HorizontalDirection||(HorizontalDirection={}));var __decorate$27=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},DragAndDropService_1,DragSourceType;(function(s){s[s.ToolPanel=0]="ToolPanel",s[s.HeaderCell=1]="HeaderCell",s[s.RowDrag=2]="RowDrag",s[s.ChartPanel=3]="ChartPanel",s[s.AdvancedFilterBuilder=4]="AdvancedFilterBuilder"})(DragSourceType||(DragSourceType={}));let DragAndDropService=DragAndDropService_1=class extends BeanStub{constructor(){super(...arguments),this.dragSourceAndParamsList=[],this.dropTargets=[]}init(){this.ePinnedIcon=createIcon("columnMovePin",this.gridOptionsService,null),this.eHideIcon=createIcon("columnMoveHide",this.gridOptionsService,null),this.eMoveIcon=createIcon("columnMoveMove",this.g
|
||
|
|
<span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
|
||
|
|
<div class="ag-dnd-ghost-label"></div>
|
||
|
|
</div>`;__decorate$27([Autowired("dragService")],DragAndDropService.prototype,"dragService",void 0);__decorate$27([Autowired("mouseEventService")],DragAndDropService.prototype,"mouseEventService",void 0);__decorate$27([Autowired("columnApi")],DragAndDropService.prototype,"columnApi",void 0);__decorate$27([Autowired("gridApi")],DragAndDropService.prototype,"gridApi",void 0);__decorate$27([PostConstruct],DragAndDropService.prototype,"init",null);__decorate$27([PreDestroy],DragAndDropService.prototype,"clearDragSourceParamsList",null);DragAndDropService=DragAndDropService_1=__decorate$27([Bean("dragAndDropService")],DragAndDropService);var __decorate$26=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class RowDragComp extends Component{constructor(e,t,i,n,o,r){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=n,this.dragStartPixels=o,this.suppressVisibilityChange=r,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){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(createIconNoSpan("rowDrag",this.gridOptionsService,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gridOptionsService.get("rowDragManaged")?new ManagedVisibilityStrategy(this,this.beans,this.rowNode,this.column):new NonManagedVisibilityStrategy(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e),this.addDragSource(t)}getSelectedNodes(){if(!this.gridOptionsService.get("rowDragMultiRow"))return[this.rowNode];const t=this.beans.selectionService.getSelectedNodes();return t.indexOf(this.rowNode)!==-1?t:[this.rowNode]}checkCompatibility(){const e=this.gridOptionsService.get("rowDragManaged");this.gridOptionsService.get("treeData")&&e&&warnOnce("If using row drag with tree data, you cannot have rowDragManaged=true")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gridOptionsService.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.localeService.getLocaleTextFunc();this.dragSource={type:DragSourceType.RowDrag,eElement:this.getGui(),dragItemName:()=>{var i;const n=this.getDragItem(),o=((i=n.rowNodes)===null||i===void 0?void 0:i.length)||1,r=this.getRowDragText(this.column);return r?r(n,o):o===1?this.cellValueFn():`${o} ${t("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gridOptionsService.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}removeDragSource(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null}}__decorate$26([Autowired("beans")],RowDragComp.prototype,"beans",void 0);__decorate$26([PostConstruct],RowDragComp.prototype,"postConstruct",null);__decorate$26([PreDestroy],RowDragComp.prototype,"removeDragSource",null);class VisibilityStrategy extends BeanStub{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){const t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let i=!0,n=!1;this.column&&(i=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),n=isFunction(this.column.getColDef().rowDrag)),n?(this.parent.setDisplayed(!0,t),this.parent.setVisible(i,t)):(this.parent.setDisplayed(i,t),this.parent.setVisible(!0,t))}}}class NonManagedVisibilityStrategy extends VisibilityStrategy{constructor(e,t,i,
|
||
|
|
<span class="ag-group-expanded" ref="eExpanded"></span>
|
||
|
|
<span class="ag-group-contracted" ref="eContracted"></span>
|
||
|
|
<span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>
|
||
|
|
<span class="ag-group-value" ref="eValue"></span>
|
||
|
|
<span class="ag-group-child-count" ref="eChildCount"></span>
|
||
|
|
</span>`;__decorate$24([RefSelector("eExpanded")],GroupCellRenderer.prototype,"eExpanded",void 0);__decorate$24([RefSelector("eContracted")],GroupCellRenderer.prototype,"eContracted",void 0);__decorate$24([RefSelector("eCheckbox")],GroupCellRenderer.prototype,"eCheckbox",void 0);__decorate$24([RefSelector("eValue")],GroupCellRenderer.prototype,"eValue",void 0);__decorate$24([RefSelector("eChildCount")],GroupCellRenderer.prototype,"eChildCount",void 0);var __decorate$23=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class LoadingCellRenderer extends Component{constructor(){super(LoadingCellRenderer.TEMPLATE)}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){const e=createIconNoSpan("groupLoading",this.gridOptionsService,null);e&&this.eLoadingIcon.appendChild(e);const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}destroy(){super.destroy()}}LoadingCellRenderer.TEMPLATE=`<div class="ag-loading">
|
||
|
|
<span class="ag-loading-icon" ref="eLoadingIcon"></span>
|
||
|
|
<span class="ag-loading-text" ref="eLoadingText"></span>
|
||
|
|
</div>`;__decorate$23([RefSelector("eLoadingIcon")],LoadingCellRenderer.prototype,"eLoadingIcon",void 0);__decorate$23([RefSelector("eLoadingText")],LoadingCellRenderer.prototype,"eLoadingText",void 0);let LoadingOverlayComponent$1=class $n extends Component{constructor(){super()}destroy(){super.destroy()}init(e){const t=this.gridOptionsService.get("overlayLoadingTemplate");if(this.setTemplate(t??$n.DEFAULT_LOADING_OVERLAY_TEMPLATE),!t){const i=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=i("loadingOoo","Loading...")})}}};LoadingOverlayComponent$1.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>';let NoRowsOverlayComponent$1=class kn extends Component{constructor(){super()}destroy(){super.destroy()}init(e){const t=this.gridOptionsService.get("overlayNoRowsTemplate");if(this.setTemplate(t??kn.DEFAULT_NO_ROWS_TEMPLATE),!t){const i=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=i("noRowsToShow","No Rows To Show")})}}};NoRowsOverlayComponent$1.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center"></span>';let TooltipComponent$1=class extends PopupComponent{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:t}=e;this.getGui().textContent=escapeString(t,!0)}};class NumberCellEditorInput{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'}init(e,t){this.eInput=e,this.params=t,t.max!=null&&e.setMax(t.max),t.min!=null&&e.setMin(t.min),t.precision!=null&&e.setPrecision(t.precision),t.step!=null&&e.setStep(t.step);const i=e.getInputElement();t.preventStepping?e.addManagedListener(i,"keydown",this.preventStepping):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===KeyCode.UP||e.key===KeyCode.DOWN)&&e.preventDefault()}getValue(){const e=this.eInput.getValue();if(!exists(e)&&!exists(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(t==null)return t;if(typeof t=="string"){if(t==="")return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}}class NumberCellEditor extends SimpleCellEditor{constructor(){super(new NumberCellEditorInput)}}class DateCellEditorInput{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,t){this.eInput=e,this.params=t,t.min!=null&&e.setMin(t.min),t.max!=null&&e.setMax(t.max),t.step!=null&&e.setStep(t.step)}getValue(){const e=this.eInput.getDate();return!exists(e)&&!exists(this.params.value)?this.params.value:e??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return serialiseDate(e,!1)}}class DateCellEditor extends SimpleCellEditor{constructor(){super(new DateCellEditorInput)}}var __decorate$22=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class DateStringCellEditorInput{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,t){this.eInput=e,this.params=t,t.min!=null&&e.setMin(t.min),t.max!=null&&e.setMax(t.max),t.step!=null&&e.setStep(t.step)}getValue(){const e=this.formatDate(this.eInput.getDate());return!exists(e)&&!exists(this.params.value)?this.params.value:this.params.parseValue(e??"")}getStartValue(){var e,t;return serialiseDate((t=this.parseDate((e=this.params.value)!==null&&e!==void 0?e:void 0))!==null&&t!==void 0?t:null,!1)}parseDate(e){return this.getDataTypeService().getDateParserFunction(this.params.column)(e)}formatDate(e){return this.getDataTypeService().getDateFormatterFunction(this.params.column)(e)}}class DateStringCellEditor extends SimpleCellEditor{constructor(){super(new DateSt
|
||
|
|
<div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
|
||
|
|
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
||
|
|
</div>`;__decorate$21([RefSelector("eCheckbox")],CheckboxCellRenderer.prototype,"eCheckbox",void 0);var __decorate$20=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class CheckboxCellEditor extends PopupComponent{constructor(){super(`
|
||
|
|
<div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
|
||
|
|
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
||
|
|
</div>`)}init(e){var t;this.params=e;const i=(t=e.value)!==null&&t!==void 0?t:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,Events.EVENT_FIELD_VALUE_CHANGED,o=>this.setAriaLabel(o.selected))}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.localeService.getLocaleTextFunc(),i=getAriaCheckboxStateName(t,e),n=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${n} (${i})`)}}__decorate$20([RefSelector("eCheckbox")],CheckboxCellEditor.prototype,"eCheckbox",void 0);class AgMenuItemRenderer extends Component{constructor(){super(),this.setTemplate("<div></div>")}init(e){var t;this.params=e,this.cssClassPrefix=(t=this.params.cssClassPrefix)!==null&&t!==void 0?t:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;const e=loadTemplate(`<span ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`);this.params.checked?e.appendChild(createIconNoSpan("check",this.gridOptionsService)):this.params.icon&&(isNodeOrElement(this.params.icon)?e.appendChild(this.params.icon):typeof this.params.icon=="string"?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){const e=loadTemplate(`<span ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;const e=loadTemplate(`<span ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){const e=loadTemplate(`<span ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){const i=this.gridOptionsService.get("enableRtl")?"smallLeft":"smallRight";setAriaExpanded(t,!1),e.appendChild(createIconNoSpan(i,this.gridOptionsService))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}}var __decorate$1$=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};let UserComponentRegistry=class extends BeanStub{constructor(){super(...arguments),this.agGridDefaults={agDateInput:DefaultDateComponent,agColumnHeader:HeaderComp,agColumnGroupHeader:HeaderGroupComp,agSortIndicator:SortIndicatorComp,agTextColumnFloatingFilter:TextFloatingFilter,agNumberColumnFloatingFilter:NumberFloatingFilter,agDateColumnFloatingFilter:DateFloatingFilter,agReadOnlyFloatingFilter:ReadOnlyFloatingFilter,agAnimateShowChangeCellRenderer:AnimateShowChangeCellRenderer,agAnimateSlideCellRenderer:AnimateSlideCellRenderer,agGroupCellRenderer:GroupCellRenderer,agGroupRowRenderer:GroupCellRenderer,agLoadingCellRenderer:LoadingCellRenderer,agCheckboxCellRenderer:CheckboxCellRenderer,agCellEditor:TextCellEditor,agTextCellEditor:TextCellEditor,agNumberCellEditor:NumberCellEditor,agDateCellEditor:DateCellEditor,agDateStringCellEditor:DateStringCellEditor,agSelectCellEditor:SelectCellEditor,agLargeTextCellEditor:LargeTextCellEditor,agCheckboxCellEditor:CheckboxCellEditor,agTextColumnFilter:TextFilter,agNumberColumnFilter:NumberFilter,agDateColumnFilter:DateFilter,agLoadingOverlay:LoadingOverlayComponent$1,agNoRowsOverlay:NoRowsOverlayComponent$1,agTooltipComponent:TooltipComponent$1,agMenuItem:AgMenuItemRenderer},this.enterpriseAgDefaultCompsModu
|
||
|
|
`;__decorate$1W([Autowired("valueService")],QuickFilterService.prototype,"valueService",void 0);__decorate$1W([Autowired("columnModel")],QuickFilterService.prototype,"columnModel",void 0);__decorate$1W([Autowired("rowModel")],QuickFilterService.prototype,"rowModel",void 0);__decorate$1W([PostConstruct],QuickFilterService.prototype,"postConstruct",null);QuickFilterService=QuickFilterService_1=__decorate$1W([Bean("quickFilterService")],QuickFilterService);var __decorate$1V=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};let FilterManager=class extends BeanStub{constructor(){super(...arguments),this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue=[]}init(){var e,t,i;this.addManagedListener(this.eventService,Events.EVENT_GRID_COLUMNS_CHANGED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,Events.EVENT_COLUMN_VALUE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,Events.EVENT_COLUMN_PIVOT_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,Events.EVENT_NEW_COLUMNS_LOADED,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,Events.EVENT_COLUMN_VISIBLE,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,Events.EVENT_ROW_DATA_UPDATED,()=>this.onNewRowsLoaded("rowDataUpdated")),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.addManagedPropertyListener("advancedFilterModel",n=>this.setAdvancedFilterModel(n.currentValue)),this.addManagedListener(this.eventService,Events.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:n})=>this.onAdvancedFilterEnabledChanged(n)),this.addManagedListener(this.eventService,Events.EVENT_DATA_TYPES_INFERRED,()=>this.processFilterModelUpdateQueue()),this.addManagedListener(this.quickFilterService,QuickFilterService.EVENT_QUICK_FILTER_CHANGED,()=>this.onFilterChanged({source:"quickFilter"})),this.initialFilterModel=Object.assign({},(i=(t=(e=this.gridOptionsService.get("initialState"))===null||e===void 0?void 0:e.filter)===null||t===void 0?void 0:t.filterModel)!==null&&i!==void 0?i:{})}isExternalFilterPresentCallback(){const e=this.gridOptionsService.getCallback("isExternalFilterPresent");return typeof e=="function"?e({}):!1}doesExternalFilterPass(e){const t=this.gridOptionsService.get("doesExternalFilterPass");return typeof t=="function"?t(e):!1}setFilterModel(e,t="api"){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}if(this.dataTypeService.isPendingInference()){this.filterModelUpdateQueue.push({model:e,source:t});return}const i=[],n=this.getFilterModel();if(e){const o=convertToSet(Object.keys(e));this.allColumnFilters.forEach((r,a)=>{const l=e[a];i.push(this.setModelOnFilterWrapper(r.filterPromise,l)),o.delete(a)}),o.forEach(r=>{const a=this.columnModel.getPrimaryColumn(r)||this.columnModel.getGridColumn(r);if(!a){console.warn("AG Grid: setFilterModel() - no column found for colId: "+r);return}if(!a.isFilterAllowed()){console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+r);return}const l=this.getOrCreateFilterWrapper(a,"NO_UI");if(!l){console.warn("AG-Grid: setFilte
|
||
|
|
<div ref="eFloatingFilterBody" role="presentation"></div>
|
||
|
|
<div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">
|
||
|
|
<button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>
|
||
|
|
</div>
|
||
|
|
</div>`;__decorate$1U([RefSelector("eFloatingFilterBody")],HeaderFilterCellComp.prototype,"eFloatingFilterBody",void 0);__decorate$1U([RefSelector("eButtonWrapper")],HeaderFilterCellComp.prototype,"eButtonWrapper",void 0);__decorate$1U([RefSelector("eButtonShowMainFilter")],HeaderFilterCellComp.prototype,"eButtonShowMainFilter",void 0);__decorate$1U([PostConstruct],HeaderFilterCellComp.prototype,"postConstruct",null);__decorate$1U([PreDestroy],HeaderFilterCellComp.prototype,"destroyFloatingFilterComp",null);var __decorate$1T=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},LayoutCssClasses;(function(s){s.AUTO_HEIGHT="ag-layout-auto-height",s.NORMAL="ag-layout-normal",s.PRINT="ag-layout-print"})(LayoutCssClasses||(LayoutCssClasses={}));class LayoutFeature extends BeanStub{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.getDomLayout(),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},i=t.autoHeight?LayoutCssClasses.AUTO_HEIGHT:t.print?LayoutCssClasses.PRINT:LayoutCssClasses.NORMAL;this.view.updateLayoutClasses(i,t)}getDomLayout(){var e;const t=(e=this.gridOptionsService.get("domLayout"))!==null&&e!==void 0?e:"normal";return["normal","print","autoHeight"].indexOf(t)===-1?(warnOnce(`${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):t}}__decorate$1T([PostConstruct],LayoutFeature.prototype,"postConstruct",null);var __decorate$1S=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ScrollDirection;(function(s){s[s.Vertical=0]="Vertical",s[s.Horizontal=1]="Horizontal"})(ScrollDirection||(ScrollDirection={}));var ScrollSource;(function(s){s[s.Container=0]="Container",s[s.FakeContainer=1]="FakeContainer"})(ScrollSource||(ScrollSource={}));class GridBodyScrollFeature extends BeanStub{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=debounce(()=>this.lastScrollSource[ScrollDirection.Horizontal]=null,500),this.resetLastVScrollDebounced=debounce(()=>this.lastScrollSource[ScrollDirection.Vertical]=null,500)}postConstruct(){this.enableRtl=this.gridOptionsService.get("enableRtl"),this.addManagedListener(this.eventService,Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(e=>{this.centerRowContainerCtrl=e.centerRowContainerCtrl,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){const e=this.ctrlsService.getFakeHScrollComp(),t=this.ctrlsService.getFakeVScrollComp();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));const i=this.gridOptionsService.get("debounceVerticalScrollbar"),n=i?debounce(this.onVScroll.bind(this),100):this.onVScroll.bind(this),o=i?debounce(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",n),t.onScrollCallback(o)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){if(this.centerRowContainerCtrl==null)return;e===void 0&&(e=this.centerRowContainerCtrl.getCenterVi
|
||
|
|
<ag-header-root ref="gridHeader"></ag-header-root>
|
||
|
|
<div class="ag-floating-top" ref="eTop" role="presentation">
|
||
|
|
<ag-row-container ref="topLeftContainer" name="${RowContainerName.TOP_LEFT}"></ag-row-container>
|
||
|
|
<ag-row-container ref="topCenterContainer" name="${RowContainerName.TOP_CENTER}"></ag-row-container>
|
||
|
|
<ag-row-container ref="topRightContainer" name="${RowContainerName.TOP_RIGHT}"></ag-row-container>
|
||
|
|
<ag-row-container ref="topFullWidthContainer" name="${RowContainerName.TOP_FULL_WIDTH}"></ag-row-container>
|
||
|
|
</div>
|
||
|
|
<div class="ag-body" ref="eBody" role="presentation">
|
||
|
|
<div class="ag-body-viewport" ref="eBodyViewport" role="presentation">
|
||
|
|
<ag-row-container ref="leftContainer" name="${RowContainerName.LEFT}"></ag-row-container>
|
||
|
|
<ag-row-container ref="centerContainer" name="${RowContainerName.CENTER}"></ag-row-container>
|
||
|
|
<ag-row-container ref="rightContainer" name="${RowContainerName.RIGHT}"></ag-row-container>
|
||
|
|
<ag-row-container ref="fullWidthContainer" name="${RowContainerName.FULL_WIDTH}"></ag-row-container>
|
||
|
|
</div>
|
||
|
|
<ag-fake-vertical-scroll></ag-fake-vertical-scroll>
|
||
|
|
</div>
|
||
|
|
<div class="ag-sticky-top" ref="eStickyTop" role="presentation">
|
||
|
|
<ag-row-container ref="stickyTopLeftContainer" name="${RowContainerName.STICKY_TOP_LEFT}"></ag-row-container>
|
||
|
|
<ag-row-container ref="stickyTopCenterContainer" name="${RowContainerName.STICKY_TOP_CENTER}"></ag-row-container>
|
||
|
|
<ag-row-container ref="stickyTopRightContainer" name="${RowContainerName.STICKY_TOP_RIGHT}"></ag-row-container>
|
||
|
|
<ag-row-container ref="stickyTopFullWidthContainer" name="${RowContainerName.STICKY_TOP_FULL_WIDTH}"></ag-row-container>
|
||
|
|
</div>
|
||
|
|
<div class="ag-floating-bottom" ref="eBottom" role="presentation">
|
||
|
|
<ag-row-container ref="bottomLeftContainer" name="${RowContainerName.BOTTOM_LEFT}"></ag-row-container>
|
||
|
|
<ag-row-container ref="bottomCenterContainer" name="${RowContainerName.BOTTOM_CENTER}"></ag-row-container>
|
||
|
|
<ag-row-container ref="bottomRightContainer" name="${RowContainerName.BOTTOM_RIGHT}"></ag-row-container>
|
||
|
|
<ag-row-container ref="bottomFullWidthContainer" name="${RowContainerName.BOTTOM_FULL_WIDTH}"></ag-row-container>
|
||
|
|
</div>
|
||
|
|
<ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
|
||
|
|
<ag-overlay-wrapper></ag-overlay-wrapper>
|
||
|
|
</div>`;class GridBodyComp extends Component{constructor(){super(GRID_BODY_TEMPLATE)}init(){const e=(i,n)=>{const o=`${i}px`;n.style.minHeight=o,n.style.height=o},t={setRowAnimationCssOnBodyViewport:(i,n)=>this.setRowAnimationCssOnBodyViewport(i,n),setColumnCount:i=>setAriaColCount(this.getGui(),i),setRowCount:i=>setAriaRowCount(this.getGui(),i),setTopHeight:i=>e(i,this.eTop),setBottomHeight:i=>e(i,this.eBottom),setTopDisplay:i=>this.eTop.style.display=i,setBottomDisplay:i=>this.eBottom.style.display=i,setStickyTopHeight:i=>this.eStickyTop.style.height=i,setStickyTopTop:i=>this.eStickyTop.style.top=i,setStickyTopWidth:i=>this.eStickyTop.style.width=i,setColumnMovingCss:(i,n)=>this.addOrRemoveCssClass(i,n),updateLayoutClasses:(i,n)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(r=>{r.toggle(LayoutCssClasses.AUTO_HEIGHT,n.autoHeight),r.toggle(LayoutCssClasses.NORMAL,n.normal),r.toggle(LayoutCssClasses.PRINT,n.print)}),this.addOrRemoveCssClass(LayoutCssClasses.AUTO_HEIGHT,n.autoHeight),this.addOrRemoveCssClass(LayoutCssClasses.NORMAL,n.normal),this.addOrRemoveCssClass(LayoutCssClasses.PRINT,n.print)},setAlwaysVerticalScrollClass:(i,n)=>this.eBodyViewport.classList.toggle(CSS_CLASS_FORCE_VERTICAL_SCROLL,n),registerBodyViewportResizeListener:i=>{const n=this.resizeObserverService.observeResize(this.eBodyViewport,i);this.addDestroyFunc(()=>n())},setPinnedTopBottomOverflowY:i=>this.eTop.style.overflowY=this.eBottom.style.overflowY=i,setCellSelectableCss:(i,n)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(o=>o.classList.toggle(i,n))},setBodyViewportWidth:i=>this.eBodyViewport.style.width=i};this.ctrl=this.createManagedBean(new GridBodyCtrl),this.ctrl.setComp(t,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService&&this.gridOptionsService.get("enableRangeSelection")||this.gridOptionsService.get("rowSelection")==="multiple")&&setAriaMultiSelectable(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle(RowAnimationCssClasses.ANIMATION_ON,t),i.toggle(RowAnimationCssClasses.ANIMATION_OFF,!t)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}}__decorate$1F([Autowired("resizeObserverService")],GridBodyComp.prototype,"resizeObserverService",void 0);__decorate$1F([Optional("rangeService")],GridBodyComp.prototype,"rangeService",void 0);__decorate$1F([RefSelector("eBodyViewport")],GridBodyComp.prototype,"eBodyViewport",void 0);__decorate$1F([RefSelector("eStickyTop")],GridBodyComp.prototype,"eStickyTop",void 0);__decorate$1F([RefSelector("eTop")],GridBodyComp.prototype,"eTop",void 0);__decorate$1F([RefSelector("eBottom")],GridBodyComp.prototype,"eBottom",void 0);__decorate$1F([RefSelector("gridHeader")],GridBodyComp.prototype,"headerRootComp",void 0);__decorate$1F([RefSelector("eBody")],GridBodyComp.prototype,"eBody",void 0);__decorate$1F([PostConstruct],GridBodyComp.prototype,"init",null);var __decorate$1E=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};let ScrollVisibleService=class extends BeanStub{postConstruct(){this.addManagedListener(this.eventService,Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))}onDisplayedColumnsChanged(){this.update()}onDisplayedColumnsWidthChanged(){this.update()}update(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateImpl())}):this.updateImpl()}updateImpl(){const e=this.ctrlsService.getCenterRowContainerCtrl();if(!e||this.columnAnimationService.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShow
|
||
|
|
<div class="${e.container}" ref="eContainer"></div>
|
||
|
|
</div>`:t=`<div class="${e.container}" ref="eContainer"></div>`,t}class RowContainerComp extends Component{constructor(){super(templateFactory()),this.rowComps={},this.name=Component.elementGettingCreated.getAttribute("name"),this.type=getRowContainerTypeForName(this.name)}postConstruct(){const e={setViewportHeight:i=>this.eViewport.style.height=i,setRowCtrls:({rowCtrls:i})=>this.setRowCtrls(i),setDomOrder:i=>{this.domOrder=i},setContainerWidth:i=>this.eContainer.style.width=i};this.createManagedBean(new RowContainerCtrl(this.name)).setComp(e,this.eContainer,this.eViewport)}preDestroy(){this.setRowCtrls([])}setRowCtrls(e){const t=Object.assign({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;const i=n=>{const o=n.getInstanceId(),r=t[o];if(r)this.rowComps[o]=r,delete t[o],this.ensureDomOrder(r.getGui());else{if(!n.getRowNode().displayed)return;const a=new RowComp(n,this.beans,this.type);this.rowComps[o]=a,this.appendRow(a.getGui())}};e.forEach(i),getAllValuesInObject(t).forEach(n=>{this.eContainer.removeChild(n.getGui()),n.destroy()}),setAriaRole(this.eContainer,"rowgroup")}appendRow(e){this.domOrder?insertWithDomOrder(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e}ensureDomOrder(e){this.domOrder&&(ensureDomOrder(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}}__decorate$1A([Autowired("beans")],RowContainerComp.prototype,"beans",void 0);__decorate$1A([RefSelector("eViewport")],RowContainerComp.prototype,"eViewport",void 0);__decorate$1A([RefSelector("eContainer")],RowContainerComp.prototype,"eContainer",void 0);__decorate$1A([PostConstruct],RowContainerComp.prototype,"postConstruct",null);__decorate$1A([PreDestroy],RowContainerComp.prototype,"preDestroy",null);var __decorate$1z=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class BodyDropPivotTarget{constructor(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}onDragEnter(e){if(this.clearColumnsList(),this.gridOptionsService.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(i=>{i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?DragAndDropService.ICON_PINNED:DragAndDropService.ICON_MOVE:null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(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")}}__decorate$1z([Autowired("columnModel")],BodyDropPivotTarget.prototype,"columnModel",void 0);__decorate$1z([Autowired("gridOptionsService")],BodyDropPivotTarget.prototype,"gridOptionsService",void 0);class ColumnMoveHelper{static attemptMoveColumns(e){const{isFromHeader:t,hDirection:i,xPosition:n,fromEnter:o,fakeEvent:r,pinned:a,gridOptionsService:l,columnModel:d}=e,h=i===HorizontalDirection.Left,p=i===HorizontalDirection.Right;let{allMovingColumns:m}=e;if(t){let D=[];m.forEach(x=>{var M;let I=null,V=x.getParent();for(;V!=null&&V.getDisplayedLeafColumns().length===1;)I=V,V=V.getParent();I!=null?(!!(!((M=I.getColGroupDef())===null||M===void 0)&&M.marryChildren)?I.getProvidedColumnGroup().getLeafColumns():I.getLeafColumns()).forEach(K=>{D.includes(K)||D.push(K)}):D.inc
|
||
|
|
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
|
||
|
|
<div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
|
||
|
|
</div>`;__decorate$1w([RefSelector("eResize")],HeaderCellComp.prototype,"eResize",void 0);__decorate$1w([RefSelector("eHeaderCompWrapper")],HeaderCellComp.prototype,"eHeaderCompWrapper",void 0);__decorate$1w([PostConstruct],HeaderCellComp.prototype,"postConstruct",null);__decorate$1w([PreDestroy],HeaderCellComp.prototype,"destroyHeaderComp",null);var __decorate$1v=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class HeaderGroupCellComp extends AbstractHeaderCellComp{constructor(e){super(HeaderGroupCellComp.TEMPLATE,e)}postConstruct(){const e=this.getGui(),t=(n,o)=>o!=null?e.setAttribute(n,o):e.removeAttribute(n);e.setAttribute("col-id",this.ctrl.getColId());const i={addOrRemoveCssClass:(n,o)=>this.addOrRemoveCssClass(n,o),setResizableDisplayed:n=>setDisplayed(this.eResize,n),setWidth:n=>e.style.width=n,setAriaExpanded:n=>t("aria-expanded",n),setUserCompDetails:n=>this.setUserCompDetails(n),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(i,e,this.eResize)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const i=this.getGui(),n=e.getGui();i.appendChild(n),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}}HeaderGroupCellComp.TEMPLATE=`<div class="ag-header-group-cell" role="columnheader">
|
||
|
|
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
|
||
|
|
</div>`;__decorate$1v([RefSelector("eResize")],HeaderGroupCellComp.prototype,"eResize",void 0);__decorate$1v([PostConstruct],HeaderGroupCellComp.prototype,"postConstruct",null);var __decorate$1u=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},HeaderRowType;(function(s){s.COLUMN_GROUP="group",s.COLUMN="column",s.FLOATING_FILTER="filter"})(HeaderRowType||(HeaderRowType={}));class HeaderRowComp extends Component{constructor(e){super(),this.headerComps={},this.ctrl=e,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}init(){setAriaRowIndex(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,i)=>this.setHeaderCtrls(t,i),setWidth:t=>this.getGui().style.width=t};this.ctrl.setComp(e)}destroyHeaderCtrls(){this.setHeaderCtrls([],!1)}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;if(this.headerComps={},e.forEach(n=>{const o=n.getInstanceId();let r=i[o];delete i[o],r==null&&(r=this.createHeaderComp(n),this.getGui().appendChild(r.getGui())),this.headerComps[o]=r}),iterateObject(i,(n,o)=>{this.getGui().removeChild(o.getGui()),this.destroyBean(o)}),t){const n=getAllValuesInObject(this.headerComps);n.sort((r,a)=>{const l=r.getCtrl().getColumnGroupChild().getLeft(),d=a.getCtrl().getColumnGroupChild().getLeft();return l-d});const o=n.map(r=>r.getGui());setDomChildOrder(this.getGui(),o)}}createHeaderComp(e){let t;switch(this.ctrl.getType()){case HeaderRowType.COLUMN_GROUP:t=new HeaderGroupCellComp(e);break;case HeaderRowType.FLOATING_FILTER:t=new HeaderFilterCellComp(e);break;default:t=new HeaderCellComp(e);break}return this.createBean(t),t.setParentComponent(this),t}}__decorate$1u([PostConstruct],HeaderRowComp.prototype,"init",null);__decorate$1u([PreDestroy],HeaderRowComp.prototype,"destroyHeaderCtrls",null);var __decorate$1t=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};let instanceIdSequence$1=0;class AbstractHeaderCellCtrl extends BeanStub{constructor(e,t,i){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=e,this.parentRowCtrl=i,this.beans=t,this.instanceId=e.getUniqueId()+"-"+instanceIdSequence$1++}postConstruct(){this.addManagedPropertyListeners(["suppressHeaderFocus"],()=>this.refreshTabIndex())}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.focusService.getFocusedHeader();return isUserSuppressingHeaderKeyboardEvent(this.gridOptionsService,e,t,i)}getWrapperHasFocus(){return this.gridOptionsService.getDocument().activeElement===this.eGui}setGui(e){this.eGui=e,this.addDomData(),this.addManagedListener(this.beans.eventService,Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onDisplayedColumnsChanged(){!this.comp||!this.column||(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:i}=this;CssClassApplier.refreshFirstAndLastStyles(e,t,i.columnModel)}refreshAriaColIndex(){const{beans:e,column:t}=this,i=e.columnModel.getAriaColumnIndex(t);setAriaColIndex(this.eGui,i)}addResizeAndMoveKeyboardListeners(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))}refreshTabIndex(){this.gridOptio
|
||
|
|
<div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>
|
||
|
|
</div>`;__decorate$1k([RefSelector("eCenterContainer")],HeaderRowContainerComp.prototype,"eCenterContainer",void 0);__decorate$1k([PostConstruct],HeaderRowContainerComp.prototype,"init",null);__decorate$1k([PreDestroy],HeaderRowContainerComp.prototype,"destroyRowComps",null);var __decorate$1j=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},HeaderNavigationDirection;(function(s){s[s.UP=0]="UP",s[s.DOWN=1]="DOWN",s[s.LEFT=2]="LEFT",s[s.RIGHT=3]="RIGHT"})(HeaderNavigationDirection||(HeaderNavigationDirection={}));let HeaderNavigationService=class extends BeanStub{constructor(){super(...arguments),this.currentHeaderRowWithoutSpan=-1}postConstruct(){this.ctrlsService.whenReady(t=>{this.gridBodyCon=t.gridBodyCtrl});const e=this.gridOptionsService.getDocument();this.addManagedListener(e,"mousedown",()=>this.setCurrentHeaderRowWithoutSpan(-1))}getHeaderRowCount(){const e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0}navigateVertically(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;const{headerRowIndex:n,column:o}=t,r=this.getHeaderRowCount(),a=e===HeaderNavigationDirection.UP;let{headerRowIndex:l,column:d,headerRowIndexWithoutSpan:h}=a?this.headerPositionUtils.getColumnVisibleParent(o,n):this.headerPositionUtils.getColumnVisibleChild(o,n),p=!1;return l<0&&(l=0,d=o,p=!0),l>=r?(l=-1,this.setCurrentHeaderRowWithoutSpan(-1)):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!p&&!d?!1:this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:d},allowUserOverride:!0,event:i})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e,t=!1,i){const n=this.focusService.getFocusedHeader(),o=e===HeaderNavigationDirection.LEFT,r=this.gridOptionsService.get("enableRtl");let a,l;return this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,o!==r?(l="Before",a=this.headerPositionUtils.findHeader(n,l)):(l="After",a=this.headerPositionUtils.findHeader(n,l)),a||!t?this.focusService.focusHeaderPosition({headerPosition:a,direction:l,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(n,l,i)}focusNextHeaderRow(e,t,i){const n=e.headerRowIndex;let o=null,r;if(t==="Before"?n>0&&(r=n-1,this.currentHeaderRowWithoutSpan-=1,o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"end")):(r=n+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"start")),!o)return!1;const{column:a,headerRowIndex:l}=this.headerPositionUtils.getHeaderIndexToFocus(o.column,o==null?void 0:o.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:a,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(e instanceof ColumnGroup){const n=e.getDisplayedLeafColumns();i=t==="Before"?last(n):n[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}};__decorate$1j([Autowired("focusService")],HeaderNavigationService.prototype,"focusService",void 0);__decorate$1j([Autowired("headerPositionUtils")],HeaderNavigationService.prototype,"headerPositionUtils",void 0);__decorate$1j([Autowired("ctrlsService")],HeaderNavigationService.prototype,"ctrlsService",void 0);__decorate$1j([PostConstruct],HeaderNavigationService.prototype,"postConstruct",null);HeaderNavigationService=__decorate$1j([Bean("headerNavigationService")],HeaderNavigationService);var __decorate$1i=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Ref
|
||
|
|
<div ref="eHeader" role="tablist" class="ag-tabs-header ${e?`${e}-header`:""}"></div>
|
||
|
|
<div ref="eBody" role="presentation" class="ag-tabs-body ${e?`${e}-body`:""}"></div>
|
||
|
|
</div>`}handleKeyDown(e){const t=this.gridOptionsService.getDocument();switch(e.key){case KeyCode.RIGHT:case KeyCode.LEFT:if(!this.eHeader.contains(t.activeElement))return;const i=e.key===KeyCode.RIGHT,n=this.gridOptionsService.get("enableRtl"),o=this.items.indexOf(this.activeItem),r=i!==n?Math.min(o+1,this.items.length-1):Math.max(o-1,0);if(o===r)return;e.preventDefault();const a=this.items[r];this.showItemWrapper(a),a.eHeaderButton.focus();break;case KeyCode.UP:case KeyCode.DOWN:e.stopPropagation();break}}onTabKeyDown(e){if(e.defaultPrevented)return;const{focusService:t,eHeader:i,eBody:n,activeItem:o}=this,a=this.gridOptionsService.getDocument().activeElement,l=e.target;if(e.preventDefault(),i.contains(a)){this.focusBody(e.shiftKey);return}let d=null;t.isTargetUnderManagedComponent(n,l)&&(e.shiftKey&&(d=this.focusService.findFocusableElementBeforeTabGuard(n,l)),d||(d=o.eHeaderButton)),!d&&n.contains(a)&&(d=t.findNextFocusableElement(n,!1,e.shiftKey),d||this.focusHeader()),d&&d.focus()}focusInnerElement(e){e?this.focusHeader():this.focusBody(!0)}focusHeader(){this.activeItem.eHeaderButton.focus()}focusBody(e){this.focusService.focusInto(this.eBody,e)}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){const t=document.createElement("span");setAriaRole(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eHeader.appendChild(t),setAriaLabel(t,e.titleLabel);const i={tabbedItem:e,eHeaderButton:t};this.items.push(i),t.addEventListener("click",this.showItemWrapper.bind(this,i))}showItem(e){const t=this.items.find(i=>i.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){var t,i,n,o,r,a;const{tabbedItem:l,eHeaderButton:d}=e;if((i=(t=this.params).onItemClicked)===null||i===void 0||i.call(t,{item:l}),this.activeItem===e){(o=(n=this.params).onActiveItemClicked)===null||o===void 0||o.call(n);return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),clearElement(this.eBody),l.bodyPromise.then(h=>{this.eBody.appendChild(h);const p=!this.focusService.isKeyboardMode();if(this.focusService.focusInto(this.eBody,!1,p),l.afterAttachedCallback&&l.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const m=l.getScrollableContainer&&l.getScrollableContainer()||h;this.lastScrollListener=this.addManagedListener(m,"scroll",()=>{this.tabbedItemScrollMap.set(l.name,m.scrollTop)});const v=this.tabbedItemScrollMap.get(l.name);v!==void 0&&setTimeout(()=>{m.scrollTop=v},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),(a=(r=this.activeItem.tabbedItem).afterDetachedCallback)===null||a===void 0||a.call(r)),d.classList.add("ag-tab-selected"),this.activeItem=e}}__decorate$1d([Autowired("focusService")],TabbedLayout.prototype,"focusService",void 0);__decorate$1d([RefSelector("eHeader")],TabbedLayout.prototype,"eHeader",void 0);__decorate$1d([RefSelector("eBody")],TabbedLayout.prototype,"eBody",void 0);__decorate$1d([PostConstruct],TabbedLayout.prototype,"postConstruct",null);var __decorate$1c=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};const DEBOUNCE_DELAY=50;let ResizeObserverService=class extends BeanStub{constructor(){super(...arguments),this.polyfillFunctions=[]}observeResize(e,t){const i=this.gridOptionsService.getWindow(),n=()=>{const l=new i.ResizeObserver(t);return l.observe(e),()=>l.disconnect()},o=()=>{var l,d;let h=(l=e==null?void 0:e.clientWidth)!==null&&l!==void 0?l:0,p=(d=e==null?void 0:e.clientHeight)!==null&&d!==void 0?d:0,m=!0;const v=()=>{var y,b;if(m){const S=(y=e==null?void 0:e.clientWidth)!==null&&y!==void 0?y:0,E=(b=e==null?void 0:e.clientHeight)!==null&&b!==void 0?b:0;(S!==h||E!==p)&&(h=S
|
||
|
|
<div class="ag-virtual-list-container ag-${e}-virtual-list-container" ref="eContainer"></div>
|
||
|
|
</div>`}getItemHeight(){return this.environment.getListItemHeight()}ensureIndexVisible(e,t=!0){const i=this.model.getRowCount();if(typeof e!="number"||e<0||e>=i)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+e),!1;const n=e*this.rowHeight,o=n+this.rowHeight,r=this.getGui(),a=r.scrollTop,l=r.offsetHeight,d=a+l,h=t?0:this.rowHeight,p=a>n+h,m=d<o-h;if(p)return r.scrollTop=n,!0;if(m){const v=o-l;return r.scrollTop=v,!0}return!1}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.rowHeight=e,this.refresh()}refresh(e){if(this.model==null||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,waitUntil(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;const t=this.getGui(),i=t.scrollTop,n=i+t.offsetHeight,o=Math.floor(i/this.rowHeight),r=Math.floor(n/this.rowHeight);this.ensureRowsRendered(o,r,e)}ensureRowsRendered(e,t,i){this.renderedRows.forEach((n,o)=>{(o<e||o>t)&&o!==this.lastFocusedRowIndex&&this.removeRow(o)}),i&&this.refreshRows();for(let n=e;n<=t;n++)this.renderedRows.has(n)||n<this.model.getRowCount()&&this.insertRow(n)}insertRow(e){const t=this.model.getRow(e),i=document.createElement("div");i.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),setAriaRole(i,this.ariaRole==="tree"?"treeitem":"option"),setAriaSetSize(i,this.model.getRowCount()),setAriaPosInSet(i,e+1),i.setAttribute("tabindex","-1"),i.style.height=`${this.rowHeight}px`,i.style.top=`${this.rowHeight*e}px`;const n=this.componentCreator(t,i);n.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),i.appendChild(n.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",i):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",i):this.eContainer.appendChild(i),this.renderedRows.set(e,{rowComponent:n,eDiv:i,value:t})}removeRow(e){const t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){const e=this.model.getRowCount();this.renderedRows.forEach((t,i)=>{var n,o;if(i>=e)this.removeRow(i);else{const r=this.model.getRow(i);!((o=(n=this.model).areRowsEqual)===null||o===void 0)&&o.call(n,t.value,r)?this.componentUpdater(r,t.rowComponent):this.removeRow(i)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),super.destroy())}}__decorate$$([Autowired("resizeObserverService")],VirtualList.prototype,"resizeObserverService",void 0);__decorate$$([Autowired("animationFrameService")],VirtualList.prototype,"animationFrameService",void 0);__decorate$$([RefSelector("eContainer")],VirtualList.prototype,"eContainer",void 0);__decorate$$([PostConstruct],VirtualList.prototype,"postConstruct",null);var __decorate$_=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};const TEMPLATE=`
|
||
|
|
<div class="ag-picker-field" role="presentation">
|
||
|
|
<div ref="eLabel"></div>
|
||
|
|
<div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
|
||
|
|
<div ref="eDisplayField" class="ag-picker-field-display"></div>
|
||
|
|
<ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
|
||
|
|
<div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
|
||
|
|
</div>
|
||
|
|
</div>`;class AgRichSelect extends AgPickerField{constructor(e){var t,i;super(Object.assign(Object.assign({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:(t=e==null?void 0:e.template)!==null&&t!==void 0?t:TEMPLATE,modalPicker:!1},e),{maxPickerHeight:(i=e==null?void 0:e.maxPickerHeight)!==null&&i!==void 0?i:"calc(var(--ag-row-height) * 6.5)"})),this.searchString="",this.highlightedItem=-1,this.lastRowHovered=-1,this.searchStringCreator=null;const{cellRowHeight:n,value:o,valueList:r,searchStringCreator:a}=e||{};n!=null&&(this.cellRowHeight=n),o!==void 0&&(this.value=o),r!=null&&(this.values=r),a&&(this.searchStringCreator=a)}postConstruct(){super.postConstruct(),this.createLoadingElement(),this.createListComponent();const{allowTyping:e,placeholder:t}=this.config;e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(t),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.eWrapper.tabIndex=this.gridOptionsService.get("tabIndex");const{searchDebounceDelay:i=300}=this.config;this.clearSearchString=debounce(this.clearSearchString,i),this.renderSelectedValue(),e&&(this.eInput.onValueChange(n=>this.searchTextFromString(n)),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}createLoadingElement(){const e=this.gridOptionsService.getDocument(),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i}createListComponent(){this.listComponent=this.createBean(new VirtualList({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this));const e=(l,d)=>{};this.listComponent.setComponentUpdater(e),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,Events.EVENT_FIELD_PICKER_VALUE_SELECTED,l=>{this.onListValueSelected(l.value,l.fromEnterKey)});const{cellRowHeight:t}=this;t&&this.listComponent.setRowHeight(t);const i=this.listComponent.getGui(),n=this.listComponent.getAriaElement();this.addManagedListener(i,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(i,"mousedown",l=>l.preventDefault()),i.classList.add("ag-rich-select-list");const o=`ag-rich-select-list-${this.listComponent.getCompId()}`;n.setAttribute("id",o);const a=this.localeService.getLocaleTextFunc()(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue);setAriaLabel(n,a),setAriaControls(this.eWrapper,n)}renderSelectedValue(){const{value:e,eDisplayField:t,config:i}=this,{allowTyping:n,initialInputValue:o}=this.config,r=this.config.valueFormatter?this.config.valueFormatter(e):e;if(n){this.eInput.setValue(o??r);return}let a;i.cellRenderer&&(a=this.userComponentFactory.getCellRendererDetails(this.config,{value:e,valueFormatted:r}));let l;if(a&&(l=a.newAgStackInstance()),l)clearElement(t),bindCellRendererToHtmlElement(l,t),l.then(d=>{this.addDestroyFunc(()=>this.getContext().destroyBean(d))});else if(exists(this.value))t.innerText=r,t.classList.remove("ag-display-as-placeholder");else{const{placeholder:d}=i;exists(d)?(t.innerHTML=`${escapeString(d)}`,t.classList.add("ag-display-as-placeholder")):clearElement(t)}}getCurrentValueIndex(){const{currentList:e,value:t}=this;if(t==null||!e)return-1;for(let i=0;i<e.length;i++)if(e[i]===t)return i;return-1}highlightFilterMatch(){var e;(e=this.listComponent)===null||e===void 0||e.forEachRenderedRow((t,i)=>{t.highlightString(this.searchString)})}highlightSelectedValue(e){var t;e==null&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,(t=this.listComponent)===null||t===void 0||t.forEachRenderedRow((i,n)=>{const o=e===-1?!1:this.highlightedItem===n;i.updateHighlighted(o)})}setRowHeight(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)}createPickerComponent(){const{values:e}=this;return e&&this.setV
|
||
|
|
<label ref="eLabel"></label>
|
||
|
|
<div class="ag-wrapper ag-slider-wrapper">
|
||
|
|
<ag-input-range ref="eSlider"></ag-input-range>
|
||
|
|
<ag-input-number-field ref="eText"></ag-input-number-field>
|
||
|
|
</div>
|
||
|
|
</div>`;__decorate$Z([RefSelector("eLabel")],AgSlider.prototype,"eLabel",void 0);__decorate$Z([RefSelector("eSlider")],AgSlider.prototype,"eSlider",void 0);__decorate$Z([RefSelector("eText")],AgSlider.prototype,"eText",void 0);__decorate$Z([PostConstruct],AgSlider.prototype,"init",null);var __decorate$Y=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class AgGroupComponent extends Component{constructor(e={}){super(AgGroupComponent.getTemplate(e)),this.suppressEnabledCheckbox=!0,this.suppressOpenCloseIcons=!1;const{title:t,enabled:i,items:n,suppressEnabledCheckbox:o,suppressOpenCloseIcons:r}=e;this.title=t,this.cssIdentifier=e.cssIdentifier||"default",this.enabled=i??!0,this.items=n||[],this.alignItems=e.alignItems||"center",o!=null&&(this.suppressEnabledCheckbox=o),r!=null&&(this.suppressOpenCloseIcons=r)}static getTemplate(e){const t=e.cssIdentifier||"default",i=e.direction||"vertical";return`<div class="ag-group ag-${t}-group" role="presentation">
|
||
|
|
<div class="ag-group-title-bar ag-${t}-group-title-bar ag-unselectable" ref="eTitleBar" role="button">
|
||
|
|
<span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>
|
||
|
|
<span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>
|
||
|
|
<span ref="eTitle" class="ag-group-title ag-${t}-group-title"></span>
|
||
|
|
</div>
|
||
|
|
<div ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">
|
||
|
|
<ag-checkbox ref="cbGroupEnabled"></ag-checkbox>
|
||
|
|
</div>
|
||
|
|
<div ref="eContainer" class="ag-group-container ag-group-container-${i} ag-${t}-group-container"></div>
|
||
|
|
</div>`}postConstruct(){if(this.items.length){const t=this.items;this.items=[],this.addItems(t)}const e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("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()}setupExpandContract(){this.eGroupClosedIcon.appendChild(createIcon("columnSelectClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(createIcon("columnSelectOpen",this.gridOptionsService,null)),this.addManagedListener(this.eTitleBar,"click",()=>this.toggleGroupExpand()),this.addManagedListener(this.eTitleBar,"keydown",e=>{switch(e.key){case KeyCode.ENTER:case KeyCode.SPACE:e.preventDefault(),this.toggleGroupExpand();break;case KeyCode.RIGHT:case KeyCode.LEFT:e.preventDefault(),this.toggleGroupExpand(e.key===KeyCode.RIGHT);break}})}refreshAriaStatus(){this.suppressOpenCloseIcons||setAriaExpanded(this.eTitleBar,this.expanded)}refreshChildDisplay(){const e=!this.suppressOpenCloseIcons;setDisplayed(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),setDisplayed(this.eGroupOpenedIcon,e&&this.expanded),setDisplayed(this.eGroupClosedIcon,e&&!this.expanded)}isExpanded(){return this.expanded}setAlignItems(e){this.alignItems!==e&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=e;const t=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(t),this}toggleGroupExpand(e){return this.suppressOpenCloseIcons?(this.expanded=!0,this.refreshChildDisplay(),setDisplayed(this.eContainer,!0),this):(e=e??!this.expanded,this.expanded===e?this:(this.expanded=e,this.refreshAriaStatus(),this.refreshChildDisplay(),setDisplayed(this.eContainer,e),this.dispatchEvent({type:this.expanded?AgGroupComponent.EVENT_EXPANDED:AgGroupComponent.EVENT_COLLAPSED}),this))}addItems(e){e.forEach(t=>this.addItem(t))}prependItem(e){this.insertItem(e,this.eContainer.firstChild)}addItem(e){this.insertItem(e,null)}insertItem(e,t){const i=this.eContainer,n=e instanceof Component?e.getGui():e;n.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),i.insertBefore(n,t),this.items.push(n)}hideItem(e,t){const i=this.items[t];setDisplayed(i,!e)}setTitle(e){return this.eTitle.innerText=e,this}addCssClassToTitleBar(e){this.eTitleBar.classList.add(e)}setEnabled(e,t){return this.enabled=e,this.refreshDisabledStyles(),this.toggleGroupExpand(e),t||this.cbGroupEnabled.setValue(e),this}isEnabled(){return this.enabled}onEnableChange(e){return this.cbGroupEnabled.onValueChange(t=>{this.setEnabled(t,!0),e(t)}),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.toggleGroupExpand(!0),this}refreshDisabledStyles(){this.addOrRemoveCssClass("ag-disabled",!this.enabled),this.suppressEnabledCheckbox&&!this.enabled?(this.eTitleBar.classList.add("ag-disabled-group-title-bar"),this.eTitleBar.removeAttribute("tabindex")):(this.eTitleBar.classList.remove("ag-disabled-group-title-bar"),this.eTitleBar.setAttribute("tabindex","0")),this.eContainer.classList.toggle("ag-disabled-group-container",!this.enabled)}}AgGroupComponent.EVENT_EXPANDED="expanded";AgGroupComponent.EVENT_COLLAPSED="collapsed";__decorate$Y([RefSelector("eTitleBar")],AgGroupComponent.prototype,"eTitleBar",void 0);__decorate$Y([RefSelector("eGroupOpenedIcon")],AgGroupComponent.prototype,"eGroupOpenedIcon",void 0);__decorate$Y([RefSelector("eGroupClosedIcon")],AgGroupComponent.prototype,"eGroupClosedIcon",void 0);__decorate$Y([RefSelector("eToolbar")],AgGroupComponent.prototype,"eToolbar",void 0);__decorate$Y([RefSelector("cbGroupEnabled")],AgGroupComponent.prototype,"cbGroupEnabled",void 0);__decorate$Y([RefSelector("eTitle")],AgGroupComponent.prototype,"eTitle",void 0);__decorate$Y([RefSelector("eContainer
|
||
|
|
<div class="ag-menu-separator" aria-hidden="true">
|
||
|
|
<div class="ag-menu-separator-part"></div>
|
||
|
|
<div class="ag-menu-separator-part"></div>
|
||
|
|
<div class="ag-menu-separator-part"></div>
|
||
|
|
<div class="ag-menu-separator-part"></div>
|
||
|
|
</div>`)}handleNavKey(e){switch(e){case KeyCode.UP:case KeyCode.DOWN:const i=this.findNextItem(e===KeyCode.UP);i&&i!==this.activeMenuItem&&i.activate();return}const t=this.gridOptionsService.get("enableRtl")?KeyCode.RIGHT:KeyCode.LEFT;e===t?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return t&&t instanceof AgMenuItemComponent?(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0):!1}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=this.menuItems.filter(o=>!o.isDisabled());if(!t.length)return;if(!this.activeMenuItem)return e?last(t):t[0];e&&t.reverse();let i,n=!1;for(let o=0;o<t.length;o++){const r=t[o];if(!n){r===this.activeMenuItem&&(n=!0);continue}i=r;break}return n&&!i?t[0]:i||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}}__decorate$X([Autowired("focusService")],AgMenuList.prototype,"focusService",void 0);__decorate$X([PostConstruct],AgMenuList.prototype,"postConstruct",null);var __decorate$W=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class AgMenuPanel extends TabGuardComp{constructor(e){super(),this.wrappedComponent=e,this.setTemplateFromElement(e.getGui())}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===KeyCode.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}}__decorate$W([PostConstruct],AgMenuPanel.prototype,"postConstruct",null);var __decorate$V=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class AgMenuItemComponent extends BeanStub{constructor(){super(...arguments),this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}init(e){var t,i;const{menuItemDef:n,isAnotherSubMenuOpen:o,level:r,childComponent:a,contextParams:l}=e;return this.params=e.menuItemDef,this.level=r,this.isAnotherSubMenuOpen=o,this.childComponent=a,this.contextParams=l,this.cssClassPrefix=(i=(t=this.params.menuItemParams)===null||t===void 0?void 0:t.cssClassPrefix)!==null&&i!==void 0?i:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,Object.assign(Object.assign({},n),{level:r,isAnotherSubMenuOpen:o,openSubMenu:h=>this.openSubMenu(h),closeSubMenu:()=>this.closeSubMenu(),closeMenu:h=>this.closeMenu(h),updateTooltip:h=>this.updateTooltip(h),onItemActivated:()=>this.onItemActivated()})).newAgStackInstance().then(h=>{var p;this.menuItemComp=h;const m=(p=h.configureDefaults)===null||p===void 0?void 0:p.call(h);m&&this.configureDefaults(m===!0?void 0:m)})}addListeners(e,t){t!=null&&t.suppressClick||this.addManagedListener(e,"click",i=>this.onItemSelected(i)),t!=null&&t.suppressKeyboardSelect||this.addManagedListener(e,"keydown",i=>{(i.key===KeyCode.ENTER||i.key===KeyCode.SPACE)&&(i.preventDefault(),this.onItemSelected(i))}),t!=null&&t.suppressMouseDown||this.addManagedListener(e,"mousedown",i=>{i.stopPropagation(),i.preventDefault()}),t!=null&&t.suppressMouseOver||(this.addManagedListener(e,"mouseenter",()=>this.onMouseEnter()),this.addManagedListener(e,"mouseleave",()=>this.onMouseLeave()))}isDisabled(){return!!this.params.disabled}openSubMenu(e=!1){var t,i;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const n=loadTemplate('<di
|
||
|
|
<div ref="eTitleBar" class="ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable">
|
||
|
|
<span ref="eTitle" class="ag-panel-title-bar-title ag-${t}-panel-title-bar-title"></span>
|
||
|
|
<div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons"></div>
|
||
|
|
</div>
|
||
|
|
<div ref="eContentWrapper" class="ag-panel-content-wrapper ag-${t}-panel-content-wrapper"></div>
|
||
|
|
</div>`}postConstruct(){const{component:e,closable:t,hideTitleBar:i,title:n,minWidth:o=250,width:r,minHeight:a=250,height:l,centered:d,popup:h,x:p,y:m}=this.config;this.positionableFeature=new PositionableFeature(this.getGui(),{minWidth:o,width:r,minHeight:a,height:l,centered:d,x:p,y:m,popup:h,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const v=this.getGui();e&&this.setBodyComponent(e),i?setDisplayed(this.eTitleBar,!1):(n&&this.setTitle(n),this.setClosable(t??this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",y=>{const b=this.gridOptionsService.getDocument();if(v.contains(y.relatedTarget)||v.contains(b.activeElement)||this.eTitleBarButtons.contains(y.target)){y.preventDefault();return}const S=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");S&&S.focus()}),!(h&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(e){if(e!==this.closable&&(this.closable=e),e){const t=this.closeButtonComp=new Component(AgPanel.CLOSE_BTN_TEMPLATE);this.getContext().createBean(t);const i=t.getGui(),n=createIconNoSpan("close",this.gridOptionsService);n.classList.add("ag-panel-title-bar-button-icon"),i.appendChild(n),this.addTitleBarButton(t),t.addManagedListener(i,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){const t=this.closeButtonComp.getGui();t.parentElement.removeChild(t),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){const i=this.eTitleBarButtons,n=i.children,o=n.length;t==null&&(t=o),t=Math.max(0,Math.min(t,o)),e.addCssClass("ag-panel-title-bar-button");const r=e.getGui();t===0?i.insertAdjacentElement("afterbegin",r):t===o?i.insertAdjacentElement("beforeend",r):n[t-1].insertAdjacentElement("afterend",r),e.setParentComponent(this)}getBodyHeight(){return getInnerHeight(this.eContentWrapper)}getBodyWidth(){return getInnerWidth(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const e=this.getGui();e&&isVisible(e)&&this.close(),super.destroy()}}AgPanel.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>';__decorate$U([RefSelector("eContentWrapper")],AgPanel.prototype,"eContentWrapper",void 0);__decorate$U([RefSelector("eTitleBar")],AgPanel.prototype,"eTitleBar",void 0);__decorate$U([RefSelector("eTitleBarButtons")],AgPanel.prototype,"eTitleBarButtons",void 0);__decorate$U([RefSelector("eTitle")],AgPanel.prototype,"eTitle",void 0);__decorate$U([PostConstruct],AgPanel.prototype,"postConstruct",null);var __decorate$T=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class AgDialog extends AgPanel{constructor(e){super(Object.assign(Object.assign({},e),{popup:!0})),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}postConstruct(){const e=this.getGui(),{movable:t,resizable:i,maximizable:n}=this.config;this.addCssClass("ag-dialog"),super.postConstruct(),this.addManagedListener(e,"focusin",o=>{e.contains(o.relatedTarget)||this.popupService.bringPopupToFront(e)}),t&&this.setMovable(t),n&&
|
||
|
|
<div class="ag-autocomplete-row" role="presentation">
|
||
|
|
<div class="ag-autocomplete-row-label"></div>
|
||
|
|
</div>`),this.hasHighlighting=!1}setState(e,t){this.value=e,this.render(),this.updateSelected(t)}updateSelected(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)}setSearchString(e){var t;let i=!1;if(exists(e)){const n=(t=this.value)===null||t===void 0?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(n>=0){i=!0,this.hasHighlighting=!0;const o=n+e.length,r=escapeString(this.value.slice(0,n)),a=escapeString(this.value.slice(n,o)),l=escapeString(this.value.slice(o));this.getGui().lastElementChild.innerHTML=`${r}<b>${a}</b>${l}`}}!i&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){var e;this.getGui().lastElementChild.innerHTML=(e=escapeString(this.value))!==null&&e!==void 0?e:" "}}var __decorate$R=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class AgAutocompleteList extends PopupComponent{constructor(e){super(AgAutocompleteList.TEMPLATE),this.params=e,this.searchString=""}destroy(){super.destroy()}init(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new VirtualList({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:t=>this.autocompleteEntries[t]});const e=this.virtualList.getGui();this.addManagedListener(e,"click",()=>this.params.onConfirmed()),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(e,"mousedown",t=>t.preventDefault()),this.setSelectedValue(0)}onNavigationKeyDown(e,t){e.preventDefault();const i=this.autocompleteEntries.indexOf(this.selectedValue),n=t===KeyCode.UP?i-1:i+1;this.checkSetSelectedValue(n)}setSearch(e){this.searchString=e,exists(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(e,t){let i,n=!1;const o=e.toLocaleLowerCase(),r=t.filter(a=>{const d=a.toLocaleLowerCase().indexOf(o),h=d===0,p=d>=0;return p&&(!i||!n&&h||n===h&&a.length<i.length)&&(i=a,n=h),p});return!i&&r.length&&(i=r[0]),{topMatch:i,allMatches:r}}runSearch(){var e,t;const{autocompleteEntries:i}=this.params,n=i.map(d=>{var h;return(h=d.displayValue)!==null&&h!==void 0?h:d.key});let o,r;if(this.params.useFuzzySearch)o=fuzzySuggestions(this.searchString,n,!0).values,r=o.length?o[0]:void 0;else{const d=this.runContainsSearch(this.searchString,n);o=d.allMatches,r=d.topMatch}let a=i.filter(({key:d,displayValue:h})=>o.includes(h??d));if(!a.length&&this.selectedValue&&(!((t=(e=this.params)===null||e===void 0?void 0:e.forceLastSelection)===null||t===void 0)&&t.call(e,this.selectedValue,this.searchString))&&(a=[this.selectedValue]),this.autocompleteEntries=a,this.virtualList.refresh(),!r)return;const l=o.indexOf(r);this.checkSetSelectedValue(l)}updateSearchInList(){this.virtualList.forEachRenderedRow(e=>e.setSearchString(this.searchString))}checkSetSelectedValue(e){e>=0&&e<this.autocompleteEntries.length&&this.setSelectedValue(e)}setSelectedValue(e){const t=this.autocompleteEntries[e];this.selectedValue!==t&&(this.selectedValue=t,this.virtualList.ensureIndexVisible(e),this.virtualList.forEachRenderedRow((i,n)=>{i.updateSelected(e===n)}))}createRowComponent(e){var t;const i=new AgAutocompleteRow;return this.getContext().createBean(i),i.setState((t=e.displayValue)!==null&&t!==void 0?t:e.key,e===this.selectedValue),i}onMouseMove(e){const t=this.virtualList.getGui().getBoundingClientRect(),i=this.virtualList.getScrollTop(),n=e.clientY-t.top+i,o=Math.floor(n/this.virtualList.getRowHeight());this.checkSetSelectedValue(o)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){va
|
||
|
|
<div ref="eList" class="ag-autocomplete-list"></div>
|
||
|
|
<div>`;__decorate$R([RefSelector("eList")],AgAutocompleteList.prototype,"eList",void 0);__decorate$R([PostConstruct],AgAutocompleteList.prototype,"init",null);var __decorate$Q=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class AgAutocomplete extends Component{constructor(){super(`
|
||
|
|
<div class="ag-autocomplete" role="presentation">
|
||
|
|
<ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>
|
||
|
|
</div>`),this.isListOpen=!1,this.lastPosition=0,this.valid=!0}postConstruct(){this.eAutocompleteInput.onValueChange(e=>this.onValueChanged(e)),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(()=>{this.destroyBean(this.autocompleteList)}),this.addGuiEventListener("focusout",()=>this.onFocusOut())}onValueChanged(e){const t=makeNull(e);this.updateValue(t),this.updateAutocompleteList(t)}updateValue(e){this.updateLastPosition(),this.dispatchEvent({type:AgAutocomplete.EVENT_VALUE_CHANGED,value:e}),this.validate(e)}updateAutocompleteList(e){var t,i,n,o;const r=(i=(t=this.listGenerator)===null||t===void 0?void 0:t.call(this,e,this.lastPosition))!==null&&i!==void 0?i:{enabled:!1};if((!r.type||r.type!==((n=this.autocompleteListParams)===null||n===void 0?void 0:n.type))&&this.isListOpen&&this.closeList(),this.autocompleteListParams=r,!((o=this.autocompleteListParams)===null||o===void 0)&&o.enabled){this.isListOpen||this.openList();const{searchString:a}=this.autocompleteListParams;this.autocompleteList.setSearch(a??"")}else this.isListOpen&&this.closeList()}onKeyDown(e){const t=e.key;switch(this.updateLastPosition(),t){case KeyCode.ENTER:this.onEnterKeyDown(e);break;case KeyCode.TAB:this.onTabKeyDown(e);break;case KeyCode.DOWN:case KeyCode.UP:this.onUpDownKeyDown(e,t);break;case KeyCode.LEFT:case KeyCode.RIGHT:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case KeyCode.ESCAPE:this.onEscapeKeyDown(e);break;case KeyCode.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList());break}}confirmSelection(){var e;const t=(e=this.autocompleteList)===null||e===void 0?void 0:e.getSelectedValue();t&&(this.closeList(),this.dispatchEvent({type:AgAutocomplete.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:t,autocompleteType:this.autocompleteListParams.type}))}onTabKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.confirmSelection())}onEnterKeyDown(e){e.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}onUpDownKeyDown(e,t){var i;e.preventDefault(),this.isListOpen?(i=this.autocompleteList)===null||i===void 0||i.onNavigationKeyDown(e,t):this.forceOpenList()}onEscapeKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}onFocusOut(){this.isListOpen&&this.closeList()}updatePositionAndList(){var e;this.updateLastPosition(),this.updateAutocompleteList((e=this.eAutocompleteInput.getValue())!==null&&e!==void 0?e:null)}setCaret(e,t){const i=this.gridOptionsService.getDocument();t&&i.activeElement===i.body&&this.eAutocompleteInput.getFocusableElement().focus();const n=this.eAutocompleteInput.getInputElement();n.setSelectionRange(e,e),e===n.value.length&&(n.scrollLeft=n.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){var e;this.lastPosition=(e=this.eAutocompleteInput.getInputElement().selectionStart)!==null&&e!==void 0?e:0}validate(e){var t;this.validator&&(this.validationMessage=this.validator(e),this.eAutocompleteInput.getInputElement().setCustomValidity((t=this.validationMessage)!==null&&t!==void 0?t:""),this.valid=!this.validationMessage,this.dispatchEvent({type:AgAutocomplete.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new AgAutocompleteList({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));const e=this.autocompleteList.getGui(),t={ePopup:e,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gridOptionsService.get("enableRtl")?"right":"left",keepWithinBounds:!0},i=this.popupService.addPopup({eChild:e,anchorToElement:this.getGui(),positionCallback:()=>this.popupServ
|
||
|
|
"alignedGrids: () => [linkedGrid]"`),errorOnce(n());return}if(r instanceof GridApi)return r;const l=r;return"current"in l?(a=l.current)===null||a===void 0?void 0:a.api:(l.api||errorOnce(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${n()}`),l.api)}).filter(r=>!!r&&!r.isDestroyed())}init(){this.addManagedListener(this.eventService,Events.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Events.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Events.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Events.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Events.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,Events.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{const i=t.__getAlignedGridService();e(i)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent(t=>{t.onColumnEvent(e)})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent(t=>{t.onScrollEvent(e)})}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}getMasterColumns(e){const t=[];return e.columns?e.columns.forEach(i=>{t.push(i)}):e.column&&t.push(e.column),t}getColumnIds(e){const t=[];return e.columns?e.columns.forEach(i=>{t.push(i.getColId())}):e.column&&t.push(e.column.getColId()),t}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case Events.EVENT_COLUMN_MOVED:case Events.EVENT_COLUMN_VISIBLE:case Events.EVENT_COLUMN_PINNED:case Events.EVENT_COLUMN_RESIZED:const t=e;this.processColumnEvent(t);break;case Events.EVENT_COLUMN_GROUP_OPENED:const i=e;this.processGroupOpenedEvent(i);break;case Events.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.");break}})}processGroupOpenedEvent(e){e.columnGroups.forEach(t=>{let i=null;if(t){const n=t.getGroupId();i=this.columnModel.getProvidedColumnGroup(n)}t&&!i||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+t.isExpanded()),this.columnModel.setColumnGroupOpened(i,t.isExpanded(),"alignedGridChanged"))})}processColumnEvent(e){var t;const i=e.column;let n=null;if(i&&(n=this.columnModel.getPrimaryColumn(i.getColId())),i&&!n)return;const o=this.getMasterColumns(e);switch(e.type){case Events.EVENT_COLUMN_MOVED:{const h=e,m=e.api.getColumnState().map(v=>({colId:v.colId}));this.columnModel.applyColumnState({state:m,applyOrder:!0},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} toIndex = ${h.toIndex}`)}break;case Events.EVENT_COLUMN_VISIBLE:{const h=e,m=e.api.getColumnState().map(v=>({colId:v.colId,hide:v.hide}));this.columnModel.applyColumnState({state:m},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} visible = ${h.visible}`)}break;case Events.EVENT_COLUMN_PINNED:{const h=e,m=e.api.getColumnState().map(v=>({colId:v.colId,pinned:v.pinned}));this.columnModel.applyColumnState({state:m},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} pinned = ${h.pinned}`)}break;case Events.EVENT_COLUMN_RESIZED:const l=e,d={};o.forEach(h=>{this.logger.log(`onColumnEvent-> processing ${e.type} actualWidth = ${h.getActualWidth()}`),d[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()}}),(t=l.flexColumns)===null||t===void 0||t.forEach(h=>{d[h.getId()]&&delete d[h.getId()]}),this.columnModel.setColumnWidths(Object.values(d),!1,l.finished,"alignedGridChanged");break}const a=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(l=>{l.setGridOption("alwaysShowVerticalScroll",a)})}};__decorate$O([Autowired("columnModel")],AlignedGridsService.prototype,"columnModel",void 0);__decorate$O([A
|
||
|
|
${e}
|
||
|
|
<div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">
|
||
|
|
<ag-grid-body ref="gridBody"></ag-grid-body>
|
||
|
|
${t}
|
||
|
|
</div>
|
||
|
|
${i}
|
||
|
|
<ag-pagination></ag-pagination>
|
||
|
|
${n}
|
||
|
|
</div>`}getFocusableElement(){return this.eRootWrapperBody}getFocusableContainers(){const e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter(t=>isVisible(t))}}__decorate$G([Autowired("loggerFactory")],GridComp.prototype,"loggerFactory",void 0);__decorate$G([RefSelector("gridBody")],GridComp.prototype,"gridBodyComp",void 0);__decorate$G([RefSelector("sideBar")],GridComp.prototype,"sideBarComp",void 0);__decorate$G([RefSelector("rootWrapperBody")],GridComp.prototype,"eRootWrapperBody",void 0);__decorate$G([PostConstruct],GridComp.prototype,"postConstruct",null);var __decorate$F=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},SortController_1;let SortController=SortController_1=class extends BeanStub{progressSort(e,t,i){const n=this.getNextSortDirection(e);this.setSortForColumn(e,n,t,i)}setSortForColumn(e,t,i,n){t!=="asc"&&t!=="desc"&&(t=null);const o=this.gridOptionsService.isColumnsSortingCoupledToGroup();let r=[e];if(o&&e.getColDef().showRowGroup){const d=this.columnModel.getSourceColumnsForGroupColumn(e),h=d==null?void 0:d.filter(p=>p.isSortable());h&&(r=[e,...h])}r.forEach(d=>d.setSort(t,n));const a=(i||this.gridOptionsService.get("alwaysMultiSort"))&&!this.gridOptionsService.get("suppressMultiSort"),l=[];if(!a){const d=this.clearSortBarTheseColumns(r,n);l.push(...d)}this.updateSortIndex(e),l.push(...r),this.dispatchSortChangedEvents(n,l)}updateSortIndex(e){const t=this.gridOptionsService.isColumnsSortingCoupledToGroup(),i=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),n=t&&i||e,o=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(l=>l.setSortIndex(null));const r=o.filter(l=>t&&l.getColDef().showRowGroup?!1:l!==n);(n.getSort()?[...r,n]:r).forEach((l,d)=>{l.setSortIndex(d)})}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){const t=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(i=>!!i.getSort());return t&&t.length>0}dispatchSortChangedEvents(e,t){const i={type:Events.EVENT_SORT_CHANGED,source:e};t&&(i.columns=t),this.eventService.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[];return this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(n=>{e.includes(n)||(n.getSort()&&i.push(n),n.setSort(void 0,t))}),i}getNextSortDirection(e){let t;if(e.getColDef().sortingOrder?t=e.getColDef().sortingOrder:this.gridOptionsService.get("sortingOrder")?t=this.gridOptionsService.get("sortingOrder"):t=SortController_1.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;const i=t.indexOf(e.getSort()),n=i<0,o=i==t.length-1;let r;return n||o?r=t[0]:r=t[i+1],SortController_1.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("AG Grid: invalid sort type "+r),null):r}getIndexedSortMap(){let e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(r=>!!r.getSort());if(this.columnModel.isPivotMode()){const r=this.gridOptionsService.isColumnsSortingCoupledToGroup();e=e.filter(a=>{const l=!!a.getAggFunc(),d=!a.isPrimary(),h=r?this.columnModel.getGroupDisplayColumnForGroup(a.getId()):a.getColDef().showRowGroup;return l||d||h})}const t=this.columnModel.getRowGroupColumns().filter(r=>!!r.getSort()),i=this.gridOptionsService.isColumnsSortingCoupledToGroup()&&!!t.length;i&&(e=[...new Set(e.map(r=>{var a;return(a=this.columnModel.getGroupDisplayColumnForGroup(r.getId()))!==null&&a!==void 0?a:r}))]);const n={};e.forEach((r,a)=>n[r.getId()]=a),e.sort((r,a)=>{const l=r.getSortIndex(),d=a.getSortIndex();if(l!=null&&d!=null)return l-d;if(l==null&&d==null){const h=n[r.getId()],p=n[a.getId()];return h>p?1:-1}else return d==null?-1:1});const o=new Map;return e.forEac
|
||
|
|
<ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>
|
||
|
|
<span class="ag-paging-row-summary-panel" role="status">
|
||
|
|
<span id="ag-${d}-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
|
||
|
|
<span id="ag-${d}-to">${i}</span>
|
||
|
|
<span id="ag-${d}-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
|
||
|
|
<span id="ag-${d}-of">${n}</span>
|
||
|
|
<span id="ag-${d}-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
|
||
|
|
</span>
|
||
|
|
<span class="ag-paging-page-summary-panel" role="presentation">
|
||
|
|
<div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
|
||
|
|
<div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
|
||
|
|
<span class="ag-paging-description" role="status">
|
||
|
|
<span id="ag-${d}-start-page">${t}</span>
|
||
|
|
<span id="ag-${d}-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>
|
||
|
|
<span id="ag-${d}-of-page">${n}</span>
|
||
|
|
<span id="ag-${d}-of-page-number" ref="lbTotal" class="ag-paging-number"></span>
|
||
|
|
</span>
|
||
|
|
<div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>
|
||
|
|
<div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${l}"></div>
|
||
|
|
</span>
|
||
|
|
</div>`}onBtNext(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()}enableOrDisableButtons(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const n=this.isZeroPagesToDisplay(),o=e===i-1;this.nextButtonDisabled=o||n,this.lastButtonDisabled=!t||n||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){setAriaDisabled(e,t),e.classList.toggle("ag-disabled",t)}updateRowLabels(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.getPageSize(),i=this.paginationProxy.isLastPageFound(),n=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;let o,r;if(this.isZeroPagesToDisplay()?o=r=0:(o=t*e+1,r=o+t-1,i&&r>n&&(r=n)),this.lbFirstRowOnPage.textContent=this.formatNumber(o),this.rowNodeBlockLoader.isLoading()){const a=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=a("pageLastRowUnknown","?")}else this.lbLastRowOnPage.textContent=this.formatNumber(r)}isZeroPagesToDisplay(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&t===0}setTotalLabels(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),i=e?this.paginationProxy.getMasterRowCount():null;if(i===1){const n=this.paginationProxy.getRow(0);if(n&&n.group&&!(n.groupData||n.aggData)){this.setTotalLabelsToZero();return}}if(e)this.lbTotal.textContent=this.formatNumber(t),this.lbRecordCount.textContent=this.formatNumber(i);else{const n=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=n,this.lbRecordCount.innerHTML=n}}setTotalLabelsToZero(){this.lbFirstRowOnPage.textContent=this.formatNumber(0),this.lbCurrent.textContent=this.formatNumber(0),this.lbLastRowOnPage.textContent=this.formatNumber(0),this.lbTotal.textContent=this.formatNumber(0),this.lbRecordCount.textContent=this.formatNumber(0)}}__decorate$t([Autowired("paginationProxy")],PaginationComp.prototype,"paginationProxy",void 0);__decorate$t([Autowired("rowNodeBlockLoader")],PaginationComp.prototype,"rowNodeBlockLoader",void 0);__decorate$t([RefSelector("btFirst")],PaginationComp.prototype,"btFirst",void 0);__decorate$t([RefSelector("btPrevious")],PaginationComp.prototype,"btPrevious",void 0);__decorate$t([RefSelector("btNext")],PaginationComp.prototype,"btNext",void 0);__decorate$t([RefSelector("btLast")],PaginationComp.prototype,"btLast",void 0);__decorate$t([RefSelector("lbRecordCount")],PaginationComp.prototype,"lbRecordCount",void 0);__decorate$t([RefSelector("lbFirstRowOnPage")],PaginationComp.prototype,"lbFirstRowOnPage",void 0);__decorate$t([RefSelector("lbLastRowOnPage")],PaginationComp.prototype,"lbLastRowOnPage",void 0);__decorate$t([RefSelector("lbCurrent")],PaginationComp.prototype,"lbCurrent",void 0);__decorate$t([RefSelector("lbTotal")],PaginationComp.prototype,"lbTotal",void 0);__decorate$t([RefSelector("pageSizeComp")],PaginationComp.prototype,"pageSizeComp",void 0);__decorate$t([PostConstruct],PaginationComp.prototype,"postConstruct",null);var __decorate$s=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class OverlayWrapperComponent extends Component{constructor(){super(OverlayWrapperComponent.TEMPLATE),this.inProgress=!1,this.destroyRequested=!1}updateLayoutClasses(e,t)
|
||
|
|
<div class="ag-overlay" role="presentation">
|
||
|
|
<div class="ag-overlay-panel" role="presentation">
|
||
|
|
<div class="ag-overlay-wrapper" ref="eOverlayWrapper" role="presentation"></div>
|
||
|
|
</div>
|
||
|
|
</div>`;__decorate$s([Autowired("overlayService")],OverlayWrapperComponent.prototype,"overlayService",void 0);__decorate$s([RefSelector("eOverlayWrapper")],OverlayWrapperComponent.prototype,"eOverlayWrapper",void 0);__decorate$s([PostConstruct],OverlayWrapperComponent.prototype,"postConstruct",null);var __decorate$r=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};let RowPositionUtils=class extends BeanStub{getFirstRow(){let e=0,t;return this.pinnedRowModel.getPinnedTopRowCount()?t="top":this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(t="bottom"),t===void 0?null:{rowIndex:e,rowPinned:t}}getLastRow(){let e,t=null;const i=this.pinnedRowModel.getPinnedBottomRowCount(),n=this.pinnedRowModel.getPinnedTopRowCount();return i?(t="bottom",e=i-1):this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageLastRow()):n&&(t="top",e=n-1),e===void 0?null:{rowIndex:e,rowPinned:t}}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}}sameRow(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}before(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(exists(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}rowMax(e){let t;return e.forEach(i=>{(t===void 0||this.before(t,i))&&(t=i)}),t}rowMin(e){let t;return e.forEach(i=>{(t===void 0||this.before(i,t))&&(t=i)}),t}};__decorate$r([Autowired("rowModel")],RowPositionUtils.prototype,"rowModel",void 0);__decorate$r([Autowired("pinnedRowModel")],RowPositionUtils.prototype,"pinnedRowModel",void 0);__decorate$r([Autowired("paginationProxy")],RowPositionUtils.prototype,"paginationProxy",void 0);RowPositionUtils=__decorate$r([Bean("rowPositionUtils")],RowPositionUtils);var __decorate$q=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};let CellPositionUtils=class extends BeanStub{createId(e){const{rowIndex:t,rowPinned:i,column:n}=e;return this.createIdFromValues({rowIndex:t,column:n,rowPinned:i})}createIdFromValues(e){const{rowIndex:t,rowPinned:i,column:n}=e;return`${t}.${i??"null"}.${n.getId()}`}equals(e,t){const i=e.column===t.column,n=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return i&&n&&o}};CellPositionUtils=__decorate$q([Bean("cellPositionUtils")],CellPositionUtils);class UndoRedoAction{constructor(e){this.cellValueChanges=e}}class RangeUndoRedoAction extends UndoRedoAction{constructor(e,t,i,n){super(e),this.initialRange=t,this.finalRange=i,this.ranges=n}}class UndoRedoStack{constructor(e){this.actionStack=[],this.maxStackSize=e||UndoRedoStack.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}}UndoRedoStack.DEFAULT_STACK_SIZE=10;var __decorate$p=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.le
|
||
|
|
<div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>
|
||
|
|
<div class="ag-body-horizontal-scroll-viewport" ref="eViewport">
|
||
|
|
<div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>
|
||
|
|
</div>
|
||
|
|
<div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>
|
||
|
|
</div>`;__decorate$h([RefSelector("eLeftSpacer")],FakeHScrollComp.prototype,"eLeftSpacer",void 0);__decorate$h([RefSelector("eRightSpacer")],FakeHScrollComp.prototype,"eRightSpacer",void 0);__decorate$h([Autowired("columnModel")],FakeHScrollComp.prototype,"columnModel",void 0);__decorate$h([Autowired("pinnedRowModel")],FakeHScrollComp.prototype,"pinnedRowModel",void 0);__decorate$h([PostConstruct],FakeHScrollComp.prototype,"postConstruct",null);var __decorate$g=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};let PinnedWidthService=class extends BeanStub{postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,Events.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const e=this.gridOptionsService.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),i=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:Events.EVENT_LEFT_PINNED_WIDTH_CHANGED})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}};__decorate$g([Autowired("columnModel")],PinnedWidthService.prototype,"columnModel",void 0);__decorate$g([PostConstruct],PinnedWidthService.prototype,"postConstruct",null);PinnedWidthService=__decorate$g([Bean("pinnedWidthService")],PinnedWidthService);var __decorate$f=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};let RowNodeEventThrottle=class extends BeanStub{constructor(){super(...arguments),this.events=[]}postConstruct(){this.rowModel.getType()=="clientSide"&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e){if(this.clientSideRowModel==null){this.eventService.dispatchEvent(e);return}this.events.push(e);const t=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(i=>this.eventService.dispatchEvent(i)),this.events=[]};this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(t)),this.dispatchExpandedDebounced()}};__decorate$f([Autowired("animationFrameService")],RowNodeEventThrottle.prototype,"animationFrameService",void 0);__decorate$f([Autowired("rowModel")],RowNodeEventThrottle.prototype,"rowModel",void 0);__decorate$f([PostConstruct],RowNodeEventThrottle.prototype,"postConstruct",null);RowNodeEventThrottle=__decorate$f([Bean("rowNodeEventThrottle")],RowNodeEventThrottle);const COLUMN_DEFINITION_DEPRECATIONS={columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."}},CSRM_REQUIRES_ROW_GROUP_MODULE=(s,e)=>{var t;return((t=e.rowModelType)!==null&&t!==void 0?t:"clientSide")==="clientSide"?{module:ModuleNames.RowGroupingModule}:null},COLUMN_DEFINITION_VALIDATIONS={enableRowGroup:CSRM_REQUIRES_ROW_GROUP_MODULE,rowGroup:CSRM_REQUIRES_ROW_GROUP_MODULE,rowGroupIndex:CSRM_REQUIRES_ROW_GROUP_MODULE,enablePivot:CSRM_REQUIRES_ROW_GROUP_MODULE,enableValue:CSRM_REQUIRES_ROW_GROUP_MODULE,pivot:CSRM_REQUIRES_ROW_GROUP_MODULE,pivotIndex:CSRM_REQUIRES_ROW_GROUP_MODULE,aggFunc:CSRM_REQUIRES_ROW_GROUP_MODULE,cellEditor:s=>s.cellEditor==="agRichSelect"||s.cellEditor==="agRichSelectCellEditor"?
|
||
|
|
<div class="ag-body-vertical-scroll-viewport" ref="eViewport">
|
||
|
|
<div class="ag-body-vertical-scroll-container" ref="eContainer"></div>
|
||
|
|
</div>
|
||
|
|
</div>`;__decorate$c([PostConstruct],FakeVScrollComp.prototype,"postConstruct",null);var __decorate$b=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};const MONTH_LOCALE_TEXT={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},MONTH_KEYS=["january","february","march","april","may","june","july","august","september","october","november","december"];let DataTypeService=class extends BeanStub{constructor(){super(...arguments),this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}init(){this.groupHideOpenParents=this.gridOptionsService.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gridOptionsService.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(convertSourceType(e.source))})}processDataTypeDefinitions(){var e;const t=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(t).forEach(([n,o])=>{this.dataTypeDefinitions[n]=Object.assign(Object.assign({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)})});const i=(e=this.gridOptionsService.get("dataTypeDefinitions"))!==null&&e!==void 0?e:{};this.dataTypeMatchers={},Object.entries(i).forEach(([n,o])=>{const r=this.processDataTypeDefinition(o,i,[n],t);r&&(this.dataTypeDefinitions[n]=r,o.dataTypeMatcher&&(this.dataTypeMatchers[n]=o.dataTypeMatcher))}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(n=>{const o=this.dataTypeMatchers[n];o&&delete this.dataTypeMatchers[n],this.dataTypeMatchers[n]=o??t[n].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){const i=Object.assign(Object.assign({},e),t);return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...this.convertColumnTypes(e.columnTypes),...this.convertColumnTypes(t.columnTypes)]),i}processDataTypeDefinition(e,t,i,n){let o;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let a=n[r];const l=t[r];if(a&&l&&(a=l),!this.validateDataTypeDefinition(e,a,r))return;o=this.mergeDataTypeDefinitions(a,e)}else{if(i.includes(r)){warnOnce('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');return}const a=t[r];if(!this.validateDataTypeDefinition(e,a,r))return;const l=this.processDataTypeDefinition(a,t,[...i,r],n);if(!l)return;o=this.mergeDataTypeDefinitions(l,e)}return Object.assign(Object.assign({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)})}validateDataTypeDefinition(e,t,i){return t?t.baseDataType!==e.baseDataType?(warnOnce('The "baseDataType" property of a data type definition must match that of its parent.'),!1):!0:(warnOnce(`The data type definition ${i} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{var i,n;if(!((i=t.node)===null||i===void 0)&&i.group){const o=t.column.getAggFunc();if(o){if(o==="first"||o==="last")return e.valueFormatter(t);if(e.baseDataType==="number"&&o!=="count"){if(typeof t.value=="number")return e.valueFormatter(t);if(typeof t.value=="object"){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter(Object.assign(Object.assign({},t),{value:t.value.toNumber()}));if("value"in t.value)return e.valueFormatter(Object.assign(Object.assign({},t),{value:t.value.value}))}}}if(!this.gridOptionsService.get("suppressGroupMai
|
||
|
|
Please make sure that the paginationPageSize grid option is set to one of the values in the
|
||
|
|
paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.`)),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);const n=this.localeService.getLocaleTextFunc(),o=n("pageSizeSelectorLabel","Page Size:"),r=e.map(l=>({value:String(l),text:String(l)})),a=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new AgSelect).addOptions(r).setValue(String(i?"":t)).setAriaLabel(a).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.hasEmptyOption=i}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gridOptionsService.get("paginationPageSizeSelector");return!Array.isArray(t)||!this.validateValues(t)?e:[...t].sort((i,n)=>i-n)}validateValues(e){if(!e.length)return warnOnce(`The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.
|
||
|
|
If you want to hide the page size selector, please set the paginationPageSizeSelector to false.`),!1;for(let t=0;t<e.length;t++){const i=e[t],n=typeof i=="number",o=i>0;if(!n)return warnOnce(`The paginationPageSizeSelector grid option contains a non-numeric value.
|
||
|
|
Please make sure that all values in the paginationPageSizeSelector array are numbers.`),!1;if(!o)return warnOnce(`The paginationPageSizeSelector grid option contains a negative number or zero.
|
||
|
|
Please make sure that all values in the paginationPageSizeSelector array are positive.`),!1}return!0}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}__decorate$4([Autowired("localeService")],PageSizeSelectorComp.prototype,"localeService",void 0);__decorate$4([Autowired("gridOptionsService")],PageSizeSelectorComp.prototype,"gridOptionsService",void 0);__decorate$4([Autowired("paginationProxy")],PageSizeSelectorComp.prototype,"paginationProxy",void 0);__decorate$4([PostConstruct],PageSizeSelectorComp.prototype,"init",null);var __decorate$3=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};let AriaAnnouncementService=class extends BeanStub{constructor(){super(),this.descriptionContainer=null,this.announceValue=debounce(this.announceValue.bind(this),200)}postConstruct(){const e=this.gridOptionsService.getDocument(),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),setAriaLive(t,"polite"),setAriaRelevant(t,"additions text"),setAriaAtomic(t,!0),this.eGridDiv.appendChild(t)}announceValue(e){this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout(()=>{this.descriptionContainer.textContent=e},50))}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(clearElement(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null}};__decorate$3([Autowired("eGridDiv")],AriaAnnouncementService.prototype,"eGridDiv",void 0);__decorate$3([PostConstruct],AriaAnnouncementService.prototype,"postConstruct",null);AriaAnnouncementService=__decorate$3([Bean("ariaAnnouncementService")],AriaAnnouncementService);function createGrid(s,e,t){if(!e)return errorOnce("No gridOptions provided to createGrid"),{};const i=GridOptionsService.getCoercedGridOptions(e),n=new GridCoreCreator().create(s,i,o=>{const r=new GridComp(s);o.createBean(r)},void 0,t);if(!Object.isFrozen(e)&&!(t!=null&&t.frameworkOverrides)){const o="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";Object.defineProperty(e,"api",{get:()=>{errorOnce(`gridOptions.api is no longer supported. See ${o}.`)},configurable:!0}),Object.defineProperty(e,"columnApi",{get:()=>{errorOnce(`gridOptions.columnApi is no longer supported and all methods moved to the grid api. See ${o}.`)},configurable:!0})}return n}let nextGridId=1;class GridCoreCreator{create(e,t,i,n,o){var r;const a=!!t.debug,l=(r=t.gridId)!==null&&r!==void 0?r:String(nextGridId++),d=this.getRegisteredModules(o,l),h=this.createBeansList(t.rowModelType,d,l),p=this.createProvidedBeans(e,t,o);if(!h){errorOnce("Failed to create grid.");return}const m={providedBeanInstances:p,beanClasses:h,debug:a,gridId:l},v=new Logger("Context",()=>m.debug),y=new Context(m,v),b=y.getBean("beans");return this.registerModuleUserComponents(b,d),this.registerStackComponents(b,d),this.registerControllers(b,d),i(y),b.syncService.start(),n&&n(y),b.gridApi}registerControllers(e,t){t.forEach(i=>{i.controllers&&i.controllers.forEach(n=>e.ctrlsFactory.register(n))})}registerStackComponents(e,t){const i=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(i)}getRegisteredModules(e,t){const i=e?e.modules:null,n=ModuleRegistry.__getRegisteredModules(t),o=[],r={},a=(l,d,h)=>{(m=>{r[m.moduleName]||(r[m.moduleName]=!0,o.push(m),ModuleRegistry.__register(m,l,h))})(d),d.dependantModules&&d.dependantModules.forEach(m=>a(l,m,h))};return i&&i.forEach(l=>a(!0,l,t)),n&&n.forEach(l=>a(!ModuleRegistry.__isPackageBased(),l,void 0)),o}registerModuleUserComponents(e,t){this.extractModuleEntity(t,n=>n.userComponents?n.userComponents:[]).forEach(n=>{e.userComponentRegistry.registerDefaultComponent(n.componentName,n.componentClass)})}createProvidedBeans(e,t,i){let n=i?i.frameworkOverrides:null;m
|
||
|
|
* @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
|
||
|
|
* @version v31.1.0
|
||
|
|
* @link https://www.ag-grid.com/
|
||
|
|
* @license MIT
|
||
|
|
*/const globalObj=typeof global>"u"?{}:global;globalObj.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement;globalObj.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement;globalObj.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement;globalObj.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement;globalObj.Node=typeof Node>"u"?{}:Node;globalObj.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;const agGrid="",agThemeAlpine="";var __decorate$2=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o};class InfiniteBlock extends RowNodeBlock{constructor(e,t,i){super(e),this.parentCache=t,this.params=i,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}postConstruct(){this.createRowNodes()}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}setDataAndId(e,t,i){_.exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(_.missing(this.params.datasource.getRows)){console.warn("AG Grid: datasource is missing getRows method");return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}processServerFail(){}createLoadParams(){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.gridOptionsService.getGridCommonParams().context}}forEachNode(e,t,i){this.rowNodes.forEach((n,o)=>{this.startRow+o<i&&e(n,t.next())})}getLastAccessed(){return this.lastAccessed}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.next());const i=e-this.startRow;return this.rowNodes[i]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){const t=this.startRow+e,i=new RowNode(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(t),i.setRowTop(this.params.rowHeight*t),this.rowNodes.push(i)}}processServerResult(e){this.rowNodes.forEach((i,n)=>{const o=e.rowData?e.rowData[n]:void 0;!i.id&&i.alreadyRendered&&o&&(this.rowNodes[n]=new RowNode(this.beans),this.rowNodes[n].setRowIndex(i.rowIndex),this.rowNodes[n].setRowTop(i.rowTop),this.rowNodes[n].setRowHeight(i.rowHeight),i.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[n],o,this.startRow+n)});const t=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroyRowNodes(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()})}}__decorate$2([Autowired("beans")],InfiniteBlock.prototype,"beans",void 0);__decorate$2([PostConstruct],InfiniteBlock.prototype,"postConstruct",null);__decorate$2([PreDestroy],InfiniteBlock.prototype,"destroyRowNodes",null);var __decorate$1=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},__param=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};class InfiniteCache extends BeanStub{constructor(e){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount,this.params=e}setBeans(e){this.logger=e.create("InfiniteCache")}getRow(e,t=!1){const i=Math.floor(e/this.params.blockSize);let n=this.blocks[i];if(!n){if(t)return;n=this.createBlock(i)}return n.getRow(e)}createBlock(e){const t=this.createBean(new InfiniteBlock(e,this,th
|